System object properties, events, and functions

Properties

Each system object has a number of properties associated with it that define its characteristics. For example, the CheckBox control has Height and Width properties that control its size and a BackColor property that controls its background color. You can set the value of object properties within scripts or with the object's Property sheets available within the painters.

Events

PowerBuilder applications are event-driven. For example, when a user clicks a button, chooses an item from a menu, or enters data into an edit box, an event is triggered. You write scripts using PowerScript, the PowerBuilder language, that specify the processing that should happen when the event is triggered. PowerBuilder passes arguments to events, such as the coordinates of the pointer, that help your application figure out what the user did to trigger the event. For most events, you can specify a return code to affect what happens next, such as triggering another event.

Controls, with the exception of the GroupBox and the drawing objects (Line, Oval, Rectangle, and RoundRectangle), always have events related to them. Some system objects, such as system structures, have no events associated with them.

Functions

PowerScript provides a rich assortment of built-in functions you can use to act upon the objects and controls in your application. For each system object, there is a set of these built-in functions that can act on it. You use these functions in scripts to manipulate the object.