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

GetMasterItemCount – PB Docs 2021 – PowerBuilder Library

GetMasterItemCount – PB Docs 2021

GetMasterItemCount

PowerScript function

Description

Determines the total number of the master menu items in the
application menu.

Applies to

RibbonApplicationMenu control

Syntax

Argument

Description

controlname

The name of the RibbonApplicationMenu control

ParentIndex (optional)

The index of the master menu item (RibbonMenuItem) whose
submenu items you want to count.

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

Return value

Long.

Returns the total number of menu items in the master menu. If the
master menu contains no items, returns 0. If an error occurs, returns -1.
If any argument’s value is null, returns null.

Usage

The master menu can have no more than two levels.

Examples

This example inserts an “Account” master menu and then inserts two
submenu items “Account Settings” and “Sign Out” under “Account”, and then
counts the number of the submenu items (which returns 2) and the master
menu item (which returns 1).

See also

AddMasterSeparatorItem

ClearRecentItems

DeleteMasterItem

DeleteRecentItem

GetMasterItem

GetRecentItem

GetRecentItemCount

GetRecentTitle

InsertMasterItem

InsertMasterItemFirst

InsertMasterItemLast

InsertRecentItem

InsertRecentItemFirst

InsertRecentItemLast

SetMasterItem

SetRecentItem

SetRecentTitle


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