GetItemParent
PowerScript function
Description
Gets the parent item (Category, Panel, and Group) in the RibbonBar
control.
Applies to
RibbonBar controls
Syntax
|
1 |
controlname.GetItemParent ( Long ItemHandle, ref PowerObject Item ) |
|
Argument |
Description |
|---|---|
|
controlname |
The name of the RibbonBar control. |
|
ItemHandle |
The handle of the child item whose parent item you want to |
|
Item |
A PowerObject variable in which you want to store the |
Return value
Integer.
Returns 1 if it succeeds and -1 if an error occurs. If any
argument’s value is null, returns null.
Usage
The parent object can be Category, Panel, or Group.
The child item for Category is Panel; the child item for Panel can
be Group, LargeButton, SmallButton, CheckBox, and ComboBox; the child item
for Group can be SmallButton, CheckBox, and ComboBox.
Example 1
This example gets the category and stores it in
lr_Category variable of type RibbonCategoryItem.
|
1 2 3 4 5 6 7 |
Integer li_Return Long ll_Handle_Category, ll_Handle_panel RibbonCategoryItem lr_Category ll_Handle_Category = rbb_1.InsertCategoryFirst ("TestCategory") ll_Handle_Panel = rbb_1.InsertPanelFirst (ll_Handle_Category, "TestPanel", "EmployeeSmall!") li_Return = rbb_1.GetItemParent (ll_Handle_Panel, lr_Category) |
Example 2
This example gets the category and stores it in
lpo_Object variable of type PowerObject.
|
1 2 3 4 5 6 7 |
Integer li_Return Long ll_Handle_Category, ll_Handle_panel PowerObject lpo_Object ll_Handle_Category = rbb_1.InsertCategoryFirst ("TestCategory") ll_Handle_Panel = rbb_1.InsertPanelFirst (ll_Handle_Category, "TestPanel", "EmployeeSmall!") li_Return = rbb_1.GetItemParent (ll_Handle_Panel, lpo_Object) |
See also