<< Click to Display Table of Contents >> AddButton SEToolBarConfig |
![]() ![]() ![]() |
Purpose
Adds a new Button definition to the toolbar configuration.
All possible toolbar buttons have to be added with this method.
The order of the method calls has no meaning.
You define the order and the position of the displayed buttons with the assigns Default or Definition.
The user see all this buttons in the toolbar configuration dialog.
Prototype
METHOD AddButton(nBitmapID, nCommandID, cText, cTipText, dwStyle) CLASS SEToolBarConfig
Arguments
<nBitmapID> |
A numeric value representing the image index of the ribbon bitmap or the toolbar imagelist. In the SEToolBarConfig class this is the identifier for the toolbar button (nButtonID) and should be unique. |
<nCommandID> |
The command identifier of the toolbar button also called nMenuItemID. In the VO Toolbar class this ID is identical to the menu item ID. For the SEToolbar class this is not a must. |
[<cText>] |
The title of the toolbar button that is used if the button is displayed on the toolbar, in either of the TB_TEXTANDICON or TB_TEXTONLY styles. If not specified, the default is equal to the <cTipText> value. |
[<cTipText>] |
The tooltip text of the toolbar button. If not specified, the default is NULL_STRING. |
[<dwStyle>] |
The button style flags of the toolbar button. This can be one or more of the below toolbar button styles. The default is BTNS_BUTTON. |
Toolbar Button Styles
Note: A toolbar button can have a combination of the following styles. Not all styles can be combined.
Constants
BTNS_AUTOSIZE |
Specifies that the toolbar control should not assign the standard width to the button. Instead, the button's width will be calculated based on the width of the text plus the image of the button. |
BTNS_BUTTON |
Creates a standard button. |
BTNS_CHECK |
Creates a dual-state push button that toggles between the pressed and nonpressed states each time the user clicks it. The button has a different background color when it is in the pressed state. |
BTNS_CHECKGROUP |
Creates a button that stays pressed until another button in the group is pressed, similar to option buttons (also known as radio buttons). It is equivalent to combining BTNS_CHECK and BTNS_GROUP. |
BTNS_DROPDOWN |
Creates a drop-down style button that can display a list when the button is clicked. |
BTNS_GROUP |
When combined with BTNS_CHECK, creates a button that stays pressed until another button in the group is pressed. |
BTNS_NOPREFIX |
Specifies that the button text will not have an accelerator prefix associated with it. |
BTNS_SEP |
Creates a separator, providing a small gap between button groups. A button that has this style does not receive user input. |
BTNS_WHOLEDROPDOWN |
Specifies that the button will have a drop-down arrow, but not as a separate section. |