• -underline not showing

    From rene@21:1/5 to All on Thu Sep 30 01:00:40 2021
    Hello,

    In the following script I see the underline in the button but not in the menu entry. Any ideas?

    toplevel .t
    grid [ttk::button .t.b -text abc -underline 2]
    grid [menubutton .t.mb -label button]
    menu .t.mb.m
    .t.mb configure -menu .t.mb.m
    .t.mb.m add command -label cmd1 -underline 2


    Thank you
    René

    P.S. windows with tcl/tk 8.7a5

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nicolas@21:1/5 to All on Thu Sep 30 01:44:43 2021
    Le jeudi 30 septembre 2021 à 10:00:43 UTC+2, rene a écrit :
    Hello,

    In the following script I see the underline in the button but not in the menu entry. Any ideas?

    toplevel .t
    grid [ttk::button .t.b -text abc -underline 2]
    grid [menubutton .t.mb -label button]
    menu .t.mb.m
    .t.mb configure -menu .t.mb.m
    .t.mb.m add command -label cmd1 -underline 2


    Thank you
    René

    P.S. windows with tcl/tk 8.7a5

    Hi,
    running your script I got:
    () 1 % toplevel .t
    .t
    () 2 % grid [ttk::button .t.b -text abc -underline 2]
    () 3 % grid [menubutton .t.mb -label button]
    unknown option "-label"

    maybe you can try a ttk::menubutton with a style that use an underlined font

    ++

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rene@21:1/5 to Nicolas on Thu Sep 30 02:19:06 2021
    Nicolas schrieb am Donnerstag, 30. September 2021 um 10:44:45 UTC+2:
    Hi,
    running your script I got:
    () 1 % toplevel .t
    .t
    () 2 % grid [ttk::button .t.b -text abc -underline 2]
    () 3 % grid [menubutton .t.mb -label button]
    unknown option "-label"

    maybe you can try a ttk::menubutton with a style that use an underlined font

    Sorry, copy&paste error (use -test instead of -label).
    Please try and look on the "cmd1" menu entry:

    toplevel .t
    grid [ttk::button .t.b -text abc -underline 2]
    grid [menubutton .t.mb -text button]
    menu .t.mb.m
    .t.mb configure -menu .t.mb.m
    .t.mb.m add command -label cmd1 -underline 2

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Harald Oehlmann@21:1/5 to All on Thu Sep 30 11:27:14 2021
    Am 30.09.2021 um 10:00 schrieb rene:
    Hello,

    In the following script I see the underline in the button but not in the menu entry. Any ideas?
    P.S. windows with tcl/tk 8.7a5


    Stupid question: recent windows only show the menu underlines when ypu
    press the alt key. Did you verify that ?

    Harald

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rene@21:1/5 to Harald Oehlmann on Thu Sep 30 05:06:16 2021
    Harald Oehlmann schrieb am Donnerstag, 30. September 2021 um 11:27:18 UTC+2:
    Am 30.09.2021 um 10:00 schrieb rene:
    Hello,

    In the following script I see the underline in the button but not in the menu entry. Any ideas?
    P.S. windows with tcl/tk 8.7a5

    Stupid question: recent windows only show the menu underlines when ypu
    press the alt key. Did you verify that ?

    Harald
    Hello Harald,

    The problem is the missing underline in the command entry on the popup menu. Please run the script, click on "button" and look at the "cmd1" string.
    Imho there should be a underlined "d" character.
    Pressing the Alt key does not help here.

    Regards
    René

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Harald Oehlmann@21:1/5 to All on Thu Sep 30 15:49:51 2021
    Am 30.09.2021 um 11:19 schrieb rene:
    Nicolas schrieb am Donnerstag, 30. September 2021 um 10:44:45 UTC+2:
    Hi,
    running your script I got:
    () 1 % toplevel .t
    .t
    () 2 % grid [ttk::button .t.b -text abc -underline 2]
    () 3 % grid [menubutton .t.mb -label button]
    unknown option "-label"

    maybe you can try a ttk::menubutton with a style that use an underlined font >>
    Sorry, copy&paste error (use -test instead of -label).
    Please try and look on the "cmd1" menu entry:

    toplevel .t
    grid [ttk::button .t.b -text abc -underline 2]
    grid [menubutton .t.mb -text button]
    menu .t.mb.m
    .t.mb configure -menu .t.mb.m
    .t.mb.m add command -label cmd1 -underline 2



    If you allow keyboard traversal by -takefocus 1, the underline will
    apprear. But you must open the menu with alt-space:

    toplevel .t
    grid [ttk::button .t.b -text abc -underline 2]
    grid [menubutton .t.mb -text button -takefocus 1]
    menu .t.mb.m
    .t.mb configure -menu .t.mb.m
    .t.mb.m add command -label cmd1 -underline 2

    Enjoy,
    Harald

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Harald Oehlmann@21:1/5 to All on Thu Sep 30 15:56:08 2021
    Am 30.09.2021 um 15:49 schrieb Harald Oehlmann:

    Am 30.09.2021 um 11:19 schrieb rene:
    Nicolas schrieb am Donnerstag, 30. September 2021 um 10:44:45 UTC+2:
    Hi,
    running your script I got:
    () 1 % toplevel .t
    .t
    () 2 % grid [ttk::button .t.b -text abc -underline 2]
    () 3 % grid [menubutton .t.mb -label button]
    unknown option "-label"

    maybe you can try a ttk::menubutton with a style that use an
    underlined font

    Sorry, copy&paste error (use -test instead of -label).
    Please try and look on the "cmd1" menu entry:

    toplevel .t
    grid [ttk::button .t.b -text abc -underline 2]
    grid [menubutton .t.mb -text button]
    menu .t.mb.m
    .t.mb configure -menu .t.mb.m
    .t.mb.m add command -label cmd1 -underline 2


    If you allow keyboard traversal by -takefocus 1, the underline will
    apprear. But you must open the menu with alt-space:

    toplevel .t
    grid [ttk::button .t.b -text abc -underline 2]
    grid [menubutton .t.mb -text button -takefocus 1]
    menu .t.mb.m
    .t.mb configure -menu .t.mb.m
    .t.mb.m add command -label cmd1 -underline 2

    Enjoy,
    Harald

    To add, that this odd behaviour is Windows, not Tk. You may set this
    behaviour in your WIndows settings somewhere...

    Take care,
    Harald

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mike Griffiths@21:1/5 to rene on Thu Sep 30 14:52:18 2021
    On Thursday, 30 September 2021 at 13:06:18 UTC+1, rene wrote:
    Harald Oehlmann schrieb am Donnerstag, 30. September 2021 um 11:27:18 UTC+2:
    Am 30.09.2021 um 10:00 schrieb rene:
    Hello,

    In the following script I see the underline in the button but not in the menu entry. Any ideas?
    P.S. windows with tcl/tk 8.7a5

    Stupid question: recent windows only show the menu underlines when ypu press the alt key. Did you verify that ?

    Harald
    Hello Harald,

    The problem is the missing underline in the command entry on the popup menu. Please run the script, click on "button" and look at the "cmd1" string.
    Imho there should be a underlined "d" character.
    Pressing the Alt key does not help here.

    Regards
    René

    Works fine for me on Windows 7 and Tcl/Tk 8.6.9; the "c" in the button and the "d" in the menu entry are both underlined.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rene@21:1/5 to Harald Oehlmann on Thu Sep 30 23:01:17 2021
    Harald Oehlmann schrieb am Donnerstag, 30. September 2021 um 15:49:54 UTC+2:
    Am 30.09.2021 um 11:19 schrieb rene:
    Nicolas schrieb am Donnerstag, 30. September 2021 um 10:44:45 UTC+2:
    Hi,
    running your script I got:
    () 1 % toplevel .t
    .t
    () 2 % grid [ttk::button .t.b -text abc -underline 2]
    () 3 % grid [menubutton .t.mb -label button]
    unknown option "-label"

    maybe you can try a ttk::menubutton with a style that use an underlined font

    Sorry, copy&paste error (use -test instead of -label).
    Please try and look on the "cmd1" menu entry:

    toplevel .t
    grid [ttk::button .t.b -text abc -underline 2]
    grid [menubutton .t.mb -text button]
    menu .t.mb.m
    .t.mb configure -menu .t.mb.m
    .t.mb.m add command -label cmd1 -underline 2


    If you allow keyboard traversal by -takefocus 1, the underline will
    apprear. But you must open the menu with alt-space:
    toplevel .t
    grid [ttk::button .t.b -text abc -underline 2]
    grid [menubutton .t.mb -text button -takefocus 1]
    menu .t.mb.m
    .t.mb configure -menu .t.mb.m
    .t.mb.m add command -label cmd1 -underline 2
    Enjoy,
    Harald
    Hello Harald,

    it is working with only using the keyboard!
    Don't touch the mouse :)
    I would say a really strange windows 'feature'.

    Thank
    Rene

    Btw. how did you get such hidden knowledge?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Harald Oehlmann@21:1/5 to All on Fri Oct 1 09:32:14 2021
    Am 01.10.2021 um 08:01 schrieb rene:
    Harald Oehlmann schrieb am Donnerstag, 30. September 2021 um 15:49:54 UTC+2:
    Am 30.09.2021 um 11:19 schrieb rene:
    Nicolas schrieb am Donnerstag, 30. September 2021 um 10:44:45 UTC+2:
    Hi,
    running your script I got:
    () 1 % toplevel .t
    .t
    () 2 % grid [ttk::button .t.b -text abc -underline 2]
    () 3 % grid [menubutton .t.mb -label button]
    unknown option "-label"

    maybe you can try a ttk::menubutton with a style that use an underlined font

    Sorry, copy&paste error (use -test instead of -label).
    Please try and look on the "cmd1" menu entry:

    toplevel .t
    grid [ttk::button .t.b -text abc -underline 2]
    grid [menubutton .t.mb -text button]
    menu .t.mb.m
    .t.mb configure -menu .t.mb.m
    .t.mb.m add command -label cmd1 -underline 2


    If you allow keyboard traversal by -takefocus 1, the underline will
    apprear. But you must open the menu with alt-space:
    toplevel .t
    grid [ttk::button .t.b -text abc -underline 2]
    grid [menubutton .t.mb -text button -takefocus 1]
    menu .t.mb.m
    .t.mb configure -menu .t.mb.m
    .t.mb.m add command -label cmd1 -underline 2
    Enjoy,
    Harald
    Hello Harald,

    it is working with only using the keyboard!
    Don't touch the mouse :)
    I would say a really strange windows 'feature'.

    Thank
    Rene

    Btw. how did you get such hidden knowledge?


    Yes, there is somewhere in the WIndows options a point to deactivate
    this, but I did not find it by a quick search.

    Hidden knowledge ? I saw the option and tested it.

    Take care,
    Harald

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)