Import Tk 8.6.11
This commit is contained in:
@@ -140,8 +140,30 @@ proc ttk::cursor {name} {
|
||||
|
||||
proc ttk::setCursor {w name} {
|
||||
variable Cursors
|
||||
if {[$w cget -cursor] ne $Cursors($name)} {
|
||||
$w configure -cursor $Cursors($name)
|
||||
if {[info exists Cursors($name)]} {
|
||||
set cursorname $Cursors($name)
|
||||
} else {
|
||||
set cursorname $name
|
||||
}
|
||||
if {[$w cget -cursor] ne $cursorname} {
|
||||
$w configure -cursor $cursorname
|
||||
}
|
||||
}
|
||||
|
||||
## ttk::saveCursor $w $saveVar $excludeList --
|
||||
# Set variable $saveVar to the -cursor value from widget $w,
|
||||
# if either:
|
||||
# a. $saveVar does not yet exist
|
||||
# b. the currently user-specified cursor for $w is not in
|
||||
# $excludeList
|
||||
|
||||
proc ttk::saveCursor {w saveVar excludeList} {
|
||||
upvar $saveVar sv
|
||||
if {![info exists sv]} {
|
||||
set sv [$w cget -cursor]
|
||||
}
|
||||
if {[$w cget -cursor] ni $excludeList} {
|
||||
set sv [$w cget -cursor]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user