|
Object Constants |
Top Previous Next |
|
ObjectX(ObjectLabel) returns X (horizontal) position of specified object Position retrieving starts from upper-left corner of project's window. Returned position represents object's upper-left corner. Specifying of object you want position for is done through label inside parenthesis. For example: ObjectX(Button)
Script example:
Script line above will retrieve upper-left corner X position of object labeled "Button"
ObjectY(ObjectLabel) returns Y (vertical) position of specified object Position retrieving starts from upper-left corner of project's window. Returned position represents object's upper-left corner. Specifying of object you want position for is done through label inside parenthesis. For example: ObjectY(Button)
Script example:
Script line above will retrieve upper-left corner Y position of object labeled "Button"
ObjectWidth(ObjectLabel) returns width of specified object in pixels Width retrieving starts from object's upper-left corner Specifying of object you want width for is done through label inside parenthesis. For example: ObjectWidth(Button)
Script example:
Script line above will retrieve width of object labeled "Button"
ObjectHeight(ObjectLabel) returns height of specified object in pixels Height retrieving starts from object's upper-left corner Specifying of object you want height for is done through label inside parenthesis. For example: ObjectHeight(Button)
Script example:
Script line above will retrieve height of object labeled "Button"
CurrentObject() returns name of current object from which is this function called. Script example:
For example, if this function is placed in object called "TextBTN", it will return "TextBTN" string. It's good mainly in case you want copy/paste an object multiple times, especially if there is reference to a current object inside the script.
IsVisible(ObjectLabel) this constant will check if specified object exists on current page and is it visible or hidden Integer value is returned, having one of three available states:
Specifying of object you want status for is done through label inside parenthesis. Script example: Message("Object status : ","IsVisible(Button)") Example above will check if object labeled "Button" exists and is it visible or hidden. If object doesn't exist, message box will display "-1".
ImageScrollX(ObjectLabel) returns X position of left/top point of the image inside the Image object. This is useful in case if image inside the Image object is bigger/smaller than Image object itself and it's scrollable inside the Image object ("Keep Actual Image Size" option must be enabled). ImageScrollX returns negative values if left/top corner of the image object is out of the visible area of the Image object.
Script example:
Script line above will retrieve X position of Left/Top corner of Bitmap.
ImageScrollY(ObjectLabel) returns Y position of left/top point of the image inside the Image object. This is useful in case if image inside the Image object is bigger/smaller than Image object itself and it's scrollable inside the Image object ("Keep Actual Image Size" option must be enabled). ImageScrollY returns negative values if left/top corner of the image object is out of the visible area of the Image object.
Script example:
Script line above will retrieve Y position of Left/Top corner of Bitmap.
ImageWidth(ObjectLabel) returns full width of image in pixels. While ObjectWidth returns width of the object, ImageWidth returns width of entire Image, even if some parts of Image are invisible (because image is bigger than Image object). Specifying of image you want width for is done through label inside parenthesis. For example: ImageWidth(Bitmap)
Script example:
Script line above will retrieve width of image labeled "Bitmap"
ImageHeight(ObjectLabel) returns full height of image in pixels. While ObjectHeight returns height of the object, ImageHeight returns height of entire Image, even if some parts of Image are invisible (because image is bigger than Image object). Specifying of image you want height for is done through label inside parenthesis. For example: ImageHeight(Bitmap)
Script example:
Script line above will retrieve height of image labeled "Bitmap"
GetImageOpacity(ObjectLabel) returns current opacity of a given Bitmap object. The ImageOpacity can be set both in a design time (via Bitmap properties dialog) or runtime (via ImageOpacity command). Script example:
ScrollBarSize(ObjectLabel) returns width (if ScrollBar is vertical) or height (if ScrollBar is horizontal) of image ScrollBar in pixels. It's useful in cases when ScrollBar in Image object is enabled and you want to know the size of Image object including the ScrollBars. ScollBar size can be different on various OS. Script example:
Script line above will retrieve size of ScrollBar from image object labeled "Bitmap"
GetVideoParam(ObjectLabel) returns the current state (0/1 = OFF/ON) of a given video parameter:
Script example:
|