|
|
|
|
|
Specifying 1 means it is resizable, and 0 means it is nonresizable in the specified direction. If you don't specify any arguments, resizable returns a list with two items. The first item is a 1 or 0 and indicates whether if the width is resizable. The second item is a 1 or 0 and indicates whether if the height is resizable. By default, a window is resizable in both directions. |
|
|
|
|
|
|
|
|
You can use the aspect method to force the window to stay a certain width and height: |
|
|
|
 |
|
|
|
|
$toplevel->aspect( [ minN, minD, maxN, maxD ]); |
|
|
|
|
|
|
|
|
The aspect method does some very subtle things, and you'll probably never use it. If you do, play around with different values (starting with the example below) to get the effect you want |
|
|
|
|
|
|
|
|
When you use the aspect method with no arguments, it returns either an empty string (if there are no constraints to the aspect of the window) or an array containing four elements: |
|
|
|
 |
|
|
|
|
($minN, $minD, $maxN, $maxD) = $toplevel->aspect; |
|
|
|
|
|
|
|
|
Using these values, you can see how aspect controls the window: |
|
|
|
 |
|
|
|
|
($minN/$minD) < width/height < ($maxN/$maxD) |
|
|
|
|
|
|
|
|
You can also send four empty strings to unset the aspect restrictions on the window. Try using $toplevel->aspect(1,2,3,1); the effect is subtle. |
|
|
|
|
|
|
|
|
You can change the text across the top of the window by using the title method: |
|
|
|
 |
|
|
|
|
$toplevel->title("This will be the title"); |
|
|
|
|
|
|
|
|
Pass a string in with title and the new title will appear immediately in the window, assuming the window is currently visible. If you don't pass an argument with title, the current title string is returned. For the X Window System, the default title of a window is the name used to run the program, and the first character of the name is uppercase. For Microsoft Windows, the title always starts out as Toplevel. |
|
|
|
|
|
|
|
|
The deiconify method causes the toplevel to be displayed noniconified or deiconifies it immediately if the window has already been displayed once. If the window |
|
|
|
|