InsertPanel
PowerScript function
Description
Inserts a panel in the category of the RibbonBar control.
Applies to
Syntax
|
1 |
controlname.InsertPanel ( Long CategoryHandle, Long ItemHandleAfter, String Text, String PictureName ) |
|
1 |
controlname.InsertPanel ( Long CategoryHandle, Long ItemHandleAfter, RibbonPanelItem Item ) |
|
Argument |
Description |
|---|---|
|
controlname |
The name of the RibbonBar control. |
|
CategoryHandle |
The handle of the category into which you want to insert a |
|
ItemHandleAfter |
The handle of the panel on the same level after which you |
|
Text |
The title of the panel to be inserted. |
|
PictureName |
The name of the file that contains the picture. It will be |
|
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 “MyPanel2” panel after “MyPanel1” in the
“MyCategory” category.
|
1 2 3 4 5 |
Long ll_Handle_Category, ll_Handle_Panel, ll_Handle_Panel2 ll_Handle_Category = rbb_1.InsertCategoryFirst ("MyCategory") ll_Handle_Panel = rbb_1.InsertPanelFirst (ll_Handle_Category, "MyPanel1", "AddSmall!") ll_Handle_Panel2 = rbb_1.InsertPanel (ll_Handle_Category, ll_Handle_Panel, "MyPanel2", "BOMSmall!") |
Example 2
This example also inserts the “MyPanel2” panel after “MyPanel1” in
the “MyCategory” category. It first defines a panel item with various
properties (including Text, PictureName etc.) and then inserts it after
“MyPanel1” in the “MyCategory” category.
|
1 2 3 4 5 6 7 8 |
Long ll_Handle_Category,ll_Handle_Panel,ll_Handle_Panel2 RibbonPanelItem lr_Panel ll_Handle_Category = rbb_1.InsertCategoryFirst ("MyCategory") ll_Handle_Panel = rbb_1.InsertPanelFirst (ll_Handle_Category, "MyPanel1", "AddSmall!") lr_Panel.Text = "MyPanel2" lr_Panel.PictureName = "BOMSmall!" ll_Handle_Panel2 = rbb_1.InsertPanel (ll_Handle_Category, ll_Handle_Panel, lr_Panel) |
See also