RosettaCodeData/Task/Window-creation-X11/Tcl/window-creation-x11-4.tcl
2023-07-01 13:44:08 -04:00

21 lines
341 B
Tcl

package require x11
# With a display connection open, create and map a window
x display {
set w [x window new 10 10 100 100 KeyPress]
$w map
x eventloop ev {
expose {
# Paint the window
$w fill 20 20 10 10
$w text 10 50 "Hello, World!"
}
key {
# Quit the event loop
break
}
}
$w destroy
}