Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Define and bind user events with RibbonBar items – PB Docs 2021 – PowerBuilder Library

Define and bind user events with RibbonBar items – PB Docs 2021

Define and bind user events with RibbonBar items

The ribbon item controls have no events, you should define a
number of user events accordingly, move the scripts from the original
menu events to the user events, and then bind the user events with the
corresponding ribbon item control.

The ribbon item controls support the following user
events:

  • RibbonCheckBoxItem, RibbonLargeButtonItem, RibbonMenuItem,
    RibbonSmallButtonItem and RibbonTabButtonItem: You can create and
    bind the clicked and selected user events with them.

  • RibbonComboBoxItem: You can create and bind the modified,
    selected, and selection changed user events with it.

When defining a user event for the ribbon control, make sure the
argument (quantities and types) of the event is properly defined
according to the requirement of the ribbon control. If the number of
arguments or the argument type does not match with the requirement of
the ribbon control, the event will not be triggered.

For example, in the demo application, we want to create and bind
the clicked user event with the Order View large button. The
RibbonLargeButtonItem control requires that the clicked user event
have a long-type argument and return no value. Therefore, in the
rbb_1 RibbonBar control, we create an event
with its name as ue_orderview, argument name as
al_handle, argument type as
long, and the following script:

And then we bind the ue_orderview user
event with the clicked event of the Order View large button using this
script:

You can also bind the ue_orderview user
event with the clicked event of the Order View large button using the
XML file:

Different ribbon controls require different arguments and types
for the user event. For details, see the corresponding user
events:

Clicked in PowerScript Reference

Selected in PowerScript Reference

Modified in PowerScript Reference

SelectionChanged in PowerScript Reference


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x