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
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
Am 30.09.2021 um 10:00 schrieb rene:Hello Harald,
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
Nicolas schrieb am Donnerstag, 30. September 2021 um 10:44:45 UTC+2:
Hi,Sorry, copy&paste error (use -test instead of -label).
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 >>
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
Am 30.09.2021 um 11:19 schrieb rene:
Nicolas schrieb am Donnerstag, 30. September 2021 um 10:44:45 UTC+2:
Hi,Sorry, copy&paste error (use -test instead of -label).
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
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
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 ?
HaraldHello 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é
Am 30.09.2021 um 11:19 schrieb rene:
Nicolas schrieb am Donnerstag, 30. September 2021 um 10:44:45 UTC+2:
Hi,Sorry, copy&paste error (use -test instead of -label).
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
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 willHello Harald,
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
Harald Oehlmann schrieb am Donnerstag, 30. September 2021 um 15:49:54 UTC+2:
Am 30.09.2021 um 11:19 schrieb rene:Hello Harald,
Nicolas schrieb am Donnerstag, 30. September 2021 um 10:44:45 UTC+2:If you allow keyboard traversal by -takefocus 1, the underline will
Hi,Sorry, copy&paste error (use -test instead of -label).
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
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
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
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?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 285 |
Nodes: | 16 (2 / 14) |
Uptime: | 26:56:31 |
Calls: | 6,448 |
Files: | 12,050 |
Messages: | 5,254,434 |