When you build a user object, you can write scripts for any event associated with that user object.
Events in class user objects
Most custom class user objects have only constructor and destructor events.
Standard class user objects have the same events as the PowerBuilder system object from which they inherit.
Events in visual user objects
Standard visual user objects have the same events as the PowerBuilder control from which they inherit. Custom and external visual user objects have a common set of events.
Event |
Occurs when |
---|---|
Constructor |
Immediately before the Open event of the window and when the user object is dynamically placed in a window |
Destructor |
Immediately after the Close event of the window and when the user object is dynamically removed from a window |
DragDrop |
A dragged object is dropped on the user object |
DragEnter |
A dragged object enters the user object |
DragLeave |
A dragged object leaves the user object |
DragWithin |
A dragged object is moved within the user object |
Help |
A user presses the F1 key or clicks the context Help button [?] on the title bar of the window with which the menu is associated and then points and clicks on a menu item |
Other |
A Windows message occurs that is not a PowerBuilder event |
RButtonDown |
The right mouse button is pressed |
For more about drag and drop, see Application Techniques.