Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
6
Task/Mouse-position/Tcl/mouse-position-1.tcl
Normal file
6
Task/Mouse-position/Tcl/mouse-position-1.tcl
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
package require Tk 8.5
|
||||
set curWindow [lindex [wm stackorder .] end]
|
||||
# Everything below will work with anything from Tk 8.0 onwards
|
||||
set x [expr {[winfo pointerx .] - [winfo rootx $curWindow]}]
|
||||
set y [expr {[winfo pointery .] - [winfo rooty $curWindow]}]
|
||||
tk_messageBox -message "the mouse is at ($x,$y) in window $curWindow"
|
||||
2
Task/Mouse-position/Tcl/mouse-position-2.tcl
Normal file
2
Task/Mouse-position/Tcl/mouse-position-2.tcl
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
package require Tk
|
||||
puts "monitor/display coordinate x = [winfo pointerx .]"
|
||||
Loading…
Add table
Add a link
Reference in a new issue