Description
Triggers the specified event for each tab page in a Tab control, which executes the scripts immediately in the index order of the tab pages.
Applies to
Tab controls
Syntax
tabcontrolname.TabTriggerEvent ( event {, word, long } )
Argument |
Description |
---|---|
tabcontrolname |
The name of the Tab control for which you want to trigger events for its tab page user objects. |
event |
A value of the TrigEvent enumerated datatype that identifies a PowerBuilder event (for example, Clicked!, Modified!, or DoubleClicked!) or a string whose value is the name of an event. The event must be a valid event for a tab page user object in tabcontrolname and a script must exist for the event in tabcontrolname. |
word (optional) |
A long value to be stored in the WordParm property of the system's Message object. If you want to specify a value for long, but not word, enter 0. (For cross-platform compatibility, WordParm and LongParm are both longs). |
long (optional) |
A long value or a string that you want to store in the LongParm property of the system's Message object. When you specify a string, a pointer to the string is stored in the LongParm property, which you can access with the String function (see Usage for TriggerEvent). |
Return value
Integer.
Returns 1 if it succeeds and -1 if an error occurs, if the event is not a valid event for the tab page user object, or if a script does not exist for the event.
Examples
Suppose tab_address contains several tab pages inherited from uo_list and uo_list has a user event called ue_display. This statement executes immediately the script for ue_display for each the tab pages in tab_address:
tab_address.TabTriggerEvent("ue_display")
See also