In scripts, you can assign values to the properties of objects and controls to change their appearance or behavior. You can also test the values of properties to obtain information about an object.
For example, you can change the text displayed in a StaticText control when the user clicks a CommandButton, or use data entered in a SingleLineEdit to determine the information that is retrieved and displayed in a DataWindow control.
To refer to properties of an object or control, use dot notation to identify the object and the property:
object.property
control.property
If you do not identify the object or control when you refer to a property, PocketBuilder assumes you are referring to the object or control the script is written for.
The reserved word Parent In the script for a window control, you can use the reserved word Parent to refer to the window containing the control. For example, the following line in a script for a CommandButton closes the window containing the button:
close(Parent)
It is easier to reuse a script if you use Parent instead of the name of the window.
Properties, events, and built-in functions for all PowerBuilder objects, including windows, and all types of controls are described in Objects and Controls. In most cases, descriptions apply to properties, events, and built-in functions for PocketBuilder objects. Differences between PowerBuilder and PocketBuilder are described in Appendix B, “PowerBuilder and PocketBuilder Product Differences,” of this Users Guide.