Description
Inserts a panel as the last item in the category of the RibbonBar control.
Applies to
Syntax
controlname.InsertPanelLast (Long CategoryHandle, String Text, String PictureName )
controlname.InsertPanelLast (Long CategoryHandle, RibbonPanelItem Item )
Argument |
Description |
---|---|
controlname |
The name of the RibbonBar control. |
CategoryHandle |
The handle of the category into which you want to insert a panel. |
Text |
The title of the panel to be inserted. |
PictureName |
The name of the file that contains the picture. It will be displayed as 16*16. The picture will be shown when the panel is collapsed (a panel is collapsed automatically when the window width becomes too small to display the panel). See the section called “Introduction to RibbonBar items” in Users Guide for more. |
Item |
A panel item to be inserted. |
Return value
Long.
Returns the handle of the inserted item if it succeeds and -1 if an error occurs. If any argument's value is null, returns null.
Example 1
This example inserts the "MyPanel" panel as the last item in the "MyCategory" category.
Long ll_Handle_Category,ll_Handle_Panel ll_Handle_Category = rbb_1.InsertCategoryFirst ("MyCategory") ll_Handle_Panel = rbb_1.InsertPanelLast (ll_Handle_Category, "MyPanel", "AddSmall!")
Example 2
This example also inserts the "MyPanel" panel as the last item in the "MyCategory" category. It first defines a panel item with various properties (including Text, PictureName etc.) and then inserts it as the last item in the "MyCategory" category.
Long ll_Handle_Category, ll_Handle_Panel RibbonPanelItem lr_Panel ll_Handle_Category = rbb_1.InsertCategoryFirst ("MyCategory") lr_Panel.Text = "MyPane3" lr_Panel.PictureName = "BOMSmall!" ll_Handle_Panel = rbb_1.InsertPanelLast (ll_Handle_Category, lr_Panel)
See also