Posts the specified event for each tab page in a Tab control, adding them to the end of the event queues for the tab page user objects.

Applies to

Tab controls


tabcontrolname.TabPostEvent ( event {, word, long } )




The name of the Tab control for which you want to post events for its tab page user objects.


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



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 PostEvent).

Return value


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.


Suppose tab_address contains several tab pages inherited from uo_list and uo_list has a user event called ue_display. This statement posts the event ue_display for each the tab pages in tab_address:


See also