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

SetMenu – PB Docs 2021 – PowerBuilder Library

SetMenu – PB Docs 2021

SetMenu

PowerScript function

Description

Sets a menu to the button in the RibbonBar control.

Applies to

RibbonApplicationButtonItem, RibbonTabButtonItem,
RibbonLargeButtonItem, RibbonSmallButtonItem controls

Syntax

For RibbonApplicationButtonItem:

For RibbonTabButtonItem, RibbonLargeButtonItem, and
RibbonSmallButtonItem:

Argument

Description

controlname

The name of the RibbonApplicationButtonItem,
RibbonTabButtonItem, RibbonLargeButtonItem, or
RibbonSmallButtonItem control.

ApplicationMenu

The RibbonApplicationMenu item you want to set.

Menu

The RibbonMenu item you want to set.

Return value

Integer.

Returns 1 if it succeeds and -1 if an error occurs. If any
argument’s value is null, returns null.

Usage

A RibbonApplicationMenu control can contain a master menu and a
recent menu. The master menu can have no more than two levels. The recent
menu can have only one level; and can contain no more than 9 items. Only
the menu item with the “Normal” or “Separator” type (that is
RibbonMenuItem with ItemType 0 or 1) can be added as a master menu item.
Only the menu item with the “Recent” type (that is RibbonMenuItem with
ItemType 2) can be added as a recent menu item. See InsertMasterItem and InsertRecentItem for more.

A RibbonMenu control can contain menu items in no more than two
levels. Only menu items with the “Normal” or “Separator” type (that is
RibbonMenuItem with ItemType 0 or 1) can be added to the RibbonMenu
control. See InsertItem for
more.

Example 1

This example sets a menu to the “MyApp” application button. The menu
includes an “Account” master menu item and a “RecentItem1” recent menu
item.

Example 2

This example sets a menu to a tab button. The menu includes an “Add”
menu item.

See also

GetMenu

GetMenuByButtonHandle


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