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

GetItemByTag – PB Docs 2022 – PowerBuilder Library

GetItemByTag – PB Docs 2022

GetItemByTag

PowerScript function

Description

Gets an item according to its tag in the RibbonBar control.

Applies to

RibbonBar
control

Syntax

Argument

Description

controlname

The name of the RibbonBar control.

Tag

The tag value of the item you want to obtain.

Item

A PowerObject variable in which you want to store the item
identified by the tag.

Return value

Integer.

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

Usage

You can also get an item according to its handle by using the GetItem function.

The GetItemByTag and GetItem
functions can be used to get items including ApplicationButton, TabButton,
Category, Panel, Group, LargeButton, SmallButton, CheckBox, and ComboBox;
but cannot get RibbonMenuItem, RibbonApplicationMenu, and RibbonMenu. To
get RibbonMenuItem, you can use the GetItem Syntax 4, GetMasterItem, and GetRecentItem functions. To get
RibbonApplicationMenu and RibbonMenu, you can use the GetMenu and GetMenuByButtonHandle
functions.

The GetItemByTag function finds the first item that matches with the
tag. It searches in the following order of priority:
RibbonApplicationButtonItem > RibbonTabButtonItem >
RibbonCategoryItem > RibbonPanelItem > RibbonGroupItem >
RibbonLargeButtonItem > RibbonSmallButtonItem > RibbonCheckBoxItem
> RibbonComboBoxItem. The controls at high level has priority over
those at low level. RibbonBar is at the first-level (the highest level);
ApplicationButton, Category, and TabButton are at the second-level; Panel
is at the third-level, what is contained in the Panel is at the
fourth-level, and what is contained in the Group is at the fifth-level
(the lowest level).

Example 1

This example gets the application button by the tag value:

Example 2

This example inserts a large button and a small button with the same
tag value “AddTag”, and then searches the item by the tag value “AddTag”.
The large button will be returned because the large button is searched
before the small button according to the search priority.

See also

GetChildItemByIndex

GetChildItemCount

GetItemParent


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