Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

integer array

Scroll pagebreak

Examples

Code Block
languagetext
// Get the position and size of the User Control

...


int $windowId;

...


int $controlId;

...


int $rect[4]; 

...


string  $height, $width;

...


 

...

// First create a User Window to place the Control on

...


$windowId = `createWindow "MyWindow"`;

...


 

...

// Create a Text Box Control in the window.

...


$controlId = `createTextBox $windowId`;

...


 

...

// Get the rect of the User Control. Since we haven't

...


// positioned it, it should be the default size, positioned

...


// at the top corner of the User Window (0, 0)

...


$rect = `getControlPos $controlId`;
  

...


// Calculate its width and height

...


$width = "width: " + string( $rect[2] - $rect[0] );

...


$height = "height: " + string( $rect[3] - $rect[1] );

...


print $width;

...


print $height;

Additional information

Related commands

...