SetButtonInfo SEToolBar

<< Click to Display Table of Contents >>

Navigation:  SEUIXP Classes for X# > Classes > SEToolBar >

SetButtonInfo SEToolBar

Previous pageReturn to chapter overviewNext page

Purpose

Sets the properties of an existing toolbar button.

 

Prototype

METHOD SetButtonInfo(nMenuItemID, symTB, cTitle, bState, bStyle, nWidth, nImageIndex, nNewMenuItemID) CLASS SEToolBar

 

Arguments

<nMenuItemID>

The item ID of the existing toolbar button

[<symTB>]

The symbolic name of the toolbar. Default is #MainToolBar.

[<cTitle>]

The button text. If not specified, the actual value remains unchanged.

[<bState>]

State flags of the button. This can be one or more of the below toolbar button states. If not specified, the actual value remains unchanged.

[<bStyle>]

Style flags of the button. This can be one or more of the below toolbar button styles. If not specified, the actual value remains unchanged.

[<nWidth>]

Width of the button, in pixels. If not specified, the actual value remains unchanged.

[<nImageIndex>]

Image index of the button. Set this member to I_IMAGENONE to indicate that the button does not have an image. If not specified, the actual value remains unchanged.

[<nNewMenuItemID>]

The new item ID (Command identifier) of the button. If not specified, the actual value remains unchanged.

 

 

Toolbar Button States

This section lists the states a toolbar button can have. A toolbar may have a combination of states.

 

Constants

 

TBSTATE_CHECKED

The button has the TBSTYLE_CHECK style and is being clicked.

TBSTATE_ELLIPSES

The button's text is cut off and an ellipsis is displayed.

TBSTATE_ENABLED

The button accepts user input. A button that doesn't have this state is grayed.

TBSTATE_HIDDEN

The button is not visible and cannot receive user input.

TBSTATE_INDETERMINATE

The button is grayed.

TBSTATE_MARKED

The button is marked. The interpretation of a marked item is dependent upon the application.

TBSTATE_PRESSED

The button is being clicked.

TBSTATE_WRAP

The button is followed by a line break. The button must also have the TBSTATE_ENABLED state.

 

 

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.