SetTBStyle SEToolBar

<< Click to Display Table of Contents >>

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

SetTBStyle SEToolBar

Previous pageReturn to chapter overviewNext page

Purpose

Sets the style for the specified toolbar control.

The Toolbar mus be created, otherwise this function has no effect.

 

Prototype

METHOD SetTBStyle(kStyle, lEnable, symTB) CLASS SEToolBar

 

Arguments

<kStyle>

The toolbar style to set. Available styles see below.

[<lEnable>]

A logical value. TRUE turns the style on, FALSE turns it off. The default value is TRUE.

[<symTB>]

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

 

Return

SELF

 

 

Toolbar Control Styles

 

The following window styles are specific to toolbars. They are combined with other window styles when the toolbar is created.

Note For Common Controls version 6.00, if a visual style is being used with the toolbar, buttons are always transparent regardless of the style setting. Otherwise, transparency behavior is normal as indicated by the use of the TBSTYLE_FLAT or TBSTYLE_TRANSPARENT style.

 

Constants

 

TBSTYLE_ALTDRAG

Allows users to change a toolbar button's position by dragging it while holding down the ALT key. If this style is not specified, the user must hold down the SHIFT key while dragging a button. Note that the CCS_ADJUSTABLE style must be specified to enable toolbar buttons to be dragged.

 

TBSTYLE_CUSTOMERASE

Generates NM_CUSTOMDRAW notification messages when the toolbar processes WM_ERASEBKGND messages.

 

TBSTYLE_FLAT

Creates a flat toolbar. In a flat toolbar, both the toolbar and the buttons are transparent and hot-tracking is enabled. Button text appears under button bitmaps. To prevent repainting problems, this style should be set before the toolbar control becomes visible.

 

TBSTYLE_LIST

Creates a flat toolbar with button text to the right of the bitmap. Otherwise, this style is identical to TBSTYLE_FLAT. To prevent repainting problems, this style should be set before the toolbar control becomes visible.

 

TBSTYLE_REGISTERDROP

Generates TBN_GETOBJECT notification messages to request drop target objects when the cursor passes over toolbar buttons.

 

TBSTYLE_TOOLTIPS

Creates a ToolTip control that an application can use to display descriptive text for the buttons in the toolbar.

 

TBSTYLE_TRANSPARENT

Creates a transparent toolbar. In a transparent toolbar, the toolbar is transparent but the buttons are not. Button text appears under button bitmaps. To prevent repainting problems, this style should be set before the toolbar control becomes visible.

 

TBSTYLE_WRAPABLE

Creates a toolbar that can have multiple lines of buttons. Toolbar buttons can "wrap" to the next line when the toolbar becomes too narrow to include all buttons on the same line. When the toolbar is wrapped, the break will occur on either the rightmost separator or the rightmost button if there are no separators on the bar. This style must be set to display a vertical toolbar control when the toolbar is part of a vertical rebar control.