| ClearWindow | TCL UTILITIES USER MANUAL | ClearWindow |
|---|
| ClearWindow  |
|
| wnID | - | The iD of the window to clear. |
| Color | - | Optional input variable which allows the window background to be set to a color other that the canvas background color. The default is -1 to set to the canvas background color. When active the value must be between 0 and 255 which is an offset into the color table. |
# INITIALIZE the default gui settings
GUIprefsRead
# SET a window size
set GphInfo(xsScrL) 600
set GphInfo(ysScrL) 500
set GphInfo(xScrL) 600
set GphInfo(yScrL) 500
# START graphics
GraphicsOn TK RainBow SWAP
# SET UP 4 windows on the canvas.
GenWindow 0 0.0 0.0 0.0 0.48 0.48 0.0 -5.0 -5.0 0.0 5.0 5.0 0.0
GenWindow 1 0.0 0.52 0.0 0.48 1.0 0.0 -5.0 -5.0 0.0 5.0 5.0 0.0
GenWindow 2 0.52 0.0 0.0 1.0 0.48 0.0 -5.0 -5.0 0.0 5.0 5.0 0.0
GenWindow 3 0.52 0.52 0.0 1.0 1.0 0.0 -5.0 -5.0 0.0 5.0 5.0 0.0
# SET line color to green
PlotColor HOLD $GphInfo(Green) OFF
# OUTLINE EACH WINDOW
Box 0 -5.0 -5.0 0.0 5.0 5.0 0.0
Box 1 -5.0 -5.0 0.0 5.0 5.0 0.0
Box 2 -5.0 -5.0 0.0 5.0 5.0 0.0
Box 3 -5.0 -5.0 0.0 5.0 5.0 0.0
# IDENTIFY EACH WINDOW
TexT 0 0.0 0.0 0.0 center "WINDOW 0" $GphInfo(Red)
TexT 1 0.0 0.0 0.0 center "WINDOW 1" $GphInfo(Red)
TexT 2 0.0 0.0 0.0 center "WINDOW 2" $GphInfo(Red)
TexT 3 0.0 0.0 0.0 center "WINDOW 3" $GphInfo(Red)
# PAUSE graphics
ShowScreen
# CLEAR WINDOW 3
ClearWindow 3
| March 2, 2007 |
|---|