diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-12-12 11:14:29 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-12-12 11:14:29 (GMT) |
commit | ade0c301f939cd67b9a5fc5f14eca5e67099f8e3 (patch) | |
tree | a09ce60714ad44ed309321e14962e13eb01e0e6a /library/ttk | |
parent | cfd27d0bfd660642b6527c8bb036064f0593b531 (diff) | |
parent | c51d6bc0892201d0a21d39fc41810fb04dfc8975 (diff) | |
download | tk-ade0c301f939cd67b9a5fc5f14eca5e67099f8e3.zip tk-ade0c301f939cd67b9a5fc5f14eca5e67099f8e3.tar.gz tk-ade0c301f939cd67b9a5fc5f14eca5e67099f8e3.tar.bz2 |
Merge 8.7
Diffstat (limited to 'library/ttk')
-rw-r--r-- | library/ttk/notebook.tcl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/library/ttk/notebook.tcl b/library/ttk/notebook.tcl index 7fb0ad5..55aaa03 100644 --- a/library/ttk/notebook.tcl +++ b/library/ttk/notebook.tcl @@ -140,9 +140,11 @@ proc ttk::notebook::MnemonicTab {nb key} { foreach tab [$nb tabs] { set label [$nb tab $tab -text] set underline [$nb tab $tab -underline] - set mnemonic [string toupper [string index $label $underline]] - if {$mnemonic ne "" && $mnemonic eq $key} { - return $tab + if {$underline >= 0} { + set mnemonic [string toupper [string index $label $underline]] + if {$mnemonic ne "" && $mnemonic eq $key} { + return $tab + } } } return "" |