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

Syntax 4: For RibbonMenu controls – PB Docs 2021 – PowerBuilder Library

Syntax 4: For RibbonMenu controls – PB Docs 2021

Syntax 4: For RibbonMenu controls

Description

Sets a menu item for a ribbon menu.

Applies to

RibbonMenu
control

Syntax

Argument

Description

controlname

The name of the RibbonMenu control in which you want to
set the menu item.

ParentIndex

The index of the menu item (RibbonMenuItem) whose
submenu item you want to set.

If not specified, the menu item will be set; if
specified to a valid value, the submenu item of the menu item
(whose index is ParentIndex) will be set; if specified to an
invalid value, an error would occur and this operation would
return -1.

Index

The index of the menu item or submenu item for which you
want to set. If index is invalid, an error would occur and
this operation would return -1.

Item

A RibbonMenuItem item you want to set. Only
RibbonMenuItem with “Normal(0)” or “Separator(1)” ItemType is
supported. If RibbonMenuItem is with other ItemType such as
“Recent(2)”, an error would occur and this operation would
return -1.

Return value

Integer.

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

Usage

Only menu items with the “Normal” or “Separator” type (that is
RibbonMenuItem with ItemType 0 or 1) can be added to the RibbonMenu
control.

A RibbonMenu control can contain menu items in no more than two
levels.

The user events to be bound with the menu item must be defined
correctly according to the requirements of RibbonMenuItem. For details,
see Clicked in PowerScript Reference and Selected in PowerScript Reference.

Examples

This example inserts the “MenuItem” menu and the “SubMenuItem”
submenu and then sets values for their properties (including Text,
PictureName, and Clicked etc.).

See also

AddSeparatorItem

DeleteItem

GetItem

GetItemCount

InsertItem

InsertItemFirst

InsertItemLast


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