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

GetItemCount – PB Docs 2019 – PowerBuilder Library

GetItemCount – PB Docs 2019

GetItemCount

PowerScript function

Description

Determines the total number of items in a ribbon menu.

Applies to

RibbonMenu controls

Syntax

Argument

Description

controlname

The name of the RibbonMenu control

ParentIndex

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

If not specified, the menu item will be counted; if
specified to a valid value, the submenu items of the 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 menu. If the menu
contains no items, returns 0. If an error occurs, returns -1. If any
argument’s value is null, returns null.

Usage

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

Examples

This example counts the menu item (which returns 1) and its submenu
items (which returns 2).

See also

AddSeparatorItem

DeleteItem

GetItem

InsertItem

InsertItemFirst

InsertItemLast

SetItem


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