About properties of windows and controls

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 the 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 what information 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

Unless you identify the object or control when you refer to a property, PowerBuilder assumes you are referring to a property of the object or control the script is written for.

NoteThe 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.

All properties, events, and built-in functions for all PowerBuilder objects, including windows, and each type of control are described in Objects and Controls.