summaryrefslogtreecommitdiffstats
path: root/library/ttk
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-12-12 11:14:29 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-12-12 11:14:29 (GMT)
commitade0c301f939cd67b9a5fc5f14eca5e67099f8e3 (patch)
treea09ce60714ad44ed309321e14962e13eb01e0e6a /library/ttk
parentcfd27d0bfd660642b6527c8bb036064f0593b531 (diff)
parentc51d6bc0892201d0a21d39fc41810fb04dfc8975 (diff)
downloadtk-ade0c301f939cd67b9a5fc5f14eca5e67099f8e3.zip
tk-ade0c301f939cd67b9a5fc5f14eca5e67099f8e3.tar.gz
tk-ade0c301f939cd67b9a5fc5f14eca5e67099f8e3.tar.bz2
Merge 8.7
Diffstat (limited to 'library/ttk')
-rw-r--r--library/ttk/notebook.tcl8
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 ""