Import Tk 8.6.12
This commit is contained in:
@@ -57,11 +57,13 @@ proc ttk::notebook::Press {w x y} {
|
||||
# Select the next/previous tab in the list.
|
||||
#
|
||||
proc ttk::notebook::CycleTab {w dir} {
|
||||
if {[$w index end] != 0} {
|
||||
set current [$w index current]
|
||||
set select [expr {($current + $dir) % [$w index end]}]
|
||||
while {[$w tab $select -state] != "normal" && ($select != $current)} {
|
||||
set select [expr {($select + $dir) % [$w index end]}]
|
||||
set current [$w index current]
|
||||
if {$current >= 0} {
|
||||
set tabCount [$w index end]
|
||||
set select [expr {($current + $dir) % $tabCount}]
|
||||
set step [expr {$dir > 0 ? 1 : -1}]
|
||||
while {[$w tab $select -state] ne "normal" && ($select != $current)} {
|
||||
set select [expr {($select + $step) % $tabCount}]
|
||||
}
|
||||
if {$select != $current} {
|
||||
ActivateTab $w $select
|
||||
|
||||
Reference in New Issue
Block a user