SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 03-03-2006, 12:22 PM   #1
skywola
Registered User
 
skywola's Avatar
 
Join Date: Jan 2004
Location: Tempe, Arizona, USA
Posts: 224
Default 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;
__________________
"The Sage as an Astronomer: If you still see the stars as something above you, you lack the eye of knowledge." Friedrich Nietzsche
skywola is offline   Reply With Quote
Old 25-03-2006, 01:16 PM   #2
westiemad
Registered User
 
Join Date: Oct 2004
Posts: 27
Default

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
westiemad is offline   Reply With Quote
Old 25-03-2006, 04:37 PM   #3
skywola
Registered User
 
skywola's Avatar
 
Join Date: Jan 2004
Location: Tempe, Arizona, USA
Posts: 224
Default

Briefer code = better and clearer . . . . hats off to you . . .
__________________
"The Sage as an Astronomer: If you still see the stars as something above you, you lack the eye of knowledge." Friedrich Nietzsche
skywola is offline   Reply With Quote
New Thread

« Previous Thread | Next Thread »

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off