Description
Gets the parent item (Category, Panel, and Group) in the RibbonBar control.
Applies to
Syntax
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 obtain. |
Item |
A PowerObject variable in which you want to store the parent item. |
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.
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.
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