Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Programming (https://simplymaya.com/forum/forumdisplay.php?f=32)
-   -   Size Of A Window (https://simplymaya.com/forum/showthread.php?t=20464)

skywola 03-03-2006 01:22 PM

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;

westiemad 25-03-2006 02:16 PM

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

skywola 25-03-2006 05:37 PM

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