Size Of A Window
How to control the size of a window . . .
string $window = `window -title "Window Sizing"`; columnLayout -adjustableColumn true; button -label "Do Nothing"; button -label "Close" -command ("deleteUI -window " + $window); setParent ..; showWindow $window; // Here is the code that controls the size . . window -edit -widthHeight 228 156 $window; |
actually there are 2 easier ways to do this, well one, firstly
string $myWin = `window -width 100 -height 250 -sizeable 1 coolWindow`; showWindow $myWin; This saves u editing the window. Secondly create this window and drag it to a size you want. Now in the script editor enter: window -q -wh $myWin; This will spit out the size that u have manually resized the window to, just enter these into the first bit of code. (We could have used the -wh flag in the first example, -wh 100 250) AnDy |
Briefer code = better and clearer . . . . hats off to you . . .
|
All times are GMT. The time now is 02:24 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018