Setting the attributes of the window through window manager
The window manager is accessed from Tcl with the wm
command. The wm
command allows you to interact with the window manager to control the appearance and geometry of the window. The color, size, titles, and other attributes are controlled via this command. The wm
command accepts numerous keywords. The syntax is as follows:
wm keyword window arguments
How to do it…
In the following example, we will create a window and set the title and size to be displayed. Enter the following commands:
1 % wm title . "My Window" 2 % wm geometry . 320x240
At this point, your window should look like the following:
How it works…
The wm
command alters the appearance of the window, based on the keywords and options specified.