InsertCheckBoxLast
PowerScript function
Description
Inserts a check box as the last item in the panel or group of the
RibbonBar control.
Applies to
Syntax
|
1 |
controlname.InsertCheckBoxLast ( Long ParentHandle, String Text, String Clicked ) |
|
1 |
controlname.InsertCheckBoxLast ( Long ParentHandle, RibbonCheckBoxItem Item ) |
|
Argument |
Description |
|---|---|
|
controlname |
The name of the RibbonBar control. |
|
ParentHandle |
The handle of the panel or group into which you want to |
|
Text |
The text that displays in the check box. |
|
Clicked |
The name of the Clicked user event to be bound with the |
|
Item |
A check box 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.
Usage
The user events to be bound with the check box must be defined
correctly according to the requirements of RibbonCheckBoxItem. For
details, see Clicked in PowerScript Reference and Selected in PowerScript Reference.
Example 1
This example inserts the “MyCheckBox3” check box as the last item in
a panel and binds it with the “Ue_CheckBoxClicked” user event, and then
inserts the “MyCheckBox4” check box as the last item in a group and binds
it with the same “Ue_CheckBoxClicked” user event.
|
1 2 3 4 5 6 7 8 |
Long ll_Handle_Category, ll_Handle_Panel, ll_Handle_CheckBox, ll_Handle_Group ll_Handle_Category = rbb_1.InsertCategoryFirst ("MyCategory") ll_Handle_Panel = rbb_1.InsertPanelFirst (ll_Handle_Category, "MyPanel", "AddSmall!") ll_Handle_CheckBox = rbb_1.InsertCheckBoxLast (ll_Handle_Panel, "MyCheckBox3", "Ue_CheckBoxClicked") //Group ll_Handle_Group = rbb_1.InsertGroupLast (ll_Handle_Panel) ll_Handle_CheckBox = rbb_1.InsertCheckBoxLast (ll_Handle_Group, "MyCheckBox4", "Ue_CheckBoxClicked") |
Example 2
This example inserts the “MyCheckBox3” check box as the last item in
a panel and binds it with the “Ue_CheckBoxClicked” and
“Ue_CheckBoxSelected” user events. It first defines a check box item with
various properties (including Text, Clicked, Selected etc.) and then
inserts it as the first item in a panel.
|
1 2 3 4 5 6 7 8 9 |
Long ll_Handle_Category, ll_Handle_Panel, ll_Handle_CheckBox RibbonCheckBoxItem lr_CheckBox ll_Handle_Category = rbb_1.InsertCategoryFirst ("MyCategory") ll_Handle_Panel = rbb_1.InsertPanelFirst (ll_Handle_Category, "MyPanel", "AddSmall!") lr_CheckBox.Text = "MyCheckBox3" lr_CheckBox.Clicked = "Ue_CheckBoxClicked" lr_CheckBox.Selected = "Ue_CheckBoxSelected" ll_Handle_CheckBox = rbb_1.InsertCheckBoxLast (ll_Handle_Panel, lr_CheckBox) |
See also