Copyright: Copyright © 1998-2006 Developer Express Inc.  ALL RIGHTS RESERVED.


Overview
ExpressBars Overview

The ExpressBars Suite of components allows you to visually develop menus, toolbars, and popup menus.

All ExpressBars objects are divided into two distinct groups: visual and non-visual.  The non-visual group defines the style and properties of the object.  The visual group of elements represents objects on screen based on information obtained from non-visual elements.  Elements in the visual and non-visual groups work together to represent the object to a user.

All objects you see within the customization form list (buttons, combo boxes, edit controls, etc.), describe non-visual elements called items.  Items are non-visual elements that contain methods and properties of the object and process specific object events.  Item defines an object’s response to mouse clicks or key press events.  Properties displayed within the Object Inspector are item properties.

An item appears on screen as a control called an item control.  When you drop an item onto a toolbar, an item control is created on the toolbar.  In other words, item control represents the item on the bar controls (the phrase ‘bar controls’ refers to all controls that look like a toolbar, e.g. submenus).  Item control defines only the look of an item on screen, but all processing is defined by the item.

Every toolbar on screen, like other objects, is based on a non-visual bar object.  This non-visual bar object includes references to all elements that appear on the toolbar.  When you drop an object onto a toolbar, an item control is created on this toolbar and a link is established between the item and the item control.  The non-visual bar element refers to the item via a link called item link.  The item link also defines the look of the item control on the toolbar.  It contains information about the item, the bar containing this item link, and the item control itself.

One item may correspond to several item controls on different toolbars.  For example, you can create one ‘Open file’ button and place it on different toolbars.  If you want to place the same item on different toolbars and these corresponding item controls must look different, use an item link to customize the look of the particular item control.

The following figure explains the role of item link:

Use the customizing popup menu to customize the appearance of a particular item control on screen.  To call the customizing popup menu, click the right mouse button on an item control.

Note:	Some items may be presented on the toolbar by different item controls, that is, the way an item appears on screen depends on information from the item link, the bar control type and bar control location.

Items are collected into the groups.  Item groups are called the categories.  Grouping items into the categories allows you to easily configure item properties and to make item behavior management more convenient.

The TdxBarManager object is a form component that manages items and toolbars.  A ‘central storage’ contains information about all available items and all existing toolbars.  Every form that uses the ExpressBar toolbars must include TdxBarManager.  A given form may contain only a single TdxBarManager, but within an application each form may include its own TdxBarManager.  The list of TdxBarManager objects is stored within the TdxBarManagerList object.

The figure below describes the relationship between non-visual form objects:

The ExpressBars allows you to use external dock controls. The external dock control is an addition to internal default dock controls of a bar manager.  You can place the external dock control to any position on a form or panel and then embed a toolbar within it.  Visually this control appears as a rectangle on the top/bottom/right/left side of the form or floats over it.


dxBar Unit

Components

TdxBarPopupMenu

TdxBarManager

Items

TCustomdxBarCombo

TCustomdxBarContainerItem

TCustomdxBarSubItem

TdxBarButton

TdxBarCombo

TdxBarContainerItem

TdxBarCustomCombo

TdxBarEdit

TdxBarItem

TdxBarListItem

TdxBarSubItem

TdxBarWindowItem

Item Controls

TCustomdxBarComboControl

TdxBarButtonControl

TdxBarComboControl

TdxBarContainerItemControl

TdxBarEditControl

TdxBarItemControl

TdxBarSubItemControl

TdxBarWinControl

Objects

TCustomdxBarControl

TdxBarBackgrounds

TdxBarControl

TdxBarDockControl

TdxBarGroup

TdxBarItemLink

TdxBarItemLinks

TdxBarManagerList

TdxBarPopupMenuItemLinks

TdxBarPopupMenuLink

TdxBars

TdxBarSubMenuControl

TdxBar

TdxDockCol

TdxDockControl

TdxDockRow

Procedures

ActiveBarControl

dxBarRegisterItem

dxBarUnregisterItem

GetBarManagerByForm

IsVertical

Variables

dxBarHintWindowClass

dxBarManagerList


TdxBarManager

Hierarchy          Properties           Methods           Events

TdxBarManager is the main component which encapsulates information on all toolbars and items.

Unit

dxBar

Description

TdxBarManager is a non-visual component that allows users to create, delete and modify basic components such as:

Toolbars

Categories

Items

It allows you to modify the default behavior of the interface including elements such as:

Menu Animation Effects

Button-Glyph Scaling

Font Manipulation


Hierarchy

TÑomponent

|


TdxBarManager Properties

TdxBarManager               Legend

In TdxBarManager

AllowCallFromAnotherForm

AllowReset

AlwaysMerge

AlwaysSaveText

AutoDockColor

AutoHideEmptyBars

Backgrounds

 	BarControlFocused

Bars

 	BeforeFingersSize

ButtonArrowWidth

 	ButtonHeight

 	ButtonWidth

CanCustomize

Categories

CategoryItemsVisible

CategoryVisible

Designing

DisabledImages

DisabledLargeImages

DockColor

DockControlCount

DockControls

 	Dragging

 	DraggingItem

 	DraggingItemLink

 	FingersSize

FlatCloseButton

 	FocusedBarControl

Font

 	GlyphSize

GroupCount

Groups

HelpButtonGlyph

HelpContext

HotImages

Images

ImageListBkColor

IniFileName

IsCustomizing

ItemCount

Items

LargeButtonArrowWidth

LargeIcons

LargeImages

LockUpdate

LookAndFeel

MainForm

MainMenuBar

MainMenuControl

MakeDisabledImagesFaded

MenuAnimations

MenusShowRecentItemsFirst

Modified

MostRecentItemsPercents

NotDocking

PopupMenuLinks

 	RealButtonArrowWidth

RegistryPath

Scaled

SelectedItem

ShowCloseButton

ShowFullMenusAfterDelay

ShowHelpButton

ShowHint

ShowHintForDisabledItems

ShowShortCutInHint

StoreInIniFile

StoreInRegistry

StretchGlyphs

Style

SubMenuBeginGroupIndent

SunkenBorder

UseF10ForMenu

UseFullReset

UseSystemFont

WaitForDockingTime


TdxBarManager Methods

TdxBarManager               Legend

In TdxBarManager

BarByCaption

BarByName

Create

CreateGroup

CreateToolbarsPopupList

Customizing

Destroy

DoBarAfterReset

DoBarBeforeReset

DoBarClose

DoBarDockingStyleChanged

DoClickItem

DoCloseButtonClick

DoDocking

DoHelpButtonClick

DoShowCustomizingPopup

DoShowToolbarsPopup

ExchangeItems

GetAllItemsByCategory

GetCountByCategory

GetItemByCategory

GetItemByName

GetItemsByCategory

HideAll

LoadFromIniFile

LoadFromRegistry

LoadFromStream

MoveItem

ResetUsageData

ResetUsageDataWithConfirmation

SaveToIniFile

SaveToRegistry

SaveToStream


TdxBarManager Events

TdxBarManager               Legend

In TdxBarManager

OnBarAdd

OnBarAfterReset

OnBarBeforeReset

OnBarClose

OnBarDelete

OnBarDockingStyleChange

OnBarVisibleChange

OnClickItem

OnCloseButtonClick

OnDocking

OnHelpButtonClick

OnHideCustomizingForm

OnItemLinkAdd

OnItemLinkChange

OnItemLinkDelete

OnMenuMerge

OnShowCustomizingForm

OnShowCustomizingPopup

OnShowToolbarsPopup


TdxBarManager.Modified

TdxBarManager

Determines whether a user has made changes to the layout of a toolbar and item controls.

property Modified: Boolean;

Description

Use this property if you save toolbar settings manually.  If Modified is set to True, a user changed the layout of the toolbar and item controls and therefore your application must save these changes to the Registry or INI file.

Note:	Be sure to set Modified to False after saving changes.


TdxBarManager.AllowCallFromAnotherForm

TdxBarManager

Enables a user to activate items of the main application form when another application form is focused.

property AllowCallFromAnotherForm: Boolean;

Description

AllowCallFromAnotherForm allows you to activate items of the main application form when a different form of the same application has focus.  Said differently, the bar manager of the main form tracks short-cut press events in different forms of the current application.

The bar manager of the main form processes shortcut keys executed from another form if:

 - A form is a MDI child form and incorporates either a main menu or a bar manager.

or

- A form is neither the MDI Parent nor MDI Child form and does not contain a bar manager.

Use the AllowCallFromAnotherForm property when developing MDI applications to avoid using duplicate code and centralized shortcut processing.


TdxBarManager.AlwaysSaveText

TdxBarManager

Determines whether items automatically save edited values on exit.

property AlwaysSaveText: Boolean;

Description

If the AlwaysSaveText property is True, an item control automatically saves its edited value upon losing focus.  The value is always saved and is not dependant on how a user exits the item control.

Note: Pressing ESC does not save the edited value.

If AlwaysSaveText is False, press ENTER (or TAB/Shift+TAB if a toolbar contains other controls that can accept focus) to save the edited value.


TdxBarManager.CreateToolbarsPopupList

TdxBarManager

Creates a list of links where each link corresponds to a specific toolbar.

procedure CreateToolbarsPopupList(ItemLinks: TdxBarItemLinks);

Description

Only toolbars whose Hidden property is set to False can be added to a list of links.  The generated list is used when activating a toolbar’s popup menu.  CreateToolbarsPopupList calls the DoShowToolbarsPopup method which generates the OnShowToolbarsPopup event.  Use the OnShowToolbarPopup event handler to customize the toolbars list.


TdxBarManager.DoBarAfterReset

TdxBarManager          See Also

procedure DoBarAfterReset(ABar: TdxBar); dynamic;

Description

This method is called following a call to the Reset method of a toolbar specified by ABar.  DoBarAfterReset generates an OnBarAfterReset event of the bar manger to which ABar belongs.


TdxBarManager.DoBarBeforeReset

TdxBarManager          See Also

procedure DoBarBeforeReset(ABar: TdxBar); dynamic;

Description

This method is called before calling the Reset method of a toolbar specified by ABar.  DoBarAfterReset generates the OnBarAfterReset event of the bar manger to which ABar belongs.


TdxBarManager.DoBarClose

TdxBarManager          See Also

procedure DoBarClose(ABar: TdxBar); dynamic;

Description

This method generates an OnBarClose event when closing a toolbar, specified by ABar (the toolbar is closed when pressing the Close button in its upper rightmost corner).


TdxBarManager.DoBarDockingStyleChanged

TdxBarManager          See Also

procedure DoBarDockingStyleChanged(ABar: TdxBar); dynamic;

Description

This method generates the OnBarDockingStyleChanged event when the toolbar, specified by the ABar parameter, changes its docking style.


TdxBarManager.DoHelpButtonClick

TdxBarManager          See Also

procedure DoHelpButtonClick; dynamic;

Description

This method generates an OnHelpButtonClick event when a user presses the Help button in the customization form.


TdxBarManager.DoShowCustomizingPopup

TdxBarManager          See Also

procedure DoShowCustomizingPopup(PopupItemLinks: TdxBarItemLinks); dynamic;

Description

Generates an OnShowCustomizingPopup event.  PopupItemLinks are item links in the customizing popup menu.  Use this method to perform specific actions immediately before generating the OnShowCustomizingPopup event, for example, to add, delete or modify certain items in the customizing popup menu.


TdxBarManager.DoShowToolbarsPopup

TdxBarManager          See Also

procedure DoShowToolbarsPopup(PopupItemLinks: TdxBarItemLinks); dynamic;

Description

Generates the OnShowToolbarsPopup event.


TdxBarManager.OnBarAfterReset

TdxBarManager          See Also

Occurs after calling the Reset method of a TdxBar object.

type

  TdxBarEvent = procedure(Sender: TdxBarManager; ABar: TdxBar) of object;

property OnBarAfterReset: TdxBarEvent;

Description

This event is generated after calling the Reset method of a toolbar specified by ABar.  ABarManager is the bar manager to which ABar belongs.


TdxBarManager.OnBarBeforeReset

TdxBarManager          See Also

Occurs before calling the Reset method of a TdxBar object.

type

  TdxBarEvent = procedure(Sender: TdxBarManager; ABar: TdxBar) of object;

property OnBarAfterReset: TdxBarEvent;

Description

This event is generated before calling the Reset method of a toolbar specified by ABar.  ABarManager is the bar manager to which ABar belongs.


TdxBarManager.PopupMenuLinks

TdxBarManager          See Also

Contains an array of menu links.

property PopupMenuLinks: TdxBarPopupMenuLinks;

Description

Any control on a form can be tied to a standard TPopupMenu.  This popup menu is activated when a user right-clicks a control, the context menu or Shift+F10 keys.  ExpressBars v. 3.1 enables a user to associate controls with popup menus of type TdxBarPopupMenu.  The PopupMenuLinks property is presented as an array if menu links are used by a bar manager to tie a control to popup menus.


TdxBarManager.UseFullReset

TdxBarManager          See Also

Determines whether a toolbar (not just item links) is updated on calls to the Reset method.

property UseFullReset: Boolean;

Description

If UseFullReset is True, then the Reset method of a TdxBar object restores not only the properties of the item links tied to a toolbar, but also the toolbar itself, i.e its size, position, docking style, state, etc.

If UseFullReset is False, the Reset method of the TdxBar object only changes item links properties.


TdxBarManager.CategoryItemsVisible

TdxBarManager            See Also                  Example 1          Example 2

Specifies the visibility of category items.

type

  TdxBarItemVisible = (ivNever, ivInCustomizing, ivAlways);

property CategoryItemsVisible [AIndex: Integer]: TdxBarItemVisible;

Description

AIndex specifies the category index in the TdxBarManager category list.  This property defines the appearance style of category items:

Value	Meaning
ivAlways	Items are visible at design and run time.
ivNever	Items do not appear at runtime.
ivInCustomizing	Items only appear during toolbar customization.


TdxBarManager.CategoryVisible

TdxBarManager            See Also

Determines visibility of a Category.

property CategoryVisible[AIndex: Integer]: Boolean;

Description

This property determines visibility of a category within the customization form at run-time.  If True, the corresponding category is visible in the category listbox of the customization form.

At design-time, all categories are visible regardless of this property value.  AIndex is a category index in the TdxBarManager category list (index of the first category is 0).


TdxBarManager.Designing

TdxBarManager

Indicates whether the bar manager is in design mode.

property Designing: Boolean;

Description

The Designing property contains a Boolean value that corresponds to the bar manager mode.  If this property is True, the bar manager is in design time mode.  If this property is False, the bar manager is in runtime mode.

ReadOnly Property


TdxBarManager.DockControlCount

TdxBarManager          See Also

Returns the number of dock controls that belong to the current bar manager.

property DockControlCount: Integer;

Description

Use the DockControlCount property to obtain the number of accessible dock controls via the TdxBarManager DockControls property.

ReadOnly Property


TdxBarManager.DockControls

TdxBarManager          See Also

Contains a list of available dock controls.

property DockControls[Index: Integer]: TdxDockControl;

Description

Dock controls are used to display toolbars.  The DockControls property returns the dock control specified by the Index parameter.  The first dock control index is 0.  The number of dock controls is stored in the DockControlCount property.

ReadOnly Property


TdxBarManager.GroupCount

TdxBarManager          See Also

Returns the number of groups that belongs to the current bar manager.

property GroupCount: Integer;

Description

Use the GroupCount property to obtain the number of accessible groups via the TdxBarManager Groups property.

ReadOnly Property


TdxBarManager.Groups

TdxBarManager          See Also

Contains a list of available groups that belong to the current bar manager.

property Groups[Index: Integer]: TdxBarGroup;

Description

Groups can contain other groups and items.  These elements are desighed to help users manage groups of items (enable/disable or hide them).

The Groups property returns the appropriate group specified by the Index parameter which contains different items.  The first group index is 0.  The number of groups is stored in the GroupCount property.

ReadOnly Property


TdxBarManager.IsCustomizing

TdxBarManager          See Also

Returns the status of the customization form.

property IsCustomizing: Boolean;

Description

Returns True, if the TdxBarManager customization form is active.  Otherwise, returns False.

ReadOnly Property


TdxBarManager.ItemCount

TdxBarManager            See Also                  Example 1          Example 2

Returns the number of accessible items.

property ItemCount: Integer;

Description

Returns the number of accessible items via the TdxBarManager Items property.

ReadOnly Property


TdxBarManager.Items

TdxBarManager            See Also                  Example

Contains a list of available items.

property Items[Index: Integer]: TdxBarItem;

Description

Items are the elements you wish to show on a toolbar.  This property returns the item specified by Index.  The first item index is 0.  The number of items is stored in the ItemCount property.

ReadOnly Property


TdxBarManager.LockUpdate

TdxBarManager          Example

Sets the repaint mode for item controls that belong to toolbars.

property LockUpdate: Boolean;

Description

Setting a value for this property assigns the same value to the LockUpdate property of all toolbars belonging to a given TdxBarManager.  If True, any modifications to toolbar item controls of a given TdxBarManager does not invoke screen repainting.  If False, toolbars of a given TdxBarManager, whose LockUpdate property is True, are refreshed.

This property is used to prevent numerous toolbar refresh events during modification of a group of item controls (e.g. the Enabled property of a given set of items).

Important Note:	Use the LockUpdate property only when changing the appearance aspects of toolbars.  To prevent a toolbar from being unnecessarily repainted when its structure is changed (for instance, by adding new link items) use the bar’s LockUpdate property instead.


TdxBarManager.MainForm

TdxBarManager              Example

Specifies the parent form of a TdxBarManager object.

property MainForm: TCustomForm;

Description

Returns the form which contains a given TdxBarManager.

IMPORTANT:	A form can contain only one TdxBarManager.

ReadOnly Property


TdxBarManager.MainMenuControl

TdxBarManager            See Also

Returns a main menu control pointer.

property MainMenuControl: TdxBarControl;

Description

Returns the bar control presented as a main menu.  If true, the IsMainMenu property of this bar control is True.

Note:	There may be only one control of this type in TdxBarManager.

ReadOnly Property


TdxBarManager.MainMenuBar

TdxBarManager              Example

Returns a main menu component.

property MainMenuBar: TdxBar;

Description

Returns the TdxBar object presented as the main menu, that is, its IsMainMenu property is True.

Note:	There may be only one control of this type in TdxBarManager.

ReadOnly Property


TdxBarManager.MakeDisabledImagesFaded

TdxBarManager

Specifies whether default images must be painted faded.

property MakeDisabledImagesFaded: Boolean;

Description

By default, images within disabled links are painted grayscale when the XP or Office11 paint style is used.  For other paint styles, such images are painted grayed out.  The image below shows the same toolbar painted in XP and Flat style to show the difference.

You can prevent images of disabled links from being painted grayed out independently of the paint style used.  Set the MakeDisabledImagesFaded property to True for this purpose.  As a result, images within disabled links will be painted grayscale.

The painting style used for toolbars is specified by the bar manager’s Style property.

The default value of the MakeDisabledImagesFaded property is False.


TdxBarManager.SelectedItem

TdxBarManager

Specifies the selected toolbar item control.

property SelectedItem: TdxBarItemControl;

Description

This property returns the currently selected item control.  A toolbar can contain several item controls corresponding to different items.  If an item control is selected, its underlying item is selected as well.  The item can be selected on one of the toolbars or submenus or on the customization form.

IMPORTANT:	Do not assign any value to this property.


TdxBarManager.AlwaysMerge

TdxBarManager

Specifies a merge mechanism for main menus of parent and child windows within an MDI application.

property AlwaysMerge: Boolean;

Description

If True, the main menu of the active child window always merges with the main menu of the parent.  Otherwise, merging occurs only when a child window is maximized.


TdxBarManager.AutoHideEmptyBars

TdxBarManager            See Also          Example

This property controls the appearance of toolbars.

property AutoHideEmptyBars: Boolean;

Description

If True, and a toolbar does not contain any visible item controls, the toolbar is hidden at run time, and if False, the toolbar appears empty.  This property works only with the CategoryItemsVisible property.

This property setting affects only situations when items become hidden through changing the value of the CategoryItemsVisible property. For instance, the following code will hide a toolbar if this operation hides all its items:

dxBarManager1.CategoryItemsVisible[0] := ivNever;


TdxBarManager.Backgrounds

TdxBarManager            See Also

Specifies the background bitmaps used by bars and sub menus.

property Backgrounds: TdxBarBackgrounds;

Description

Use the Backgrounds property to access the TdxBarBackgrounds object specifying background bitmaps for bars and sub menus.  The background bitmap used by bars is specified by the Bar property of this object.  The object’s SubMenu property sets the background image for sub menus.


TdxBarManager.Bars

TdxBarManager            See Also          Example 1          Example 2

Determines the set of toolbars that belong to a given TdxBarManager.

property Bars: TdxBars;

Description

This property contains references to a set of toolbars managed by a TdxBarManager.


TdxBarManager.CanCustomize

TdxBarManager

Specifies customizing capability.

property CanCustomize: Boolean;

Description

If True, then a customization form may be invoked from the context popup menu; Else, the button that invokes customizing is disabled.


TdxBarManager.Categories

TdxBarManager          See also          Example

Determines a list of TdxBarManager categories.

property Categories: TStrings;

Description

Contains a list of categories into which items are divided.  The category number is stored in the Category property of each item.  Use categories to centralize access to items.


TdxBarManager.Font

TdxBarManager            See Also

Specifies item font.

property Font: TFont;

Description

Determines the font used for all items which belong to a given TdxBarManager.

Note:	If this property is modified, the UseSystemFont property is False.


TdxBarManager.LargeIcons

TdxBarManager

Specifies the draw style of toolbar buttons.

property LargeIcons: Boolean;

Description

If LargeIcons is True, toolbars buttons are enlarged.


TdxBarManager.MenuAnimations

TdxBarManager

Specifies menu animation effects.

type

  TdxBarMenuAnimations = (maNone, maRandom, maUnfold, maSlide);

property MenuAnimations: TdxBarMenuAnimations;

Description

Determine the style of menu activation.  The following menu animation effects are available:

Value	Meaning
maNone	No animation.
maRandom	Random choice (maUnfold, maSlide or maFade).
maUnfold	Unfolding menu.
maSlide	Sliding dropdown or popup menu.
maFade	Popup menus fade in when appearing.


TdxBarManager.NotDocking

TdxBarManager           See Also

Specifies toolbar location restrictions.

type

  TdxBarDockingStyle = (dsNone, dsLeft, dsTop, dsRight, dsBottom);

  TdxBarDockingStyles = set of TdxBarDockingStyle;

property NotDocking: TdxBarDockingStyles;

Description

Specifies application form sides to which all toolbars cannot be docked.

Note:	If dsNone is included, the toolbars not be float.


TdxBarManager.RegistryPath

TdxBarManager            See Also

Specifies the registry path where the TdxBarManager’s toolbar settings are to be stored.

property RegistryPath: string;

Description

The registry key specified by the RegistryPath property is used to store the TdxBarManager’s toolbar configurations, when the StoreInRegistry property is set to True.

Note: All subkeys and data of the specified registry path are deleted prior the ExpressBars saves its settings.  Developer Express Inc. does not carry a warranty of any kind for the lost registry entries.

If you don’t want to store the toolbar configuration within the registry, you can store them in an INI file.  To do so, set the StoreInIniFile property to True and specify the desired file name using the IniFileName property.

Note that setting either the StoreInRegistry or StoreInIniFile property to True implies that the settings will be saved and restored when the bar manager’s owning form is destroyed and created, respectively.  If you need to save and restore settings at different points, you can do so by manually calling the SaveToRegistry, LoadFromRegistry, SaveToIniFile and LoadFromIniFile methods.


TdxBarManager.ShowCloseButton

TdxBarManager            See Also

Specifies whether the toolbar Close button is displayed.

property ShowCloseButton: Boolean;

Description

If the ShowCloseButton property is True, the main menu includes a Close button.  Once clicked, the OnCloseButtonClick event is generated.  Use the Close button to close a child form if it has no title.

Note:	For docked toolbars, the Close button is available only if the toolbar’s IsMainMenu property is set to True.


TdxBarManager.ShowHint

TdxBarManager            See Also

Determines whether the help Hint is shown when the mouse pointer rests over item controls.

property ShowHint: Boolean;

Description

If the ShowHint is set to True, an item hint is displayed.


TdxBarManager.ShowHintForDisabledItems

TdxBarManager          See also

Specifies whether to show a hint for disabled items.

property ShowHintForDisabledItems: Boolean;

Description

If the ShowHintForDisabledItems property is set to True, a hint is shown for every item control on the toolbars, including disabled item controls.  A hint for disabled item controls will be shown if the bar manager’s ShowHint property is set to True.


TdxBarManager.ShowShortCutInHint

TdxBarManager            See Also

Determines if the control shortcut is displayed with the item controls Hint.

property ShowShortCutInHint: Boolean;

Description

If the ShowShortCutInHint property is set to True, the shortcut of a given element (if there is any) is displayed along with the element’s hint.  Otherwise, the shortcut is not shown unless the application’s HintShortCuts property is set to True (since the HintShortCuts property controls the overall appearance of the shortcut within the application’s pop-up hints and thus takes priority).

The default value of the ShowShortCutInHint property is False.


TdxBarManager.Style

TdxBarManager            See Also

Specifies bar painting style.

type

  TdxBarManagerStyle = (bmsStandard, bmsEnhanced, bmsFlat, bmsXP, bmsOffice11, bmsUseLookAndFeel);

property Style: TdxBarManagerStyle;

Description

Use the Style property to specify bar paint style.  The table below lists the values available for this property and provides examples of their appearance.

Value	Example
bmsStandard
bmsEnhanced
bmsFlat
bmsOffice11
bmsXP
bmsUseLookAndFeel	The applied paint style is specified by the LookAndFeel property of the bar manager.  If the NativeStyle attribute of the LookAndFeel property is set to True, the currently applied XP theme is used.  Otherwise, the paint style is specified by the Kind attribute.  The list below shows the correspondence between Kind and painting styles applied: • lfFlat – bmsEnhanced, • lfStandard – bmsStandard, • lfUltraFlat – bmsFlat.
Note:  if the bmsXP value is assigned to the Style property, bars use the currently applied XP theme to paint themselves.  However, if the currently installed operating system is not Windows XP or the Windows Classic theme is currently applied, bars will be painted using the bmsEnhanced paint style.


TdxBarManager.UseSystemFont

TdxBarManager            See Also

Specifies the font used to draw the toolbar controls.

property UseSystemFont: Boolean;

Description

If the UseSystemFont property is set to True, the Font property is assigned to the parameter set for the menus via Windows system settings and the Scaled property does not affect toolbar appearance in this case.


TdxBarManager.ButtonArrowWidth

TdxBarManager

property ButtonArrowWidth: Integer;

Description

This property determines the width of dropdown buttons for ordinary (not large) buttons.  A dropdown button is drawn to the right of a button and looks similar to a combobox dropdown button.

	The ButtonArrowWidth property is set to 10.
	The ButtonArrowWidth property is set to 20.
	The ButtonArrowWidth property is set to 30.


TdxBarManager.FlatCloseButton

TdxBarManager

Determines the border style of the Close button.

property FlatCloseButton: Boolean;

Description

If FlatCloseButton is True, the Close button is drawn flat.  Otherwise, it has a 3D look.


TdxBarManager.HotImages

TdxBarManager            See Also

Specifies the image list, whose images can be displayed within large button items when they are hot-tracked.

property HotImages: TImageList;

Description

Images contained within the HotImages collection can only be used by large button items (represented by TdxBarLargeButton objects).  You should use an item’s HotImageIndex property to specify which particular image from the image list should be displayed within the item.  Note that the hot image specified is only used if the item is within a toolbar (it is ignored if the item is within a sub-menu).

Note that you can also specify hot images for items without useing image lists.  Use the items’ HotGlyph property for this purpose.

Note: if a hot image is assigned to an item while a large image is not assigned, the item uses the grayed-out hot image when in normal state.


TdxBarManager.Images

TdxBarManager            See Also

Determines which image list is associated with items.

property Images: TImageList;

Description

Use Images to provide a customized list of bitmaps that may be displayed as item control images.


TdxBarManager.LargeImages

TdxBarManager

Specifies a list of images to draw for item controls.

property LargeImages: TImageList;

Description

Determines which image list is used to draw large images for item controls.


TdxBarManager.LargeButtonArrowWidth

TdxBarManager

property LargeButtonArrowWidth: Integer;

Description

This property determines the width of dropdown buttons for large buttons.  A dropdown button is drawn to the right of a large button and looks similar to a combobox dropdown button.

	The LargeButtonArrowWidth property is set to 15.
	The LargeButtonArrowWidth property is set to 25.
	The LargeButtonArrowWidth property is set to 35.


TdxBarManager.Scaled

TdxBarManager

Specifies whether a toolbar is sized according to a specified font.

property Scaled: Boolean;

Description

Scaled is used to change toolbar size according to a used font.  It works only when UseSystemFont is False.


TdxBarManager.StoreInRegistry

TdxBarManager            See Also

Determines whether a component’s settings are stored in the Registry.

property StoreInRegistry: Boolean;

Description

If True, toolbar properties are stored in the Registry specified by the RegistryPath property.

Note:	Within MDI applications, you should call the SaveToRegistry in the OnClose event handler of the child form to save the settings of its TdxBarManager.


TdxBarManager.StretchGlyphs

TdxBarManager

Indicates whether a glyph should be altered so that it fits exactly in the bounds of the item control.

property StretchGlyphs: Boolean;

Description

Set StretchGlyphs to True to force button images to assume the size and shape of item controls.  When a control resizes, the image resizes as well.  All new items will have the same StretchGlyphs property as the TdxBarManager to which they belong.


TdxBarManager.SunkenBorder

TdxBarManager

Determines a toolbar’s border style.

property SunkenBorder: Boolean;

Description

Use SunkenBorder to switch between toolbar border styles.  If the SunkenBorder property is False, ExpressBars creates a toolbar with standard borders.  Otherwise, border lines are sunken.


TdxBarManager.WaitForDockingTime

TdxBarManager

property WaitForDockingTime: Integer;

Description

Defines the timespan in milliseconds before docking a toolbar to a form.


TdxBarManager.BarControlFocused

TdxBarManager            See Also

Determines if the TdxBarManager has a focused bar control.

property BarControlFocused: Boolean;

Description

If any toolbar has focus, the BarControlFocus property is set to True; Else it is False.

ReadOnly Property


TdxBarManager.FocusedBarControl

TdxBarManager            See Also

Specifies the focused bar control.

property FocusedBarControl: TCustomdxBarControl;

Description

Returns the currently focused bar control (if it exists).  If a focused bar control does not exist, returns nil.

ReadOnly Property


TdxBarManager.Dragging

TdxBarManager            See Also

property Dragging: Boolean;

Description

This property is used internally.  If True, one TdxBarManager item is being dragged.

ReadOnly Property


TdxBarManager.DraggingItem

TdxBarManager            See Also

property DraggingItem: TdxBarItem;

Description

This property is used internally.  It specifies the item whose item control is being dragged.

ReadOnly Property


TdxBarManager.DraggingItemLink

TdxBarManager            See Also

property DraggingItemLink: TdxBarItemLink;

Description

This property is used internally.  It specifies the item link of the item control being dragged.

ReadOnly Property


TdxBarManager.BeforeFingersSize

TdxBarManager

property BeforeFingersSize: Integer;

Description

This property is used internally.  It determines the distance from the toolbar to its ‘vertical lines’ (Lines at the left edge or at the top of a toolbar).

ReadOnly Property


TdxBarManager.FingersSize

TdxBarManager

property FingersSize: Integer;

Description

This property is used internally to specify the size of ‘vertical lines’ (‘Lines’ are the figures at the left side or at the top of a toolbar).  The FingersSize includes the BeforeFingersSize value and the size of the fingers.

ReadOnly Property


TdxBarManager.SubMenuBeginGroupIndent

TdxBarManager

property SubMenuBeginGroupIndent: Integer;

Description

Used internally to correctly draw separators in a sub menu.  Separator length depends on the bar manager Style property.

ReadOnly Property


TdxBarManager.GlyphSize

TdxBarManager            See Also

property GlyphSize: Integer;

Description

Used internally to set the size of a button glyph to a proper value.  The GlyphSize depends on the LargeIcons property of the TdxBarManager object.

ReadOnly Property


TdxBarManager.ButtonWidth

TdxBarManager            See Also

property ButtonWidth: Integer;

Description

Used internally to specify the proper value of a button’s width.  The button width of a toolbar depends on its glyph size.

ReadOnly Property


TdxBarManager.ButtonHeight

TdxBarManager            See Also

property ButtonHeight: Integer;

Description

Used internally to specify the proper value of a button’s height.  The height of a toolbar button depends on its glyph size.

ReadOnly Property


TdxBarManager.RealButtonArrowWidth

TdxBarManager            See Also

property RealButtonArrowWidth: Integer;

Description

Used internally to specify the proper width of an arrow button. The Arrow button is similar to a combo box button.  Arrow button width depends on a bar manager’s LargeIcons property.

ReadOnly Property


TdxBarManager.Create

TdxBarManager

Creates and initializes the TdxBarManager instance.

constructor TdxBarManager.Create( AOwner: TComponent); override;

Description

The Create method

- Calls the inherited Create method.

- Sets the MainForm property of theTdxBarManager to the application main form

- Registers the TdxBarManager

- Sets LargeButtonArrowWidth, ButtonArrowWidth, WaitForDockingTime to their initial values.

- Sets the Scaled, ShowHint, StretchGlyphs, UseSystemFont properties to True.

- Sets Style to the bmsEnhanced.

Note:	A form can contain only a single TdxBarManager.


TdxBarManager.CreateGroup

TdxBarManager          See Also

Creates and initializes an instance of the TdxBarGroup.

function CreateGroup: TdxBarGroup;

Description

The CreateGroup method

- Calls the Create method of the TdxBarGroup.

- Adds this group to the list of available groups of the current bar manager.


TdxBarManager.Destroy

TdxBarManager          See Also

Destroys an instance of the TdxBarManager type.

destructor Destroy; override;

Description

The TdxBarManager Destroy method destroys the TdxBarManager and all items and toolbars it manages.


TdxBarManager.BarByCaption

TdxBarManager          See Also

Returns a toolbar by its caption.

function BarByCaption(const ACaption: string): TdxBar;

Description

Each bar of a bar manager has a caption which uniquely identifies it.  Use the BarByCaption method to access a bar via the Caption property specified by the ACaption parameter.


TdxBarManager.BarByName

TdxBarManager          See Also

Returns a bar by its name.

function BarByName(const AName: string): TdxBar;

Description

Each bar of a bar manager has a name which can be used to uniquely identify it.  Use the BarByName method to access a bar via the Name property specified by the AName parameter.


TdxBarManager.GetAllItemsByCategory

TdxBarManager            See Also

Gets all items of a specified category.

function GetAllItemsByCategory(ACategory: Integer; List: TList): Integer;

Description

Stores the items list of a category specified by ACategory in the List variable.  The Function returns the number of all category items (both visible and invisible).


TdxBarManager.GetCountByCategory

TdxBarManager            See Also

Returns the number of visible items in a specified category.

function GetCountByCategory(ACategory: Integer): Integer;

Description

The ACategory parameter specifies the number of categories which belong to TdxBarManager.  This Function returns the number of visible category items.


TdxBarManager.GetItemByCategory

TdxBarManager            See Also

Returns the specified item of a specified category.

function GetItemByCategory(ACategory, AIndex: Integer): TdxBarItem;

Description

Use this function to get the item specified by the AIndex parameter from the items list of a category.  The Category is specified by the ACategory parameter.  The index of the first category is 0.  The number of the categories is returned by the GetCountByCategory function.


TdxBarManager.GetItemByName

TdxBarManager            See Also

Returns an item by name.

function GetItemByName(const AName: string): TdxBarItem;

Description

The function looks for an item with the name, specified by the AName parameter in the TdxBarManager item list and returns it (if it exists).  If matches are not found, the function returns nil.


TdxBarManager.GetItemsByCategory

TdxBarManager            See Also

Returns items by category number.

function GetItemsByCategory(ACategory: Integer; List: TList): Integer;

Description

The Function returns the list of items whose category number is equal to ACategory.


TdxBarManager.MoveItem

TdxBarManager

Moves an item inside TdxBarManager to a new position.

procedure MoveItem(CurIndex, NewIndex: Integer);

Description

Moves an item inside TdxBarManager item list from its current position specified by CurIndex to a new position specified by NewIndex.  This function is called when you drag an item from one category to another.


TdxBarManager.ExchangeItems

TdxBarManager            See Also

Exchanges two items in an item list.

procedure ExchangeItems(Index1, Index2: Integer);

Description

Exchanges two items in a TdxBarManager item list.  Index1 and Index2 specify the item indexes in the list.  This method is called when you move items from one category to another in the customization form.


TdxBarManager.Customizing

TdxBarManager          See Also

Shows or hides the toolbar customization form.

procedure Customizing(Show: Boolean);

Description

Use this procedure to manage the display of the customization form.  If the Show parameter is True, the customization form is displayed.


TdxBarManager.HideAll

TdxBarManager              Example

Hides all open toolbar popup menus or subitems.

procedure HideAll;

Description

Use this function to make the active toolbar, popup menu, or subitem inactive.  For instance, if there is a set of open menus, HideAll closes them.


TdxBarManager.LoadFromRegistry

TdxBarManager            See Also

Loads component settings from the Registry.

procedure LoadFromRegistry(ARegistryPath: string);

Description

You can store component settings in the Registry.  This procedure loads these settings from the Registry key specified by the ARegistryPath parameter.


TdxBarManager.SaveToRegistry

TdxBarManager            See Also

Saves component settings to the Registry.

procedure SaveToRegistry(ARegistryPath: string);

Description

If the StoreInRegistry property is True, the SaveToRegistry method saves the configuration of toolbars, items, and some TdxBarManager properties in the Registry.

Note:	In child forms of MDI applications, you must save TdxBarManager settings manually.

Call the SaveToRegistry method from the OnClose event handler:

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);

begin

 with dxbarManager1 do

   SaveToRegistry(RegistryPath);

 Action := caFree;

end;


TdxBarManager.DoClickItem

TdxBarManager            See Also

procedure DoClickItem(AItem: TdxBarItem); virtual;

Description

Called on clicking any item control on the toolbar.  This simply generates an OnClickItem event.


TdxBarManager.DoDocking

TdxBarManager            See Also

Determines the docking style of a bar control.

procedure DoDocking(ABar: TdxBar; AStyle: TdxBarDockingStyle; var CanDocking: Boolean);

Description

This procedure checks if the docking style specified by the AStyle parameter is a valid docking style for a bar control.  CanDocking is set to True, if the TdxBarManager NotDocking does not include AStyle.  Otherwise, CanDocking is set to False.  This method is called when a bar control’s location changes.  This procedure also generates the OnDocking event.


TdxBarManager.DoCloseButtonClick

TdxBarManager

procedure DoCloseButtonClick; dynamic;

Description

The DoCloseButtonClick method is called when the Close button is clicked.  This procedure simply generates the OnCloseButtonClick event.  Override it to perform special actions without writing an event handler.


TdxBarManager.OnBarAdd

TdxBarManager            See Also

This event occurs just after adding a new toolbar to the TdxBarManager.

type

  TdxBarEvent = procedure(Sender: TdxBarManager; ABar: TdxBar) of object;

property OnBarAdd: TdxBarEvent;

Description

Use this event when you need special code in response to toolbar creation.  The created toolbar is specified by the ABar parameter.


TdxBarManager.OnBarDelete

TdxBarManager            See Also

This event occurs before removal of a toolbar from the toolbar list of a TdxBarManager.

type

  TdxBarEvent = procedure(Sender: TdxBarManager; ABar: TdxBar) of object;

property OnBarDelete: TdxBarEvent;

Description

Use this event to write special code in response to toolbar removal.  The toolbar is specified by the ABar parameter.


TdxBarManager.OnBarDockingStyleChange

TdxBarManager            See Also          Example

This event occurs when a user changes the docking style of a toolbar.

type

  TdxBarEvent = procedure(Sender: TdxBarManager; ABar: TdxBar) of object;

property OnBarDockingStyleChange: TdxBarEvent;

Description

Use this event to implement special code on docking style changes to the ABar toolbar.

Note:	OnBarDockingStyle is the notifying event. Use the OnDocking event to set a specific DockingStyle for a toolbar.  It is not recommended to set the DockingStyle for a toolbar in the OnBarDockingStyle event handler.


TdxBarManager.OnBarVisibleChange

TdxBarManager

This event occurs on toolbar visibility change.

type

  TdxBarVisibleChangeEvent = procedure(Sender: TdxBarManager; ABar: TdxBar) of object;

property OnBarVisibleChange: TdxBarVisibleChangeEvent;

Description

This event occurs after changing toolbar visibility.  The toolbar whose Visible property changes is specified by the ABar parameter.


TdxBarManager.OnItemLinkAdd

TdxBarManager            See Also

type

  TdxBarItemLinkEvent = procedure(Sender: TdxBarManager; AItemLink: TdxBarItemLink) of object;

property OnItemLinkAdd: TdxBarItemLinkEvent;

Description

This event occurs after adding AItemLink to the ItemLinks property of any object that has the ItemLinks property, for example, when you add an item control to the toolbar, popup menu, or subitem.


TdxBarManager.OnItemLinkChange

TdxBarManager            See Also

type

  TdxBarItemLinkEvent = procedure(Sender: TdxBarManager; AItemLink: TdxBarItemLink) of object;

property OnItemLinkChange: TdxBarItemLinkEvent;

Description

This event occurs after modifications to the ItemLink specified by the AItemLink parameter.

For instance, this event occurs when you change UserCaption, BeginGroup, UserGlyph, UserPaintStyle, and UserWidth (for combobox or edit style controls).


TdxBarManager.OnItemLinkDelete

TdxBarManager            See Also

type

  TdxBarItemLinkEvent = procedure(Sender: TdxBarManager; AItemLink: TdxBarItemLink) of object;

property OnItemLinkDelete: TdxBarItemLinkEvent;

Description

This event occurs before destroying the AItemLink, that is, before item control deletion from a toolbar, popup menu, or subitem.


TdxBarManager.OnCloseButtonClick

TdxBarManager            See Also

Occurs on clicking a close button.

property OnCloseButtonClick: TNotifyEvent;

Description

Assume your child form has no title, so the child form border icons are invisible, but you wish to give users an opportunity to close the child form.  Make one of the toolbars on the form the main menu toolbar and set the TdxBarManager ShowCloseButton property to True.  Write an OnCloseButtonClick event handler to close the child form.


TdxBarManager.OnDocking

TdxBarManager            See Also

type

  TdxBarCanDockingEvent = procedure(Sender: TdxBar; Style: TdxBarDockingStyle; var CanDocking: Boolean) of object;

property OnDocking: TdxBarCanDockingEvent;

Description

This event occurs before toolbar docking.  The Sender parameter specifies the toolbar to be docked.  The application form side to which a toolbar will be docked is determined by the Style parameter.  If CanDocking is False, no docking occurs.  Write an OnDocking event handler to prevent docking of particular toolbars to particular forms.

The following code prevents the main menu toolbar from docking to any side except a form’s top:

procedure TForm1.dxBarManager1Docking(Sender: TdxBar; Style: TdxBarDockingStyle; var CanDocking: Boolean);

begin

  if Sender = GetBarManagerByForm(Self).MainMenuBar then

    if Style <> dsTop then

      CanDocking := False;

end;


TdxBarManager.OnHideCustomizingForm

TdxBarManager            See Also

property OnHideCustomizingForm: TNotifyEvent;

Description

This event is called after closing the customization form of a given TdxBarManager.  Write an OnHideCustomizingForm event handler to perform special actions on hiding the customization form.


TdxBarManager.OnMenuMerge

TdxBarManager          See Also

This event occurs when activating an MDI child form which contains a bar manager.

type

  TdxBarMenuMergeEvent = procedure(Sender, ChildBarManager: TdxBarManager) of object;

property OnMenuMerge: TdxBarMenuMergeEvent;

Description

When a child form is activated, items of its main menu can be added to the end of the main menu of the parent form.  Write an OnMenuMerge event handler to add child menu items to the parent menu in a specific manner.  For instance, the OnMenuMerge event handler can insert items between parent menu items instead of adding them to the end of the parent menu.

The Sender parameter specifies the bar manager of the MDI parent form.  ChildBarManager is the bar manager of the MDI child form.

IMPORTANT: If the OnMenuMerge event handler is assigned, the bar manager on the parent form does not automatically merge child and parent menus.

Note:	The OnMenuMerge event is generated only if the AlwaysMerge property is set to True.


TdxBarManager.OnShowCustomizingForm

TdxBarManager            See Also

Occurs when the TdxBarManager customization form is to display.

property OnShowCustomizingForm: TNotifyEvent;

Description

This event occurs before activating the customization form of a given TdxBarManager.  Write an OnShowCustomizingForm event handler to perform special actions on customization form display.


TdxBarManager.OnShowToolbarsPopup

TdxBarManager            See Also          Example 2

type

  TdxBarShowToolbarsPopupEvent = procedure(Sender: TdxBarManager; PopupItemLinks: TdxBarItemLinks) of object;

property OnShowToolbarsPopup: TdxBarShowToolbarsPopupEvent;

Description

This event occurs before the customizing menu appears (When a user presses the right mouse button within the toolbar region).  The customizing menu represents a list of available toolbars.  The menu consists of item links passed by the PopupItemLinks parameter.  Using these item links you can add/delete any menu items.


TdxBarManager.OnClickItem

TdxBarManager

type

  TdxBarClickItemEvent = procedure(Sender: TdxBarManager; ClickedItem: TdxBarItem) of object;

property OnClickItem: TdxBarClickItemEvent;

Description

This event occurs on clicking the toolbar items, that is, when the user clicks one of the toolbar item controls.


TdxBarManager.StoreInIniFile

TdxBarManager            See Also

Specifies whether to store the TdxBarManager settings in an INI file.

property StoreInIniFile : Boolean;

Description

If StoreInIniFile is True, then the TdxBarManager object stores the TdxBarManager settings in an INI file specified by the IniFileName property.  The TdxBarManager stores TdxBarManager settings, toolbars settings that belong to this TdxBarManager, settings of the toolbar item links, and settings of all sub items.

Note:	You should call the SaveToIniFile from an OnClose event handler to save settings of a child form TdxBarManager in MDI applications.


TdxBarManager.IniFileName

TdxBarManager            See Also

Specifies the name of the INI file in which to store TdxBarManager settings.

property IniFileName: string;

Description

If the TdxBarManager StoreInIniFile property is True, then the TdxBarManager properties are stored in an INI file.  The IniFileName property specifies the name of this INI file.  The IniFileName property determines the file name; that is, the ‘ini’ extension isn’t added by the component to the file name specified by the IniFileName property.

Note:	You should call the SaveToIniFile from an OnClose event handler to save settings of a child form TdxBarManager in MDI applications.


TdxBarManager.SaveToIniFile

TdxBarManager            See Also

Saves TdxBarManager settings to an ini file.

procedure SaveToIniFile( AFileName : string);

Description

This method saves TdxBarManager settings to the INI file specified by the AFileName parameter.  This procedure is called automatically on destroying the component.  In this instance, the file name is specified by the IniFileName property.  Call SaveToIniFile with a unique file name if you wish to save TdxBarManager settings to another file rather than that specified by the IniFileName property.

Note: You should call the SaveToIniFile from an OnClose event handler to save settings of a child form TdxBarManager in MDI applications.

For example:

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);

begin

  with dxbarManager1 do

    SaveToIniFile(IniFileName);

  Action := caFree;

end;


TdxBarManager.LoadFromIniFile

TdxBarManager            See Also

Loads TdxBarManager settings from an INI file.

procedure LoadFromIniFile( AFileName : String);

Description

This procedure loads the TdxBarManager, toolbars, item links, and sub items settings from an INI file specified by AFileName.  TdxBarManager uses this method to load settings from the INI file specified by the IniFileName property.  If you want to load TdxBarManager settings from a specific INI file, call the LoadFromIniFile method with the AFileName parameter specifying the appropriate INI file.


TdxBarManager.LookAndFeel

TdxBarManager          See Also

Specifies the look and feel of bars.

property LookAndFeel: TcxLookAndFeel;

Description

Use the LookAndFeel property to specify the bar paint styles.  This property provides access to the TcxLookAndFeel object holding paint style settings.  This object’s NativeStyle property specifies whether the currently applied XP theme should be used to paint bars.  The Kind property sets the painting style if the NativeStyle property value is False or XP themes are unavailable.  Please refer to the TcxLookAndFeel object description for details.

Note: settings provided by the LookAndFeel property are only used when the Style property is set to bmsUseLookAndFeel.


TdxBarManager.DisabledImages

TdxBarManager          See Also

Specifies the source of small images displayed by disabled items.

type

  TCurImageList = {$IFDEF DELPHI4} TCustomImageList {$ELSE} TImageList {$ENDIF};

property DisabledImages: TCurImageList;

Description

If no image list is assigned to the DisabledImages property, item images become grayed when setting the Enabled property of items to False.  However, you can provide your own disabled images for items.  For this purpose, assign the image list containing the desired images to the DisabledImages property of the bar manager.  In this instance, when an item is disabled, it will display the image from this image list.  The image to be displayed is specified by its position within the list via the ImageIndex property of the item.

There can be situations when an image list is assigned to the DisabledImages property but a disabled item’s ImageIndex property specifies an unavailable index.  In this case, the item will display no image.  Instead, its grayed caption will be displayed.


TdxBarManager.DisabledLargeImages

TdxBarManager          See Also

Specifies the source of large images displayed by disabled items.

type

  TCurImageList = {$IFDEF DELPHI4} TCustomImageList {$ELSE} TImageList {$ENDIF};

property DisabledLargeImages: TCurImageList;

Description

By default, item images are grayed when items become disabled.  However, you can provide your own images for the disabled state of items.  To provide custom disabled images for large button items, you need to assign the image list containing this images to the DisabledLargeImages property.  Once complete, items will use images from this image list when their Enabled property is set to True.  The image is specified by its position within the list via the LargeImageIndex property of the item.

There can be situations when an image list is assigned to the DisabledLargeImages property, but the LargeImageIndex property of an item points to an unavailable image.  In this case, no image is painted for the disabled state of the item.  The item only paints its grayed caption.


TdxBarManager.SaveToStream

TdxBarManager          See Also

Saves bar layout and settings to the specified stream.

procedure SaveToStream(AStream: TStream);

Description

Use the SaveToStream method to save settings and layout of bars owned by the bar manager to a stream.  The target stream is specified by the AStream parameter.  Saved settings can be restored using the LoadFromStream method call.

If saving settings to a stream doesn’t satisfy your needs, use the SaveToRegistry or SaveToIniFile method.

Note: the SaveToStream method writes information starting from the specifies stream’s current position.  Thus, you may need to modify the Position property of the target stream before calling the method.


TdxBarManager.LoadFromStream

TdxBarManager          See Also

Loads bar settings and layout from the specified stream.

procedure LoadFromStream(AStream: TStream);

Description

Use the LoadFromStream method to restore bars settings and layouts previously saved to a stream using the SaveToStream method.  The source stream is specified by the AStream parameter.

Note: The LoadFromStream method starts reading stream information from the specified stream’s current position.  Thus, you may need to update the Position property of the source stream before calling the method.


TdxBarPopupMenuLinks

Hierarchy          Properties          Methods          See Also

Unit

dxBar

TdxBarPopupMenuLinks = class(TCollection);

Description

Contains a menu of links used to associate controls on a form with TdxBarPopupMenu.


Hierarchy

TCollection

|


TdxBarPopupMenuLinks Properties

TdxBarPopupMenuLinks          Legend

TdxBarPopupMenuLinks

BarManager

Items


TdxBarPopupMenuLinks Methods

TdxBarPopupMenuLinks          Legend

TdxBarPopupMenuLinks

Add

Create

DoAction


TdxBarPopupMenuLinks.Create

TdxBarPopupMenuLinks

constructor Create(ABarManager: TdxBarManager);

Description

Creates a new TdxBarPopupMenuLinks object.  ABarManager indicates which Bar manager will handle new menu links.


TdxBarPopupMenuLinks.Add

TdxBarPopupMenuLinks

function Add: TdxBarPopupMenuLink;

Description

Adds a new menu link to a TdxBarPopupMenuLinks collection.


TdxBarPopupMenuLinks.DoAction

TdxBarPopupMenuLinks          See Also

function DoAction(AControl: TWinControl; const P: TPoint): Boolean;

Description

Called when a user presses the right mouse button on a control.  If DoAction returns True, then the popup menu was called for the control.  Otherwise, DoAction returns False.


TdxBarPopupMenuLinks.BarManager

TdxBarPopupMenuLinks

property BarManager: TdxBarManager;

Description

Defines a TdxBarManager object which handles a given menu links collection.

ReadOnly Property


TdxBarPopupMenuLinks.Items

TdxBarPopupMenuLinks          See Also

Includes a list of menu links in a given TdxBarPopupMenuItemLinks object.

property Items[Index: Integer]: TdxBarPopupMenuLink;

Description

Use this property to work with separate menu links.  Index of the first menu link in the array is 0.


TdxBarPopupMenuLink

Hierarchy          Properties          Methods          Events

Unit

dxBar

TdxBarPopupMenuLink = class(TCollectionItem);

Description

TdxBarPopupMenuLink is a separate menu link which connects a control on a form with a popup menu of type TdxBarPopupMenu.  This popup menu activates upon pressing the right mouse button on a control.


Hierarchy

TCollectionItem

|


TdxBarPopupMenuLink Properties

TdxBarPopupMenuLink          Legend

In TdxBarPopupMenuLink

BarManager

Control

PopupMenu

ProcessChildren


TdxBarPopupMenuLink Methods

TdxBarPopupMenuLink          Legend

In TdxBarPopupMenuLink

DoAction


TdxBarPopupMenuLink Events

TdxBarPopupMenuLink          Legend

TdxBarPopupMenuLink

OnAction


TdxBarPopupMenuLink.DoAction

TdxBarPopupMenuLink          See Also

function DoAction(P: TPoint): Boolean;

Description

Prepares a popup menu to be displayed on screen and generates an OnAction event.  The P parameter specifies the coordinates of the leftmost corner of the menu.  If DoAction returns True, the popup menu will be displayed on screen, otherwise, the popup menu is hidden.


TdxBarPopupMenuLink.BarManager

TdxBarPopupMenuLink

property BarManager: TdxBarManager;

Description

Specifies a TdxBarManager which controls a given menu link.

ReadOnly Property


TdxBarPopupMenuLink.Control

TdxBarPopupMenuLink          See Also

property Control: TWinControl;

Description

Specifies the control associated with a popup menu.


TdxBarPopupMenuLink.PopupMenu

TdxBarPopupMenuLink          See Also

property PopupMenu: TdxBarPopupMenu;

Description

Specifies the popup menu associated with a control.


TdxBarPopupMenuLink.ProcessChildren

TdxBarPopupMenuLink

Specifies whether the popup menu of the current control is associated with its child controls.

property ProcessChildren: Boolean;

Description

Set the ProcessChildren property to True to associate the popup menu of the current control with its child controls.  This enables a control that doesn’t have a corresponding popup menu to display the popup menu of one of its parent controls.  Otherwise, no popup menu will be displayed for the control.

The default value of the ProcessChildren property is True.


TdxBarPopupMenuLink.OnAction

TdxBarPopupMenuLink          See Also

This event occurs before a popup menu is displayed on screen.

type

  TdxBarPopupMenuLinkActionEvent = procedure(Sender: TdxBarPopupMenuLink; var X, Y: Integer; ClickedByMouse: Boolean; var AllowPopup: Boolean) of object;

property OnAction: TdxBarPopupMenuLinkActionEvent;

Description

Write an OnAction event handler to perform specific actions before a menu is displayed on screen.  The Sender parameter points to the menu link for which this event was generated.  X and Y determines the coordinates of the leftmost corner of the menu (in control coordinates).  AllowPopup determines whether the menu will be displayed on screen.  Set AllowPopup to False within the event handler to avoid displaying the menu on screen.  ClickedByMouse determines whether the menu is displayed upon a mouse button press event.


TdxBarManagerList

Hierarchy          Properties

TdxManagerList contains references to the TdxBarManager of each form that contains a TdxBarManager.

Unit

dxBar

TdxBarManagerList = class(TObject);

Description

TdxBarManagerList is used in multi-form applications where several forms have their own TdxBarManager objects.  TdxBarManagerList contains the list of all TdxBarManagers of an application.


Hierarchy

TObject

|


TdxBarManagerList Properties

TdxBarManagerList               Legend

TdxBarManagerList

BarManagers

Count

CustomizingBarManager


TdxBarManagerList.BarManagers

TdxBarManagerList            See Also

Represents the TdxBarManager object array of the forms.

property BarManagers[Index: Integer]: TdxBarManager;

Description

Several forms in any application can have their own TdxBarManager objects.  The BarManagers property is an array containing the reference to these TdxBarManager objects.  Use the integer Index to get the particular TdxBarManager.


TdxBarManagerList.Count

TdxBarManagerList

Returns the number of TdxBarManager objects in a TdxBarManagerList.

property Count: Integer;

Description

The Count property contains the number of  TdxBarManager objects in the TdxBarManagerList BarManagers array.  Since the BarManagers array is indexed beginning with 0, the Count value is always one greater than the index of the last member of the BarManagers.


TdxBarManagerList.CustomizingBarManager

TdxBarManagerList

Returns the TdxBarManager object being customized.

property CustomizingBarManager: TdxBarManager;

Description

The CustomizingBarManager returns the TdxBarManager which is currently being customized, that is, its customize form is open and its IsCustomizing property is True.


TdxBar

Hierarchy          Properties           Methods              Example 1          Example 2

TdxBar is a non-visual element representing the non-visual portion of a toolbar.

Unit

dxBar

TdxBar = class(TCollectionItem);

Description

This object stores all the information required for a toolbar’s existence and for the creation of its visual representation.  Objects of this type are stored in the TdxBars class.  The required TdxBar properties are stored in the Registry if it is specified in a corresponding TdxBarManager.


Hierarchy

TCollectionItem

|


TdxBar Properties

TdxBar               Legend

TdxBar

AllowClose

AllowCustomizing

AllowQuickCustomizing

AllowReset

AlphaBlendValue

BackgroundBitmap

BarManager

 	Bars

BorderStyle

Caption

Color

Control

DockControl

DockedDockControl

DockedDockingStyle

DockedLeft

DockedTop

DockingStyle

FloatClientHeight

FloatClientWidth

FloatLeft

FloatTop

Font

Hidden

IsMainMenu

IsPredefined

ItemLinks

MultiLine

Name

NotDocking

LockUpdate

OneOnRow

RealDockControl

RotateWhenVertical

Row

ShowMark

SizeGrip

UseOwnFont

UseRecentItems

UseRestSpace

Visible

WholeRow


TdxBar Methods

TdxBar               Legend

TdxBar

ChangeDockingStyle

Create

Destroy

Reset

ResetWithConfirmation


TdxBar.ShowMark

TdxBar

Specifies whether to display the 'additional buttons' symbol.

property ShowMark: Boolean;

Description

When the size of a toolbar is too small to entirely display all items, some of them are hidden and the 'additional buttons' symbol appears at the left of the toolbar.  Set the ShowMark property to True to enable it

or False to disable.

When pressing this symbol, the window with 'additional buttons' appears:

The default value of the ShowMark property is True.


TdxBar.IsPredefined

TdxBar

Determines whether a toolbar was created by a user or it was defined by the programmer.

property IsPredefined: Boolean;

Description

IsPredefined returns True if toolbar settings were defined by the programmer and were not loaded from the Registry or ini file.  If IsPredefined is True, the toolbar cannot be deleted or renamed.  If existing toolbar settings were loaded from the Registry or INI file, IsPredefined returns False.

ReadOnly Property


TdxBar.AllowClose

TdxBar

Determines whether a user can hide a toolbar.

property AllowClose: Boolean;

Description

If AllowClose is True, a user can hide a given toolbar.  If False, a user cannot hide it.  Additionally, if AllowClose is False, the toolbar is displayed neither in TdxBarToolbarsListItem, nor in the toolbars popup list, which appears every time a user presses the right mouse button over a docking area.


TdxBar.AllowCustomizing

TdxBar          See also          Example

Specifies toolbar customization capability.

property AllowCustomizing: Boolean;

Description

If AllowCustomizing is set to True (by default), users can add, move and remove items on a given toolbar at runtime.


TdxBar.AllowQuickCustomizing

TdxBar          See also          Example

Specifies quick toolbar customization capability.

property AllowQuickCustomizing: Boolean;

Description

If AllowQuickCustomizing is set to True (by default), the quick customizing button is displayed after items that do not fit in the toolbar for a docked toolbar, and on the caption title for a floating toolbar.

Clicking the quick customizing button activates a popup menu, which contains a list of potential buttons on that toolbar.  Users can select the ones they wish to display and uncheck the ones they want to suppress visually.

If False, the quick customizing button is not available.


TdxBar.AllowReset

TdxBar          See also

Allows a toolbar to be restored.

property AllowReset: Boolean;

Description

If AllowReset is set to True (by default), a user can restore original settings for a given toolbar by clicking the ‘Reset…’ button on the toolbar customization form or using the Quick Customizing popup.  Set AllowReset to False to prevent this.   In such an instance, the ‘Reset…’ button is disabled.


TdxBar.AlphaBlendValue

TdxBar

Specifies the opacity of the floating toolbar.

property AlphaBlendValue: Byte;

Description

When a bar floats, the opacity specified by the AlphaBlendValue property is applied to it.  This property can accept values between 0 and 255.  If 255 is assigned, the floating toolbar is absolutely opaque.  If 0 is assigned, it is absolutely transparent.

The default value of the AlphaBlendValue property is 255.


TdxBar.BackgroundBitmap

TdxBar          See Also

Specifies the image used as the bar’s background.

property BackgroundBitmap: TBitmap;

Description

Use the BackgroundBitmap property to assign a background image to the bar.  The specified image is used independently of the position or state of the bar.  This implies that the bar can be docked to any dock control or floating.  The image below shows an example.

You can also specify the default background image for all bars owned by a bar manager.  Use the Backgrounds.Bar property of the bar manager for this purpose.

If a bar is on a dock control and doesn’t have its own background image specified, it uses the background image of the underlying dock control.  This means that bars are painted transparently.


TdxBar.BorderStyle

TdxBar

Determines the appearance style of toolbar borders.

type

  TdxBarBorderStyle = (bbsNone, bbsSingle);

property BorderStyle: TdxBarBorderStyle;

Description

The BorderStyle property is used to specify the border style of a toolbar.  Available border styles include:

Value	Description	Example
bbsNone	No border.
bbsSingle	Single-line border.

The default value of border style is bbsSingle.


TdxBar.BarManager

TdxBar

Specifies the TdxBarManager object to which a given TdxBar belongs.

property BarManager: TdxBarManager;

Description

Returns the TdxBarManager that owns a given TdxBar.  The TdxBar is referenced via the TdxBarManager Bars property.


TdxBar.Control

TdxBar

Returns the bar control created by the information from a given TdxBar.

property Control: TdxBarControl;

Description

This is a ReadOnly property.  If Visible is True, then this property returns the bar control that has been created by the information stored in a given TdxBar.  Otherwise, it returns nil.


TdxBar.Color

TdxBar

Specifies the bar’s background color.

property Color: TColor;

Description

Use the Color property to change the background color of a bar.  Individual links residing within the bar are also painted using the specified background color.  Note, however, that sub-menus do not use the color specified.

The default value of the Color property is clDefault.


TdxBar.LockUpdate

TdxBar

Controls TdxBar’s screen updates.

property LockUpdate: Boolean;

Description

If this property is True, the modifications of items and item controls, that have links in the TdxBar ItemLinks property, do not refresh the corresponding bar control, which is stored in the Control property.

Assigning False to this property refreshes the control.  This property can be used to prevent numerous toolbar refresh operations during changes to a group of item controls (For example, when the Enabled property is toggled for several items).


TdxBar.Caption

TdxBar          Example

Specifies a text string identifying a toolbar to a user.

property Caption: string;

Description

The Caption is displayed in the header of a movable bar control stored in the Control property as well as in the toolbars list on the customization form.  The Caption is also displayed on the toolbar popup menu.  A Toolbar popup menu is activated at run time on the right mouse button click event within the toolbar docking area.


TdxBar.DockControl

TdxBar          See Also

Specifies the external dock control to which the current toolbar is placed.

property DockControl: TdxBarDockControl;

Description

The ExpressBars allows you to use external dock controls.  This feature extends the functionality of your application.  Use the DockControl property to specify new dock control for the toolbar.


TdxBar.DockedDockControl

TdxBar          See Also

Specifies the external dock control to which the current toolbar was docked.

property DockedDockControl: TdxBarDockControl;

Description

When you drag a toolbar from the dock control, the DockedDockControl property specifies the dock control to which the current toolbar belongs.  If this property value is not nil, a mouse double-click moves the toolbar back to the dock control.


TdxBar.DockingStyle

TdxBar            See Also                  Example 1          Example 2

Specifies the layout of a given bar.

type

  TdxBarDockingStyle = (dsNone, dsLeft, dsTop, dsRight, dsBottom);

property DockingStyle: TdxBarDockingStyle;

Description

Specifies a form’s side to which a toolbar is docked.  If dsNone is included, the toolbar floats.

If Visible is True, then assigning this property changes the style and position of the corresponding bar control.  The last position in both movable and docked modes is stored in internal variables as well as in a form’s resources, and when defined, in the Registry.


TdxBar.Hidden

TdxBar            See Also

Determines if a toolbar is visible or invisible in the toolbar list.

property Hidden: Boolean;

Description

If the Hidden property is True, a toolbar is not displayed in the customization form or in the toolbars popup menu.  The default value is False.

Note:	Setting the Hidden property to True removes a toolbar from the toolbars popup menu and from the toolbar list of the customization form, but does not hide the toolbar.  Use the Visible property to hide or show a toolbar.


TdxBar.IsMainMenu

TdxBar

Determines whether a bar is the main menu.

property IsMainMenu: Boolean;

Description

If IsMainMenu is True, a given TdxBar performs the role of a main menu.  In this instance, the MainMenuBar property of the TdxBarManager component refers to this TdxBar and the TdxBarManager MainMenuControl refers to the Control property of a given TdxBar.  You can set the TdxBar IsMainMenu property programmatically or within the customization form.

Note:	Only one instance of the TdxBar class may have this property set to True.  The value of this property controls the behavior and visualization of the bar control, specified by the Control.


TdxBar.ItemLinks

TdxBar            See Also

Specifies links to items whose item controls are placed on a toolbar.

property ItemLinks: TdxBarItemLinks;

Description

The property is an array of links to TdxBarManager items.  The toolbar item controls are created from these item links.


TdxBar.MultiLine

TdxBar

Specifies whether items can be placed across several lines within a toolbar.

property MultiLine: Boolean;

Description

When there are a lot of items within a toolbar, some of them are not displayed, though they are not hidden.  Set the MultiLine property to True to allow the display of items across several toolbar rows.


TdxBar.Name

TdxBar          See Also

Determines the name of a bar.

property Name: string;

Description

Each bar of a bar manager has a caption which uniquely identifies it.  When the caption is set, the same string value is assigned to the Name property.  You can change this name and use it, for instance, to find the bar via the BarByName method.


TdxBar.NotDocking

TdxBar          See also          Example

Specifies toolbar location restrictions.

type

  TdxBarDockingStyle = (dsNone, dsLeft, dsTop, dsRight, dsBottom);

  TdxBarDockingStyles = set of TdxBarDockingStyle;

property NotDocking: TdxBarDockingStyles;

Description

Specifies application form sides to which a given toolbar cannot be docked.

Note:	If dsNone is included, a toolbar can not be floating.  Pay attention to the state of the TdxBarManager.NotDocking property.


TdxBar.Visible

TdxBar            See Also          Example

Specifies whether a toolbar is visible.

property Visible: Boolean;

Description

If the Visible property is True, the TdxBar Control property is not nil and returns the visible bar control.  Otherwise, the Control is nil and the given TdxBar is not displayed on the screen.  Use this property to hide or display a toolbar.  The following code hides a form’s main toolbar:

// Delphi

if GetBarManagerByForm(Form1) <> nil then

  with GetBarManagerByForm(Form1) do

    if MainMenuBar <> nil then

      MainMenuBar.Visible := False;

// C++Builder

TdxBarManager * BarManager;

BarManager = GetBarManagerByForm(Form1);

  if (BarManager != NULL)

    if (BarManager->MainMenuBar != NULL)

      BarManager->MainMenuBar->Visible = false;


TdxBar.Bars

TdxBar            See Also

Specifies the TdxBars object to which a given toolbar belongs.

property Bars: TdxBars;

Description

The Bars property specifies a list of toolbars controlled by TdxBarManager.  A given toolbar belongs to this TdxBars object.

ReadOnly Property


TdxBar.DockedLeft

TdxBar            See Also          Example

Specifies the left coordinate of a docked toolbar.

property DockedLeft: Integer;

Description

The DockedLeft property is the left coordinate for a docked toolbar. DockedLeft is presented within the dock control coordinates.  For example, if there is one toolbar docked to the right side of a form, then its DockedLeft equals 0.


TdxBar.DockedTop

TdxBar            See Also          Example

Specifies the top coordinate of a docked toolbar.

property DockedTop: Integer;

Description

DockedTop is a toolbar’s top coordinate for docked toolbar.  For example, if there is one toolbar docked to the bottom of a form, then its DockedTop equals 0.


TdxBar.FloatLeft

TdxBar            See Also          Example

Determines the left coordinate of a floating toolbar.

property FloatLeft: Integer;

Description

FloatLeft is a toolbar’s left coordinate when DockingStyle is dsNone.  The FloatLeft property specifies the left toolbar coordinate in the screen coordinates.


TdxBar.FloatTop

TdxBar            See Also          Example

Determines the top coordinate of a floating toolbar.

property FloatTop: Integer;

Description

FloatTop is a toolbar’s top coordinate when DockingStyle is dsNone.  The FloatTop property specifies the top toolbar coordinate in the screen coordinates.


TdxBar.FloatClientWidth

TdxBar            See Also

Determines the width of a floating toolbar.

property FloatClientWidth: Integer;

Description

Specifies toolbar width when its DockingStyle is dsNone. FloatClientWidth specifies toolbar width in the screen coordinates.


TdxBar.FloatClientHeight

TdxBar            See Also

Determines the height of a floating toolbar.

property FloatClientHeight: Integer;

Description

This property specifies toolbar height when its DockingStyle property is dsNone.  The FloatClientHeight specifies toolbar height in the screen coordinates.


TdxBar.Font

TdxBar          See also

Specifies item font.

property Font: TFont;

Description

Determines the font used for all items which belong to a given toolbar.

Note:	If this property is modified, the UseOwnFont property is True.


TdxBar.OneOnRow

TdxBar          Example

property OneOnRow: Boolean;

Description

Two or more toolbars may be located on the same row of a dock control; e.g., two small toolbars may be located one after another.  Use this property to determine if a toolbar is the only toolbar in the row. OneOnRow returns False if a row contains more than one toolbar.


TdxBar.RotateWhenVertical

TdxBar            See also

Defines docked toolbar drawing style.

property RotateWhenVertical: Boolean;

Description

If RotateWhenVertical is set to True (by default), when a given toolbar is docked to the left/right side of a form, all item controls on it are rotated 90 degrees to the right.  Otherwise, orientation of the item controls does not change.


TdxBar.RealDockControl

TdxBar          See Also

Specifies the dock control onto which the current toolbar is placed.

property RealDockControl: TdxDockControl;

Description

Along with external dock controls the ExpressBars contains four default internal dock controls.  Use the RealDockControl property to specify the dock control for a toolbar.

ReadOnly Property


TdxBar.Row

TdxBar            See Also          Example

property Row: Integer;

Description

Toolbars may be docked on several rows.  For example, if DockingStyle of two bars is dsTop, then one of the toolbars may be placed under another.  This property determines the row on which a toolbar is located.


TdxBar.SizeGrip

TdxBar

Specifies whether to display a sizing grip at a toolbar's bootom-right corner.

property SizeGrip: Boolean;

Description

This property is in effect only when the toolbar is docked to the bottom and there are no other controls under it.  Use the SizeGrip property to enable a sizing grip at the toolbar's bottom-right corner.  This grip can be used to resize a form.


TdxBar.UseOwnFont

TdxBar          See also

Specifies the font used to draw toolbar controls.

property UseOwnFont: Boolean;

Description

If the UseOwnFont property is False (by default), then use the font parameter set for a given toolbar from the TdxBarManager.Font property.  Else, use the font parameter set from the TdxBar.Font property.


TdxBar.UseRecentItems

TdxBar          See also

Determines whether new features are used for a given toolbar.

property UseRecentItems: Boolean;

Description

If UseRecentItems is set to True (by default), the most frequently used controls are placed first and other items follow accordingly.  If you do not use this feature, item controls will be displayed on a given toolbar in fixed order.


TdxBar.UseRestSpace

TdxBar          See also          Example

Defines toolbar draw style.

property UseRestSpace: Boolean;

Description

If UseRestSpace is True, a toolbar extends to the opposite edge of a form; Else, a toolbar terminates after the last item control.


TdxBar.WholeRow

TdxBar            See Also

Defines toolbar drawing style.

property WholeRow: Boolean;

Description

If WholeRow is set to True, the toolbar is single in the row and occupies all free space in it. The default value is False.

Setting this property to True or False redraws a toolbar to match the value of WholeRow.


TdxBar.DockedDockingStyle

TdxBar            See Also          Example

Specifies the docking style for the toolbar’s previous position.

property DockedDockingStyle: TdxBarDockingStyle;

Description

This property specifies the docking style of the toolbar’s previous position whereas DockingStyle corresponds to the current docking style of the toolbar.  It is used when a user double-clicks on a toolbar to move the toolbar to its previous location.


TdxBar.Create

TdxBar          See Also

Creates a new TdxBar instance.

constructor Create(Collection: TCollection); override;

Description

Creates and initializes the TdxBar object.  After calling the inherited constructor, Create sets AllowToDeleteOrRename to True and DockingStyle to dsNone.


TdxBar.Destroy

TdxBar          See Also

Destroys an instance of TdxBar.

destructor Destroy; override;

Description

The Destroy property calls the OnDelete method, destroys every item belonging to TdxBar, and then destroys the TdxBar object itself.


TdxBar.ChangeDockingStyle

TdxBar            See Also

Changes the layout of a specific bar.

type

  TdxBarDockingStyle = (dsNone, dsLeft, dsTop, dsRight, dsBottom);

procedure ChangeDockingStyle(AStyle: TdxBarDockingStyle; ADockControl: TdxDockControl);

Description

Call the ChangeDockingStyle method to change the side to which a toolbar is docked, specified by the AStyle parameter.  If the dsNone value is chosen, the toolbar floats.  The ADockControl specifies the internal dock control onto which a toolbar is placed.


TdxBar.Reset

TdxBar          See also

procedure Reset;

Description

Removes any changes a user makes to a toolbar and restores original settings.


TdxBar.ResetWithConfirmation

TdxBar          See also

procedure ResetWithConfirmation;

Description

Displays a generic dialog box with a request message.  In case of a positive answer the TdxBar.Reset method is called to restore original settings.


TdxBars

Hierarchy          Properties           Methods            See Also

Contains a list of all TdxBarManager toolbars.

Unit

dxBar

TdxBars = class(TCollection);

Description

The TdxBars is an array of TdxBar objects.  This class stores all information on position and configuration of every TdxBarManager toolbar.  The TdxBars object is represented in TdxBarManager as the Bars property.


Hierarchy

TCollection

|


TdxBars Properties

TdxBars          Legend

TdxBars

BarManager

DockControls

DockingZoneSize

Items


TdxBars Methods

TdxBars

TdxBars

Add

Create

Destroy

GetUniqueToolbarName


TdxBars.DockControls

TdxBars          Example

Contains an array of dock controls.

type

  TdxBarDockingStyle = (dsNone, dsLeft, dsTop, dsRight, dsBottom);

property DockControls[Index: TdxBarDockingStyle]: TdxDockControl;

Description

Use this property to work with dock controls on which toolbars are located.

ReadOnly Property


TdxBars.BarManager

TdxBars

Returns the TdxBarManager to which a given TdxBars object belongs.

property BarManager: TdxBarManager;

Description

Returns the TdxBarManager that owns a given TdxBars. TdxBars is represented in TdxBarManager as the Bars property.

ReadOnly Property


TdxBars.Items

TdxBars                  Example

Represents a list of TdxBar elements.

property Items[Index: Integer]: TdxBar;

Description

Represents a list of TdxBar elements that are all toolbars of a TdxBarManager component.  The first toolbar index in the list is 0.  The number of elements is stored in the Count property of the ancestor, that is, in the Count property of TCollection.


TdxBars.Create

TdxBars

Creates an instance of TdxBars.

constructor Create(ABarManager: TdxBarManager);

Description

This method creates and initializes a TdxBars instance.  After creating the TdxBars object, its BarManager property is set to ABarManager and the DockingZoneSize is set to 10.


TdxBars.Destroy

TdxBars

Destroys an instance of TdxBars.

destructor Destroy; override;

Description

This method destroys a TdxBars instance, but does not destroy the corresponding TdxBar object to which it refers.


TdxBars.Add

TdxBars              Example 1          Example 2

Adds a new TdxBar to the toolbar list.

function Add: TdxBar;

Description

This method creates an instance of the TdxBar class, adds it to a given TdxBars list and returns the new instance.  Use this function to create new toolbars.


TdxBars.DockingZoneSize

TdxBars            See Also

property DockingZoneSize: Integer;

Description

Specifies the size of the docking zone, that is, the distance from dock control borders to the bar control within which the bar control may be ‘docked’ to this dock control.


TdxBars.GetUniqueToolbarName

TdxBars

Returns a unique name for a toolbar.

function GetUniqueToolbarName(const BaseName: string): string;

Description

This method is called to provide a unique name for a toolbar.  The BaseName parameter determines the initial name.  If this name is already unique, it is returned without changes.  If there is a toolbar with the same name, the appropriate numeral is added at the end of the BaseName string.


TdxBarItemLink

Hierarchy          Properties           Methods            See Also           Example

The TdxBarItemLink is a link between an item and the item control; created by the description taken from the item and TdxBarItemLink.

Unit

dxBar

TdxBarItemLink = class(TCollectonItem);

Description

Instances of this type are stored in TdxBarItemLinks.  TdxBarItemLink defines the link between an item and item control on the bar control. TdxBarItemLink Control refers to the item control.

In order to perform actions on item controls, use the TdxBarItemLink instance, but not the item control itself.  If you wish to add or remove an existing link from the ItemLinks property of any TdxBar, TdxBarPopupMenu, TCustomdxBarSubItem class or their descendants, do it at the TdxBarItemLink and TdxBarItemLinks level(s).

The published properties of TdxBarItemLink are stored in the Registry if defined in a corresponding TdxBarManager.  Use the TdxBarItemLink methods and properties to customize the look of a particular item control.  The easiest way to define the look of the item control is to use the customizing popup menu.  To activate the customizing popup menu click the right mouse button on the item control.


Hierarchy

TCollectionItem

|


TdxBarItemLink Properties

TdxBarItemLink               Legend

TdxBarItemLink

AvailableIndex

BarControl

BarManager

BeginGroup

CanVisibleIndex

Caption

Control

Data

Glyph

Item

ItemRect

MostRecentlyUsed

PaintStyle

RealItemLink

RowHeight

UserCaption

UserDefine

UserGlyph

UserPaintStyle

UserWidth

Visible

VisibleIndex

Width


TdxBarItemLink Methods

TdxBarItemLink               Legend

TdxBarItemLink

BringToTopInRecentList

Create

Destroy

SendToBottomInRecentList


TdxBarItemLink.BringToTopInRecentList

TdxBarItemLink          See Also          Example

"Promotes" an item link in the list of the most frequently used items.

procedure BringToTopInRecentList(IncCount: Boolean);

Description

Use this procedure to "promote" an item control, corresponding to a given item link in the list of the most frequently used menu items.  If the IncCount parameter is True, the hit counter of an item link increases; i.e. The item is "promoted" as if it had been pressed.  Otherwise, the hit counter remains unchanged.

Note:	This procedure is used if the MenusShowRecentItemsFirst property of a bar manager is set to True and the UseRecentItems property of TdxBar is True.


TdxBarItemLink.SendToBottomInRecentList

TdxBarItemLink          See Also

procedure SendToBottomInRecentList;

Description

Use this procedure to move an item control, corresponding to a given item link in the list of most frequently used menu items, to the bottom of the list.  After calling this method, an item is set as least frequently used.

Note:	This procedure is used when the MenusShowRecentItemsFirst property of a bar manager is set to True and the UseRecentItems property of TdxBar is True.


TdxBarItemLink.RowHeight

TdxBarItemLink

property RowHeight: Integer;

Description

This property is used internally.  It specifies the height of a linked item control.  If an item is the first in a group, height includes the height of the group separator.  The height of an item control depends upon the DockingStyle of a parent bar control.


TdxBarItemLink.BarControl

TdxBarItemLink            See Also

Determines the bar control containing the item control, specified by the TdxBarItemLink Control property.

property BarControl: TCustomdxBarControl;

Description

Returns the bar control containing the item control managed by a given TdxBarItemLink.  This bar control is a parent of the item control returned by the Control property.


TdxBarItemLink.BarManager

TdxBarItemLink

Specifies the TdxBarManager that owns a given TdxBarItemLink.

property BarManager: TdxBarManager;

Description

Specifies the TdxBarManager to which a given item link belongs. BarManager returns the same TdxBarManager as the TdxBarItemLinks object that includes the given TdxBarItemLink.

ReadOnly Property


TdxBarItemLink.Caption

TdxBarItemLink            See Also

Determines control caption.

property Caption: string;

Description

Returns the current caption used by a control.  If the udCaption style is in the UserDefine property, Caption equals the UserCaption property, otherwise, the Caption property is the same as item Caption.

ReadOnly Property


TdxBarItemLink.Control

TdxBarItemLink            See Also

Returns the item control specified by TdxBarItemLink information.

property Control: TdxBarItemControl;

Description

Returns the item control created by information stored in a given TdxBarItemLink and the item specified by the TdxBarItemLink Item property.  This item control belongs to the bar control specified by the BarControl property of TdxBaritemLink.  If a bar control is not visible (it is equal to nil) or a TdxBarItemLink is not visible itself due to the value of the Item Visible property, then the Control property is nil.

ReadOnly Property


TdxBarItemLink.Glyph

TdxBarItemLink            See Also

Specifies item control glyph.

property Glyph: TBitmap;

Description

Returns the current glyph used for item control visualization.  If an additional picture has been specified for the item control (udGlyph is included in UserDefine), this property returns the glyph, specified by the UserGlyph property, otherwise, it returns the glyph, specified by the Glyph property of the item.

ReadOnly Property


TdxBarItemLink.ItemRect

TdxBarItemLink

Returns item control coordinates.

property ItemRect: TRect;

Description

If TdxBarItemLink is not nil, the ItemRect returns item coordinates relative to the client area of a bar control.


TdxBarItemLink.PaintStyle

TdxBarItemLink

Specifies item control paint style.

type

  TdxBarPaintStyle = (psStandard, psCaption, psCaptionInMenu, psCaptionGlyph);

property PaintStyle: TdxBarPaintStyle;

Description

Returns the paint style of an item control.  If udPaintStyle is included in UserDefine, the property returns UserPaintStyle; otherwise, it returns the PaintStyle of the item.  In the latter, if the item specified by TdxBarItemLink is of type TdxBarButton, PaintStyle equals TdxBarButton paint style; For other item types, TdxBarItemLink equals psStandard.

ReadOnly Property


TdxBarItemLink.VisibleIndex

TdxBarItemLink            See Also

Returns item’s position in the VisibleItems array of TdxBarItemLinks.

property VisibleIndex: Integer;

Description

TdxBarItemLink is indexed in the VisibleItems array of TdxBarItemLinks to which it belongs. The VisibleIndex property of TdxBarItemLink contains an item’s index value in that array.

VisibleItems is a zero-based array. The first member of it has an index value of 0, the second member has an index value of 1, and so on.

ReadOnly Property


TdxBarItemLink.BeginGroup

TdxBarItemLink            Example 1          Example 2

Specifies whether an item control starts a group.

property BeginGroup: Boolean;

Description

If True, the item control is the first in a group.  It cannot start the group if VisibleIndex equals 0.  When you change the value of the BeginGroup property, a TdxBarManager OnItemLinkChange event is generated.


TdxBarItemLink.Item

TdxBarItemLink            See Also              Example 1          Example 2

property Item: TdxBarItem;

Description

This property represents the item a given TdxBarItemLink object links to an item control.  The BarManager property of an item may not equal the TdxBarManager of a form; (i.e. In MDI applications when the MDI-child form is maximized and both the main form and the MDI child have components of type TdxBarManager with main menus).


TdxBarItemLink.UserCaption

TdxBarItemLink            See Also                   Example 1          Example 2

Determines an additional caption defined by a user.

property UserCaption: string;

Description

Contains the definitive caption of an item control. UserCaption always overrides item Caption.  This property can be modified from the context-sensitive modification popup menu.  This menu is invoked by a right mouse button click on an item control when toolbar customizing is active. Set UserCaption programmatically or by means of the customizing popup:


TdxBarItemLink.UserDefine

TdxBarItemLink                   Example

Specifies the properties defined by a user.

type

  TdxBarUserDefine = (udCaption, udGlyph, udPaintStyle, udWidth);

  TdxBarUserDefines = set of TdxBarUserDefine;

property UserDefine: TdxBarUserDefines;

Description

This property is a set of TdxBarUserDefine type elements.  The elements determine the values of Caption, Glyph, PaintStyle, and Width properties.  If an element is included in UserDefine, these properties will contain the UserCaption, UserGlyph, UserWidth, and UserPaintStyle accordingly.  When changing these properties, the appropriate elements are added to UseDefine.


TdxBarItemLink.UserGlyph

TdxBarItemLink            See Also                Example 1          Example 2

Specifies a user-defined glyph.

property UserGlyph: TBitmap;

Description

This property determines a user-defined or programmatically defined glyph.  If udGlyph is included in UserDefine, the additional glyph affects the Glyph property.  This element is automatically added to UserDefine when changing UserGlyph.


TdxBarItemLink.UserPaintStyle

TdxBarItemLink            See Also          Example 1          Example 2

Specifies a user-defined paint style.

type

  TdxBarPaintStyle = (psStandard, psCaption, psCaptionInMenu, psCaptionGlyph);

property UserPaintStyle: TdxBarPaintStyle;

Description

This property can be modified from the context-sensitive modification popup menu or programmatically.  The menu is invoked by clicking the right mouse button on an item control when the customization form is active.  By default, UserPaintStyle is psStandard.  Set the UserPaintStyle programmatically or by means of the customizing popup:


TdxBarItemLink.Create

TdxBarItemLink

Creates a TdxBarItemLink instance.

constructor Create(Collection: TCollection); override;

Description

This method creates and initializes a TdxBarItemLink instance.  The BeginGroup property of the instance is set to False.  The Create method generates a TdxBarManager OnItemLinkAdd event.


TdxBarItemLink.Destroy

TdxBarItemLink

Destroys a TdxBarItemLink instance.

destructor Destroy; override;

Description

This method destroys a TdxBarItemLink instance and generates an TdxBarManager OnItemLinkDelete event and TdxBarItemLinks OnChange event.


TdxBarItemLink.UserWidth

TdxBarItemLink            See Also          Example

Specifies item control width.

property UserWidth: integer;

Description

TdxBarItemLink describes the link between an item and item control.  Use UserWidth to specify the width of a particular item control.  By default, all item controls linked to the item have the same width. UserWidth may be used to customize different width values for different item controls.


TdxBarItemLink.Width

TdxBarItemLink

Returns item control width.

property Width : integer;

Description

Use this property to access width of an item control.  If UserWidth is defined, Width equals UserWidth; Else Width equals 0.

ReadOnly Property


TdxBarItemLinks

Hierarchy          Properties           Methods           Events          Example

TdxBarItemLinks is a collection of TdxBarItemLink elements.   TdxBarItemLinks represents TdxBarItemLink objects in bar controls or sub items.

Unit

dxBar

TxBarItemLinks = class(TCollection);

Description

Each TdxBarItemLinks class holds a group of TdxBarItemLink objects which represent links between TdxBarManager items and corresponding item controls.  The TdxBarItemLinks object stores information on the number and behavior of the newly created item controls for toolbars, popup menus, and submenus.  For instance, every toolbar uses the ItemLinks property of type TdxBarItemLinks to specify the items that have linked item controls on the toolbar.

The TdxBarItemLinks derives methods and properties from TCollection:

  Use the Add method to add TdxBarItemLink objects to the TdxBarItemLinks collection.

  Use the Clear method to remove all item links from the TdxBarItemLinks object.

  The Count property contains the number of item links in TdxBarItemLinks.


Hierarchy

TCollection

|


TdxBarItemLinks Properties

TdxBarItemLinks               Legend

TdxBarItemLinks

AvailableItems

AvailableItemCount

BarControl

BarManager

CanVisibleItems

CanVisibleItemCount

Items

Owner

 	RealVisibleItemCount

VisibleItemCount

VisibleItems


TdxBarItemLinks Methods

TdxBarItemLinks               Legend

TdxBarItemLinks

Add

AvailableIndexOf

CanVisibleIndexOf

Create

CreateBarControl

Destroy

HasItem

IndexOf

Update

VisibleIndexOf


TdxBarItemLinks Events

TdxBarItemLinks

TdxBarItemLinks

OnChange


TdxBarItemLinks.RealVisibleItemCount

TdxBarItemLinks          See Also

Returns the number of visible item links belonging to a given item links collection.

property RealVisibleItemCount: Integer;

Description

The RealVisibleitemCount property returns the number of visible item links on screen.


TdxBarItemLinks.BarManager

TdxBarItemLinks            See Also

Specifies the TdxBarManager to which a given TdxBarItemLinks object belongs.

property BarManager: TdxBarManager;

Description

Returns the TdxBarManager specified at TdxBarItemLinks creation as a constructor's parameter.

ReadOnly Property

Note:	As a rule, BarManager is the TdxBarManager of the object that is stored in the TdxBarItemLinks Owner property.


TdxBarItemLinks.BarControl

TdxBarItemLinks

Specifies the bar control that owns the item control specified in the TdxBarItemLink object.

property BarControl: TCustomdxBarControl;

Description

Returns the bar control created by the CreateBarControl method.  It can equal nil if the Owner has no visual representation (that is if the Owner is currently invisible).

ReadOnly Property


TdxBarItemLinks.Items

TdxBarItemLinks            See Also

Represents an array of TdxBarItemLink elements.  These elements are used to link an item to the item control on the toolbar.

property Items[Index: Integer]: TdxBarItemLink;

Description

Items is an indexed array containing all TdxBarItemLink type objects stored in a given TdxBarItemLinks object.  The first element's index is 0.  The number of elements in Items is stored in the ancestor's Count property (TCollection Count property).


TdxBarItemLinks.Owner

TdxBarItemLinks

Returns the owner of a given TdxBarItemLinks object.

property Owner: TObject;

Description

Returns the object which owns a given TdxBarItemLinks.  Owner can include TdxBar, TdxBarPopupMenu, TCustomdxBarSubItem object, or it can be nil.  The type of Owner impacts the bar control created by the CreateBarControl method.  If Owner is TdxBar, then a TdxBarControl is created; Else a TdxBarSubMenuControl is created.

ReadOnly Property


TdxBarItemLinks.VisibleItems

TdxBarItemLinks            See Also

VisibleItems is an indexed array of TdxBarItemLink elements with visible items.

property VisibleItems[Index: Integer]: TdxBarItemLink;

Description

The array contains TdxBarItemLink objects with visible items in a toolbar at the moment. The value of the Index parameter corresponds to the VisibleIndex property of TdxBarItemLink.

ReadOnly Property


TdxBarItemLinks.VisibleItemCount

TdxBarItemLinks          See Also

Returns the number of items in the VisibleItems array.

property VisibleItemCount: Integer;

Description

VisibleItemCount contains the number of items in the TdxBarItemLinks.VisibleItems array. Since this array is indexed starting with 0, the value of VisibleCount is always one greater than the index of the last member of VisibleItems.

ReadOnly Property


TdxBarItemLinks.Add

TdxBarItemLinks              Example 1          Example 2

Add a new TdxBarItemLink element to a given TdxBarItemLinks object.

function Add: TdxBarItemLink;

Description

This method creates an instance of the TdxBarItemLink class, adds it to the list of a given TdxBarItemLinks and returns the new TdxBarItemLink.  Use this function to create new item links and new item controls.


TdxBarItemLinks.CreateBarControl

TdxBarItemLinks            See Also

Specifies the bar control created with information stored in TdxBarItemLinks.

procedure CreateBarControl;

Description

This method creates a bar control using information stored in a given TdxBarItemLinks, considering Owner.  If Owner is TdxBar, an instance of type TdxBarControl is created; Else, an instance of type TdxBarSubMenuControl is created.

Note:	The newly created bar control is stored in the BarControl property.


TdxBarItemLinks.HasItem

TdxBarItemLinks

Determines whether the specified item belongs to a given TdxBarItemLinks object.

function HasItem(AItem: TdxBarItem): Boolean;

Description

If True, either the given TdxBarItemLinks or the child TdxBarItemLinks object contains an item link to the item specified by the AItem parameter.


TdxBarItemLinks.IndexOf

TdxBarItemLinks            See Also

function IndexOf(Value: TdxBarItemLink): Integer;

Description

Returns the index of a TdxBarItemLink object specified by Value in the indexed property Items.  The index of the first item link in the collection is 0.


TdxBarItemLinks.VisibleIndexOf

TdxBarItemLinks            See Also

Returns position of a specified TdxItemLink in the TdxbarItemLinks.VisibleItems array.

function VisibleIndexOf(Value: TdxBarItemLink): Integer;

Description

Call VisibleIndexOf to get the index of Value in the indexed property of visible item links - VisibleItems.  The index of the first element in the VisibleItems array is 0. VisibleIndexOf returns -1 if Value is not in the array.


TdxBarItemLinks.Create

TdxBarItemLinks            See Also

Creates a TdxBarItemLinks instance.

constructor Create(ABarManager: TdxBarManager);

Description

This method creates and initializes an object of type TdxBarItemLinks.  The ABarManager parameter specifies the instance of TdxBarManager which owns the given TdxBarItemLinks object.


TdxBarItemLinks.Destroy

TdxBarItemLinks

Destroys a given TdxBarItemLinks instance.

destructor Destroy; override;

Description

This method destroys a given TdxBarItemLinks instance and the object specified by its BarControl property.


TdxBarItemLinks.OnChange

TdxBarItemLinks

The OnChange event is generated when adding or deleting elements from TdxBarItemLinks.

property OnChange: TNotifyEvent;

Description

This event occurs after changing a given TdxBarItemLinks (upon adding or deleting elements).  This event is used internally to process changes in item links of toolbars.


TdxBarItemLinks.Update

TdxBarItemLinks

procedure Update(Item: TCollectionItem); override;

Description

Generates an OnChange event and notifies TdxBarManager of changes in a TdxBarItemLink object.


TdxBarPopupMenu

Hierarchy          Properties           Methods           Events              Example

The TdxBarPopupMenu component is designed to help you create popup menus from items stored in a TdxBarManager.

Unit

dxBar

TdxBarPopupMenu = class(TComponent);

Description

Use this component when you wish to create a popup menu with links to items of a particular TdxBarManager. TdxBarManager is specified by the BarManager property. TdxBarManager and the popup menu may belong to different forms; therefore, you may use the TdxBarPopupMenu on a form which does not include a TdxBarManager.

Note: if you need to close popup menus programmatically, you will need to perform the steps below:

•	Obtain the currently active popup menu via the ActiveBarControl function call;

•	Call the obtained object’s HideAll method.


Hierarchy

TComponent

|


TdxBarPopupMenu Properties

TdxBarPopupMenu               Legend

TdxBarPopupMenu

BackgroundBitmap

BarManager

BarSize

Font

ItemLinks

UseOwnFont

UseRecentItems


TdxBarPopupMenu Methods

TdxBarPopupMenu

TdxBarPopupMenu

Create

Destroy

Popup

PopupEx

PopupFromCursorPos


TdxBarPopupMenu Events

TdxBarPopupMenu               Legend

TdxBarPopupMenu

OnCloseUp

OnPaintBar

OnPopup


TdxBarPopupMenu.BackgroundBitmap

TdxBarPopupMenu

Specifies the popup menu’s background image.

property BackgroundBitmap: TBitmap;

Description

Use the BackgroundBitmap property to specify the bitmap used as the popup menu’s background.  Note that you can also assign a default background image for all popup menus owned by a bar manager.  Use the Backgrounds.SubMenu property of the bar manager for this purpose.


TdxBarPopupMenu.BarManager

TdxBarPopupMenu            See Also

Represents the TdxBarManager object which owns a given TdxBarPopupMenu object.

property BarManager: TdxBarManager;

Description

This property is an object of type TdxBarManager. TdxBarManager items are used for popup menu generation.


TdxBarPopupMenu.BarSize

TdxBarPopupMenu          See Also

Determines the size of a bar at the left side of a popup menu.

property BarSize: Integer;

Description

A bar is drawn at the left side of a popup menu window.  Use the BarSize property to set the size of this bar in pixels.  The default value for this property is 0.

Use the OnPaintBar event to draw this bar based upon your specific needs.


TdxBarPopupMenu.Font

TdxBarPopupMenu          See also

Specifies the font of a popup menu.

property Font: TFont;

Description

Determines the font used for all items which belong to a given popup menu.

Note:	If it is modified, the UseOwnFont property is True.


TdxBarPopupMenu.ItemLinks

TdxBarPopupMenu

Determines a TdxBarItemLinks array.

property ItemLinks: TdxBarItemLinks;

Description

This property is an array of item links to TdxBarManager items.  The Popup method uses the value of this property in order to create a bar control of type TdxBarSubMenuControl.


TdxBarPopupMenu.UseOwnFont

TdxBarPopupMenu          See also

Specifies the font used to draw a popup menu.

property UseOwnFont: Boolean;

Description

If the UseOwnFont property is False (by default), then use the font parameter set for a given popup menu from the TdxBarManager.Font property.  Else, use the font parameter set from the TdxBarPopupMenu.Font property.


TdxBarPopupMenu.UseRecentItems

TdxBarPopupMenu

Determines whether new features are used for a given popup menu.

property UseRecentItems: Boolean;

Description

If set to True (by default), only the most frequently used items are displayed.  Else, all items will be displayed in a given popup menu.


TdxBarPopupMenu.Popup

TdxBarPopupMenu            See Also

Displays a popup menu on screen.

procedure Popup(X, Y: Integer);

Description

This method is used to activate a popup menu at a screen point with (X,Y) coordinates.  The coordinates are relative to the desktop’s upper left corner.


TdxBarPopupMenu.PopupEx

TdxBarPopupMenu            See Also

Displays a popup menu on screen.

procedure PopupEx(X, Y, AOwnerWidth, AOwnerHeight: Integer; AShowAnimation: Boolean; AOwnerBounds: PRect);

Description

This method displays a popup menu at the position specifies by the X and Y parameters.  Note that these parameters specify screen coordinates.  The AOwnerWidth and AOwnerHeight parameters are used if the popup menu doesn’t fit into the desktop.  By default (if these parameters are set to 0 or the Popup method is used), the popup menu will be  shifted by the number of pixels required for it to be completely displayed.  In some cases however, you may need the popup menu to not overlap the control it is displayed for (this behavior is typical for dropdown buttons, for instance).  In this case, you should use the AOwnerWidth and AOwnerHeight parameters to specify the width and height of the rectangle that shouldn’t be overlapped.  The X and Y parameters specify the rectangle’s bottom-right corner in this case.

Note that passing 0 as the AOwnerWidth parameter and a positive integer as the AOwnerHeight parameter creates a horizontal band that will not be overlapped.  The Y parameter specifies the band’s bottom coordinate while the AOwnerHeight parameter is the band’s height.  On the other hand, passing 0 as the AOwnerHeight parameter and a positive integer as the AOwnerWidth parameter creates a vertical band that will not be overlapped.

You may prevent animation effects when displaying a popup window by setting the AShowAnimation parameter to False.  By default, the animation is specified by the bar manager’s MenuAnimations property.

Lastly, the AOwnerBounds property enables you to display a shadow around the control for which the menu was invoked.  You should pass the control’s bounding rectangle in screen coordinates for this purpose.  This imitates the behavior of menus in Microsoft Office 10 (a main menu’s item whose sub-menu is invoked is raised by painting a shadow under it).  Note, however that one of the popup menu’s edges must match a control’s edge. Otherwise, the shadow will not be displayed.


TdxBarPopupMenu.PopupFromCursorPos

TdxBarPopupMenu            See Also          Example 1          Example 2

procedure PopupFromCursorPos;

Description

Displays a PopupMenu at the current cursor position.  This procedure calls the Popup method and supplies it with mouse pointer coordinates.


TdxBarPopupMenu.Create

TdxBarPopupMenu

Creates a TdxBarPopupMenu instance.

constructor Create(AOwner: TComponent); override;

Description

If a form includes TdxBarManager, the BarManager property is set to the form’s TdxBarManager object; Else, the BarManager property is set to the first available TdxBarManager object in the TdxBarManagerList list.


TdxBarPopupMenu.Destroy

TdxBarPopupMenu

destructor Destroy; override;

Description

This method destroys a TdxBarPopupMenu instance.  Descendants can override this method to perform special actions when destroying.


TdxBarPopupMenu.OnCloseUp

TdxBarPopupMenu

Occurs when closing a popup menu.

property OnCloseUp: TNotifyEvent;

Description

This event occurs after closing a popup menu and destroying its handle.  Write a OnCloseUp event handler to perform special actions when a menu is closed.


TdxBarPopupMenu.OnPaintBar

TdxBarPopupMenu          See Also

Occurs when drawing a bar at the left side of a popup menu.

type

  TdxBarPaintSubMenuBarEvent = procedure(Sender: TObject; Canvas: TCanvas; const R: TRect) of object;

property OnPaintBar: TdxBarPaintSubMenuBarEvent;

Description

Write an OnPaintBar event handler to draw the left side bar based upon your specific needs.  The Canvas parameter determines canvas for drawing.  The R parameter specifies the rectangle for drawing.

The following example allows you to draw this bar and fill it with a green color.

Canvas.Brush.Color := clGreen;

Canvas.FillRect(R);


TdxBarPopupMenu.OnPopup

TdxBarPopupMenu

property OnPopup: TNotifyEvent;

Description

This event occurs before displaying a menu on screen.  Write an OnPopup event handler to perform special actions just before a popup menu appears.


TdxDockControl

Hierarchy          Properties           Methods            See Also

Used to draw dock control lines.

Unit

dxBar

TdxDockControl = class(TCustomControl)

Description

TdxDockControl draws a dock control, or location of a toolbar.  Visually this control appears as a rectangle on the top/bottom/right/left side of a form.  One dock control can hold several toolbars within it. A Dock consists of rows; rows in turn consist of columns.  A Dock row is described by the TdxDockRow class, a dock column is described by the TdxDockCol class.


Hierarchy

TCustomControl

|


TdxDockControl Properties

TdxDockControl               Legend

TdxDockControl

AllowDocking

BackgroundBitmap

BarManager

Bars

DockingStyle

RowCount

RowList

Rows


TdxDockControl Methods

TdxDockControl               Legend

TdxDockControl

CreateEx


TdxDockControl.AllowDocking

TdxDockControl          See Also

Specifies whether toolbars can be docked to this dock control.

property AllowDocking: Boolean;

Description

Set the AllowDocking property to False to prevent toolbars from being docked to the TdxBarDockControl temporarily.  Set the property back to True to enable docking.  This lets you customize the docking facilities at runtime.

Note that the AllowDocking property cannot be used to customize default dock controls created by the bar manager.  This means, you cannot use this property to specify whether toolbars can be docked to the left, top, right and bottom form’s edges.  For these purposes, you should use the bar manager’s NotDocking property.  You can also use a particular bar’s NotDocking property to customize the docking behavior of an individual toolbar.


TdxDockControl.BackgroundBitmap

TdxDockControl          See Also

Specifies the background image for dock control.

property BackgroundBitmap: TBitmap;

Description

The background image of dock controls, automatically created by a bar manager, is specified by the bar manager’s Backgrounds.Bar property.  Thus, all such dock controls will have a common background image.

The BackgroundBitmap property can be used to set the background image for manually created dock controls.  Such dock controls are represented by the TdxBarDockControl class which publishes this property.

Note that bars are painted transparently when docked to a dock control provided that their BackgroundBitmap property is not set.  Thus, if toolbars don’t have their own background image assigned, they use the background image specified by the underlying dock control’s BackgroundBitmap property.


TdxDockControl.RowList

TdxDockControl          See Also          Example

property RowList: TList;

Description

Toolbar within a dock control can be arranged across several rows and columns.  The RowList property contains a list of objects of type TdxDockRow which are presented as rows of toolbars.  Use this property to access the TdxDockRow object which determines a toolbar's layout on screen.

ReadOnly Property


TdxDockControl.BarManager

TdxDockControl            See Also

Specifies the TdxBarManager to which a TdxDockControl object belongs.

property BarManager: TdxBarManager;

Description

Returns the TdxBarManager which owns a given TdxDockControl object.

ReadOnly Property


TdxDockControl.Bars

TdxDockControl            See Also

property Bars: TdxBars;

Description

Specifies the list of TdxBar objects in order to represent them as toolbars.


TdxDockControl.RowCount

TdxDockControl            See Also

Returns the number toolbar rows in a dock control.

property RowCount: Integer;

Description

Use the RowCount property to obtain the number of rows which are used to display toolbars within a dock control.

ReadOnly Property


TdxDockControl.Rows

TdxDockControl            See Also

Contains a list of rows within a dock control.

property Rows[Index: Integer]: TdxDockRow;

Description

Toolbars within a dock control can be arranged across several rows and columns.  The Rows property contains a list of TdxDockRow objects which represent rows of toolbars.  Use this property to access a specific row, specified by the Index parameter.  The first row index is 0.  The number of rows is stored in the RowCount property.

ReadOnly Property


TdxDockControl.DockingStyle

TdxDockControl            See Also

Indicates the control’s docking style.

property DockingStyle: TdxBarDockingStyle;

Description

Use the DockingStyle property to determine the container’s edge where the dock control is docked.  If you need to change the dock control’s docking style, use the Align property instead.

Note: the DockingStyle property value matches the DockingStyle property values for all bars residing within a dock control.

ReadOnly Property


TdxDockControl.CreateEx

TdxDockControl          See Also

Creates a TdxDockControl instance with a specified docking style.

constructor CreateEx(AOwner: TComponent; ABarManager: TdxBarManager; ADockStyle: TdxBarDockingStyle;

Description

This constructor creates a TdxDockControl object and docks it according to that specified by the ADockStyle parameter.  The BarManager property of the new TdxDockControl control is set to ABarManager.


TdxDockCol

Hierarchy          Properties           Methods           See Also          Example

TdxDockCol describes columns in TdxDockRow.

Unit

dxBar

TdxDockCol = class(TObject);

Description

A TdxDockCol object represents a particular bar control in TdxDockControl.  Objects of this class are for internal use.


Hierarchy

TObject

|


TdxDockCol Properties

TdxDockCol               Legend

TdxDockCol

BarControl

DockRow

Pos


TdxDockCol Methods

TdxDockCol               Legend

TdxDockCol

Create


TdxDockCol.BarControl

TdxDockCol            See Also

property BarControl: TdxBarControl;

Description

Specifies the toolbar that corresponds to a given TdxDockCol object.

ReadOnly Property


TdxDockCol.DockRow

TdxDockCol            See Also

property DockRow: TdxDockRow;

Description

Specifies a TdxDockRow object to which a given TdxDockCol instance belongs.


TdxDockCol.Pos

TdxDockCol          Example 1          Example 2

property Pos: TPoint;

Description

Determines the coordinates of the top left corner of a TdxDockCol object. Pos specifies the point in the dock control coordinates.


TdxDockCol.Create

TdxDockCol

constructor Create(ADockRow: TdxDockRow; ABarControl: TdxBarControl);

Description

Creates a TdxDockCol instance.  ADockRow and ABarControl parameters specify the TdxDockRow and TdxBarControl objects to which a given instance belongs.


TdxDockRow

Hierarchy          Properties           Methods           See Also

The TdxDockRow describes a row in a TdxDockControl.

Unit

dxBar

TdxDockRow = class(TObject);

Description

Represents a toolbar in a TdxDockControl object.  Dock controls can have several rows, for instance, when a user places one toolbar below another (when DockingStyle is dsTop or dsBottom).  This object for internal use.


Hierarchy

TObject

|


TdxDockRow Properties

TdxDockRow               Legend

TdxDockRow

DockControl

ColCount

ColList

Cols


TdxDockRow Methods

TdxDockRow

TdxDockRow

Create

Destroy


TdxDockRow.DockControl

TdxDockRow            See Also

property DockControl: TdxDockControl;

Description

Returns the TdxDockControl object that owns a given TdxDockRow instance.


TdxDockRow.ColCount

TdxDockRow          See Also

Returns the number of toolbar columns in a specific row.

property ColCount: Integer;

Description

Use the ColCount property to obtain the number of columns which are used to display toolbars within a row.

ReadOnly Property


TdxDockRow.ColList

TdxDockRow          See Also          Example 1          Example 2

property ColList: TList;

Description

Represents a list of TdxDickCol objects belonging to a given TdxDockRow instance, i.e. the toolbars on a row.

ReadOnly Property


TdxDockRow.Cols

TdxDockRow          See Also

Contains a list of rows within a dock control.

property Cols[Index: Integer]: TdxDockCol;

Description

Toolbars within a dock control can be arranged across several rows and columns.  The Cols property contains a list of TdxDockCol objects which represent columns of toolbars.  Use this property to access a specific column, specified by the Index parameter.  The first column index is 0.  The number of columns is stored in the ColCount property.

ReadOnly Property


TdxDockRow.Create

TdxDockRow

constructor Create(ADockControl: TdxDockControl);

Description

Creates a TdxDockRow instance.  The ADockControl parameter specifies the TdxDockControl object-owner.


TdxDockRow.Destroy

TdxDockRow

destructor Destroy;

Description

Destroys a TdxDockRow object and the TdxDockCol objects which it owns.


TdxBarControl

Hierarchy          Properties           Methods

Unit

dxBar

TdxBarControl = class(TCustomdxBarControl);

Description

TdxBarControl is inherited from TCustomdxBarControl and visually represents an informational object of type TdxBar.


Hierarchy

TCustomdxBarControl

|


TdxBarControl Properties

TdxBarControl               Legend

TdxBarControl

Bar

IsDowned

Moving

MDIButtonHeight

MDIButtonWidth

Derived from TCustomdxBarControl

BarManager

BkBrush

ChildBar

ComboBoxArrowWidth

DockingStyle

EditFontHandle

EditTextSize

IsActive

IsCustomizing

ItemLinks

MarkState

MenuArrowWidth

ParentBar

SelectedItem

TextSize


TdxBarControl Methods

TdxBarControl               Legend

TdxBarControl

BarGetFocus

BarLostFocus

CaptionChanged

CreateEx

ItemAtPosEx

PaintItem

Repaint

Derived from TCustomdxBarControl

AdjustSize

CalcDrawingConsts

Create

CreateControls

Destroy

DestroyControls

GetFullItemRect

GetItemRectEx

GetItemRegion

HideAll

HideOnClick

IsChildBar

ItemAtPos

ItemAtPosEx

NotHandleMouseMove

PaintItem

PaintSelectedItem

RepaintBar

SetKeySelectedItem

SetMouseSelectedItem


TdxBarControl.MDIButtonHeight

TdxBarControl            See Also

Specifies the height of border icons on a toolbar.

property MDIButtonHeight: Integer;

Description

In MDI applications, child forms may be maximizied to fit the size of the parent form.  In this instance, the main toolbar of the child form merges with the main toolbar of the parent; the border icons of the child form are drawn on the main toolbar of the parent window.  The MDIButtonHeight property is used internally to draw border icons of the child form onto the toolbar of the parent form when the child is maximized.


TdxBarControl.MDIButtonWidth

TdxBarControl            See Also

Specifies the width of border icons on a toolbar.

property MDIButtonWidth: Integer;

Description

In MDI applications, child forms may be maximizied to fit the size of the parent form.  In this instance, the main toolbar of the child form merges with the main toolbar of the parent; the border icons of the child form are drawn on the main toolbar of the parent window.  The MDIButtonWidth property is used internally to draw the border icons of the child form onto the toolbar of the parent form when the child form is maximized.


TdxBarControl.Bar

TdxBarControl            See Also

Specifies the TdxBar object to represent it on screen.

property Bar: TdxBar;

Description

TdxBarControl represents the TdxBar object on screen.  Information for the appearance of  TdxBarControl is taken from the TdxBar object specified by the Bar property.


TdxBarControl.IsDowned

TdxBarControl

Specifies whether a bar control is unfolded.

property IsDowned: Boolean;

Description

This property is used to determine if a bar control is active and unfolded.  For example, when the mouse is over the submenu control on a toolbar, the sub menu is selected, but not unfolded.  Clicking the button forces the sub menu to unfold.  When the bar control is unfolded, the IsDowned property is set to True.  When the mouse moves to the next subitem and IsDowned is True, the next subitem unfolds automatically.  It is useful for main menus because it allows navigation through main menu items with automatic subitems unfolding.

Note:	Direct setting of the IsDowned property to True does not unfold the submenu.


TdxBarControl.Moving

TdxBarControl

Determines if a bar control is being moved.

property Moving: Boolean;

Description

When Moving equals True, a given bar control is being moved by the user.  This property is used internally.


TdxBarControl.CaptionChanged

TdxBarControl

This function draws the caption of a control window.

procedure CaptionChanged; virtual;

Description

This function is called internally when changing a TdxBarControl window caption (if it exists).  It is required, for instance, when a user sets the new Caption property of the control.


TdxBarControl.ItemAtPosEx

TdxBarControl           See Also

Returns an item control by its coordinates.

function ItemAtPosEx(Pos: TPoint; var IsBeginGroup, IsFirstPart, IsVerticalDirection: Boolean): TdxBarItemControl; override;

Description

TdxBarControl ItemAtPosEx overrides the TCustomdxBarControl method.  If the Pos specifies a point beyond a toolbar’s last item control, the ItemAtPosEx returns the toolbar’s last item control, and the IsBeginGroup and IsFirstPart parameters are set to False.


TdxBarControl.PaintItem

TdxBarControl            See Also

procedure PaintItem(AControl: TdxBarItemControl); override;

Description

Paints the item control specified by the AControl parameter.  The method by which an item control is represented on screen depends on a bar control’s DockingStyle property.


TdxBarControl.CreateEx

TdxBarControl

Creates a TdxBarControl instance.

constructor CreateEx(AOwner: TComponent; ABar: TdxBar); virtual;

Description

Creates a TdxBarControl object and sets its Bar property to ABar.


TdxBarControl.BarGetFocus

TdxBarControl            See Also

Called each time TdxBarControl receives focus.

procedure BarGetFocus(ASelectedItem: TdxBarItemControl);

Description

Generally, TdxBarControl receives focus when clicking an item control within it.  The SelectedItem property is set to ASelectedItem.


TdxBarControl.BarLostFocus

TdxBarControl

This method is called when TdxBarControl loses focus.

procedure BarLostFocus;

Description

This method is called each time TdxBarControl loses focus.  It sets the SelectedItem property to nil.


TdxBarControl.Repaint

TdxBarControl            See Also

Forces a TdxBarControl to repaint its image on screen.

procedure Repaint; override;

Description

Calls Repaint to force a toolbar control to repaint its images immediately. Repaint paints the toolbar on screen, but does not calculate toolbar size.  Call this method to draw a toolbar when toolbar size has not changed, for example, when only the caption of the toolbar changes.


TCustomdxBarControl

Hierarchy          Properties           Methods

The TCustomdxBarControl is the base class for all bar controls.  The phrase ‘bar controls’ refers to all controls that look like a toolbar such as submenus.  TdxBarControl and TdxBarSubMenuControl are inherited from TCustomdxBarControl.

Unit

dxBar

TCustomdxBarControl = class(TCustomControl);

Description

Bar controls are created by the TdxBarItemLinks CreateBarControl method.  The type of newly created bar control depends upon source information storage: for TdxBar, it is TdxBarControl, for TdxBarPopupMenu and TCustomdxBarSubItem it is TdxBarSubMenuControl.  It is unnecessary for you to call bar controls directly.  Use their non-visual representatives instead.


Hierarchy

TCustomControl

     |


TCustomdxBarControl Properties

TCustomdxBarControl               Legend

TCustomdxBarControl

BarManager

BkBrush

ChildBar

ComboBoxArrowWidth

DockingStyle

EditFontHandle

EditTextSize

IsActive

IsCustomizing

ItemLinks

MarkState

MenuArrowWidth

ParentBar

SelectedItem

TextSize


TCustomdxBarControl Methods

TCustomdxBarControl               Legend

TCustomdxBarControl

AdjustSize

CalcDrawingConsts

Create

CreateControls

Destroy

DestroyControls

GetFullItemRect

GetItemRectEx

GetItemRegion

HideAll

HideOnClick

IsChildBar

ItemAtPos

ItemAtPosEx

NotHandleMouseMove

PaintItem

PaintSelectedItem

RepaintBar

SetKeySelectedItem

SetMouseSelectedItem


TCustomdxBarControl.BkBrush

TCustomdxBarControl

property BkBrush: HBRUSH;

Description

Returns the handle of a brush used to draw a bar control.  For internal use only.

ReadOnly Property


TCustomdxBarControl.EditFontHandle

TCustomdxBarControl

property EditFontHandle: HFONT;

Description

Returns the handle of a font used to write item captions.  For internal use only.

ReadOnly Property


TCustomdxBarControl.EditTextSize

TCustomdxBarControl

property EditTextSize: Integer;

Description

Returns text height on a bar control in pixels.  For internal use only.

ReadOnly Property


TCustomdxBarControl.HideOnClick

TCustomdxBarControl

Determines whether a control is hidden on mouse button press events.

function HideOnClick: Boolean; virtual;

Description

For toolbars, the HideOnClick method always returns False – toolbars remain visible upon clicking item controls.  For sub items, this method returns True – sub items are hidden upon pressing any button within them.


TCustomdxBarControl.MarkState

TCustomdxBarControl

Determines the state of the quick customizing button.

type

  TdxBarMarkState = (msNone, msSelected, msPressed);

property MarkState: TdxBarMarkState;

Description

The quick customizing button is drawn to the right of a toobar and looks like a dropdown button.

The quick customizing button activates the Add or Remove Buttons and the list of items that did not fit on the toolbar.  The MarkState property returns the state of the button:

Value	Meaning
msNone	The button is neither selected nor pressed.
msSelected	The button is selected, i.e the mouse is above the mouse.
msPressed	The button is pressed.


TCustomdxBarControl.NotHandleMouseMove
TCustomdxBarControl.NotHandleMouse

TCustomdxBarControl

function NotHandleMouseMove(P: TPoint): Boolean; virtual;

Description

For internal use only.  NotHandleMouseMove determines whether the toolbar traces mouse movement if the form is not focused.  The P parameter determines mouse coordinates.


TCustomdxBarControl.BarManager

TCustomdxBarControl            See Also

Specifies the TdxBarManager to which a given bar control belongs.

property BarManager: TdxBarManager read GetBarManager;

Description

This property specifies an object of type TdxBarManager to which a given bar control belongs.  BarManager equals the BarManager property in a TdxBarItemLinks class that creates the given bar control.


TCustomdxBarControl.ChildBar

TCustomdxBarControl          See also

Specifies a child bar control (if it exists).

property ChildBar: TCustomdxBarControl;

Description

An example of a child bar control is an unfolded toolbar subitem control.  This bar control becomes a parent of the child bar control.


TCustomdxBarControl.DockingStyle

TCustomdxBarControl

Determines the current docking style of a bar control.

type

  TdxBarDockingStyle = (dsNone, dsLeft, dsTop, dsRight, dsBottom);

property DockingStyle: TdxBarDockingStyle;

Description

DockingStyle specifies the dock to which a bar control is docked.  For instance, if DockingStyle is dsTop, the bar control is docked to the top of a form.  If DockingStyle is dsNone, the toolbar floats.


TCustomdxBarControl.ParentBar

TCustomdxBarControl          See also

Determines the parent bar control of a given bar control.

property ParentBar: TCustomdxBarControl;

Description

The ParentBar property is generally used for submenus to determine the bar control to which a submenu belongs.  For example, the open toolbar subitem is represented by the TdxBarSubMenuControl; the ParentBar for this TdxBarSubItemContol is the bar control for the toolbar to which the subitem belongs.


TCustomdxBarControl.SelectedItem

TCustomdxBarControl            See Also

Specifies the current item control.

property SelectedItem: TdxBarItemControl;

Description

Generally, a bar control contains several item controls and only one of them may be selected at a time.  This property contains the currently selected item control of the bar control.  An Item control is selected when the mouse pointer hovers over it and its Enabled property is True.


TCustomdxBarControl.MenuArrowWidth

TCustomdxBarControl

Determines the width of an arrow button.

property MenuArrowWidth: Integer;

Description

An Arrow button is drawn next to a control’s caption if the item control is in a menu.  For example, the arrow button is drawn when the submenu is placed onto another submenu.

ReadOnly Property


TCustomdxBarControl.ComboBoxArrowWidth

TCustomdxBarControl

Determines the width of a combobox arrow button.

property ComboBoxArrowWidth: Integer;

Description

The ComboBoxArrowWidth is used internally for drawing a combo box item control on a bar control.

ReadOnly Property


TCustomdxBarControl.IsActive

TCustomdxBarControl

Determines whether a bar control has an active item control.

property IsActive: Boolean;

Description

IsActive returns True if any item control on a bar control has focus.  If no focused item control exists, the bar control’s IsActive property is False.


TCustomdxBarControl.IsCustomizing

TCustomdxBarControl

Determines whether the customization form is active.

property IsCustomizing: Boolean;

Description

IsCustomizing returns True if the TdxBarManager customization form to which a given bar control belongs is active.

ReadOnly Property


TCustomdxBarControl.ItemLinks

TCustomdxBarControl            See Also

Specifies the TdxBarItemLinks object describing all item links on a given bar control.

property ItemLinks: TdxBarItemLinks;

Description

This property returns a TdxBarItemLinks object describing item links between item controls on a given bar control and the items.

Note:	A bar control is created according to the information stored in the ItemLinks property of a corresponding TdxBar object.

ReadOnly Property


TCustomdxBarControl.TextSize

TCustomdxBarControl

property TextSize: Integer;

Description

Used internally to correctly draw a bar control.  TextSize depends on the vertical size of ‘0’ in the current device context.

ReadOnly Property


TCustomdxBarControl.AdjustSize

TCustomdxBarControl

Adjusts the size of a control according to its Left, Top, Height, and Width properties.

procedure AdjustSize; override;

Description

This method is derived from TCustomControl and performs no actions.  Override it to perform additional actions when adjusting item controls.  This method is only available in Delphi 4™.


TCustomdxBarControl.CreateControls

TCustomdxBarControl            See Also

Creates visible item controls on a bar control.

procedure CreateControls; virtual;

Description

This method creates visible item controls on a bar control according to the VisibleItems property.  CreateControls is called when creating a bar control and from the RefreshBar method.


TCustomdxBarControl.DestroyControls

TCustomdxBarControl            See Also

Destroys item controls belonging to a given bar control.

procedure DestroyControls; virtual;

Description

This method destroys item controls which belong to a given bar control.  DestroyControls is called when destroying a toolbar or from the RepaintBar method.


TCustomdxBarControl.CalcDrawingConsts

TCustomdxBarControl

Performs calculations to correctly draw a toolbar.

procedure CalcDrawingConsts; virtual;

Description

This method is used internally.  CalclDrawingConsts is called when it is necessary to correctly draw a bar control on screen.  It is necessary, for example, when the TdxBarManager Font property changes.


TCustomdxBarControl.GetFullItemRect

TCustomdxBarControl            See Also

GetFullItemRect returns the ‘full’ rectangle occupied by an item control on a bar control.

function GetFullItemRect(Item: TdxBarItemControl): TRect; virtual;

Description

GetFullItemRect is used when processing drag-and-drop events.  The ‘full’ rectangle includes an item control’s rectangle and the area surrounding it.  The following image describes the meaning of ‘full’ rectangle:

The resultant rectangle is specified in bar control coordinates. The Item parameter defines the item control.


TCustomdxBarControl.GetItemRectEx

TCustomdxBarControl            See Also

Returns the rectangle in the bar control coordinates the specified item control occupies on the bar control.

function GetItemRectEx(Item: TdxBarItemControl; IsBeginGroup: Boolean): TRect; virtual;

Description

The IsBeginGroup parameter specifies whether n item control starts a group.  If True, the resulting rectangle includes the item control’s rectangle and (if the item control starts the group) the group separator’s rectangle.  For TCustomdxBarControl this parameter is not taken into consideration, but descendants use it to access proper rectangle’s of item controls.


TCustomdxBarControl.GetItemRegion

TCustomdxBarControl            See Also

Returns the region occupied by an item control on a bar control.

function GetItemRegion(Item: TdxBarItemControl): HRGN; virtual;

Description

Returns the region an item control occupies on a bar control.  The item control is specified by the Item parameter.  If an item control is the first in a group, the result includes an item control’s region and that of the group separator.


TCustomdxBarControl.IsChildBar

TCustomdxBarControl           See Also

Checks if a given bar control is the child of another bar control.

function IsChildBar(Value: TCustomdxBarControl): Boolean; virtual;

Description

Returns True if a bar control has a parent bar control.  An example of a child bar control is an active submenu of a toolbar.


TCustomdxBarControl.ItemAtPos

TCustomdxBarControl

Returns an item control by its coordinates.

function ItemAtPos(Pos: TPoint): TdxBarItemControl; virtual;

Description

Returns an item control if its rectangle includes a point specified by the Pos parameter.  This function is used during drag-and-drop procedures and when displaying an item’s hint.


TCustomdxBarControl.ItemAtPosEx

TCustomdxBarControl          See also

Determines an item control by specified coordinates.

function ItemAtPosEx(Pos: TPoint; var IsBeginGroup, IsFirstPart, IsVerticalDirection: Boolean): TdxBarItemControl; virtual;

Description

This procedure is used internally to access an item control specified by the coordinates in the Pos parameter.  If an item control is the first in the group, then this function sets the IsBeginGroup parameter to True.  IsFirstPart and IsVerticalDirection are used during drag-and-drop event processing.  If the point specified by Pos belongs to the first part of the item control, the IsFirstPart is set to True.  IsVerticalDirection is set to True if the bar control has a vertical layout, that is, a bar control’s DockingStyle is dsLeft or dsRight.


TCustomdxBarControl.PaintItem

TCustomdxBarControl

procedure PaintItem(AControl: TdxBarItemControl); virtual;

Description

TCustomDxBarControl PaintItem is used for drawing a particular item control on a bar control.  The TCustomDxBarControl PaintItem method performs no actions.  Descendants can override it to draw the item control specified by the Item parameter on a bar control.


TCustomdxBarControl.PaintSelectedItem

TCustomdxBarControl            See Also

Repaints the new and previosuly selected item controls.

procedure PaintSelectedItem(OldSelectedItem: TdxBarItemControl); virtual;

Description

This method is called when a selected item changes to another item.  OldSelectedItem specifies the previous item. PaintSelectedItem first repaints the OldSelectedItem and then paints the currently selected bar item control.


TCustomdxBarControl.SetKeySelectedItem

TCustomdxBarControl            See Also

Selects an item control when using a keyboard.

procedure SetKeySelectedItem(Value: TdxBarItemControl); virtual;

Description

SetKeySelectedItem is called when a user selects an item control via a keyboard. This method sets the SelectedItem property to an item, whose linked item control is specified by the Value parameter.  If your need to select an item control via program code, you should use SetKeySelectedItem instead of the SetMouseSelectedItem method.


TCustomdxBarControl.SetMouseSelectedItem

TCustomdxBarControl            See Also

Selects an item control when using a mouse.

procedure SetMouseSelectedItem(Value: TdxBarItemControl); virtual;

Description

SetMouseSelectedItem is called when an item control is selected via a mouse, when the mouse cursor enters a control’s rectangle.


TCustomdxBarControl.Create

TCustomdxBarControl          See Also

Creates a TCustomdxBarControl instance.

constructor Create(AOwner: TComponent); override;

Description

Creates and initializes a TCustomdxBarControl object.  By default, the Visible property is set to False.  Descendants can override this method to perform special actions upon creation.


TCustomdxBarControl.Destroy

TCustomdxBarControl          See Also

destructor Destroy; override;

Description

Destroys a TCustomdxBarControl instance.  Descendants can override this method to perform specific actions upon destroy.


TCustomdxBarControl.HideAll

TCustomdxBarControl

Closes a given bar control.

procedure HideAll; virtual;

Description

This method closes and deactivates the current bar control and hides all open controls linked to it.  For instance, if a set of open submenus exist, HideAll closes them (both the child and parent).


TCustomdxBarControl.RepaintBar

TCustomdxBarControl

Repaints a TCustomdxBarControl object.

procedure RepaintBar; virtual;

Description

RepaintsBar recreates all item controls, calculates new toolbar size and draws the toolbar.  Use this method to redraw a bar control after adding new item controls or when changing bar control size.  For instance, a bar control’s size changes when changing the TdxBarManager Font or LargeIcons properties.


TdxBarSubMenuControl

Hierarchy          Properties           Methods           Events

TdxBarSubMenuControl represents submenus on screen.

Unit

dxBar

TdxBarSubMenuControl = class(TCustomdxBarControl)

Description

TdxBarSubMenuControl visually represents objects of type TdxBarPopupMenu and TCustomdxBarSubItem; that is, popup menus and sub items on toolbars.  TdxBarSubMenuControl is inherited from TcustomdxBarControl and thus it is a bar control.

Generally, the TCustomdxBarControl ChildBar property is an object of type TdxBarSubMenuControl.


Hierarchy

TCustomControl

|

TCustomdxBarControl

|


TdxBarSubMenuControl Properties

TdxBarSubMenuControl               Legend

TdxBarSubMenuControl

 	MarkSize

 	MaxVisibleCount

OwnerWidth

OwnerHeight

TopIndex

Derived from TCustomdxBarControl

BarManager

BkBrush

ChildBar

ComboBoxArrowWidth

DockingStyle

EditFontHandle

EditTextSize

IsActive

IsCustomizing

ItemLinks

MarkState

MenuArrowWidth

ParentBar

SelectedItem

TextSize


TdxBarSubMenuControl Methods

TdxBarSubMenuControl               Legend

TdxBarSubMenuControl

DoCloseUp

DoPopup

DownArrowExists

Hide

Show

UpArrowExists

VisibleCount

Derived from TCustomdxBarControl

AdjustSize

CalcDrawingConsts

Create

CreateControls

Destroy

DestroyControls

GetFullItemRect

GetItemRectEx

GetItemRegion

HideAll

HideOnClick

IsChildBar

ItemAtPos

ItemAtPosEx

NotHandleMouseMove

PaintItem

PaintSelectedItem

RepaintBar

SetKeySelectedItem

SetMouseSelectedItem


TdxBarSubMenuControl Events

TdxBarSubMenuControl               Legend

TdxBarSubManuControl

OnCloseUp

OnPopup


TdxBarSubMenuControl.MarkSize

TdxBarSubMenuControl

property MarkSize: Integer;

Description

Used internally.  Returns the indicator height which appears in a sub menu when rarely used menu items are hidden.

ReadOnly Property


TdxBarSubMenuControl.TopIndex

TdxBarSubMenuControl

Specifies the index of the top visible item.

property TopIndex: Integer;

Description

Specifies the index of the top visible menu item.  TopIndex is the index of the top item in the VisibleItems array of the ItemLinks property.


TdxBarSubMenuControl.MaxVisibleCount

TdxBarSubMenuControl

Returns the maximum number of available and visible menu items.

property MaxVisibleCount: Integer;

Description

Returns the maximum number of visible menu items.  If the number of menu items is greater than MaxVisibleCounts, the up or down arrow appears at the top/bottom of the menu.

ReadOnly Property


TdxBarSubMenuControl.OwnerWidth

TdxBarSubMenuControl            See Also

Determines an item control’s width which activates TdxBarSubMenuControl active.

property OwnerWidth: Integer;

Description

Specifies the width of an item control which activates TdxBarSubMenuControl in order to help avoid overlapping this particular item control.  For example, if TdxBarSubMenuControl is displayed upon a button click event, OwnerWidth equals button width to avoid button area overlaps by TdxBarSubMenuControl.


TdxBarSubMenuControl.OwnerHeight

TdxBarSubMenuControl            See Also

Specifies an item control’s height which activates TdxBarSubMenuControl.

property OwnerHeight: Integer;

Description

Specifies the height of an item control which activates TdxBarSubMenuControl in order to help avoid overlapping this particular item control.  For example, if TdxBarSubMenuControl is displayed upon a button click event, OwnerHeight equals button height to avoid button area overlaps by TdxBarSubMenuControl.


TdxBarSubMenuControl.DoCloseUp

TdxBarSubMenuControl          See Also

This procedure generates an OnCloseUp event.

procedure DoCloseUp; dynamic;

Description

Override this method to perform special operations when closing a menu without writing a TdxBarPopupMenu OnCloseUp event handler.


TdxBarSubMenuControl.DoPopup

TdxBarSubMenuControl          See Also

procedure DoPopup; dynamic;

Description

Generates an OnPopup event.  Override this method to perform special operations when activating a menu without writing a TdxBarPopupMenu OnPopup event handler.


TdxBarSubMenuControl.DownArrowExists

TdxBarSubMenuControl            See Also

Determines if a menu includes a down arrow.

function DownArrowExists: Boolean;

Description

Returns True, if a menu includes a down arrow to scroll through items when their numbers are greater than that of the VisibleCount property.

Note:	This method is protected, but not virtual.  Descendants can use it, but not override.


TdxBarSubMenuControl.UpArrowExists

TdxBarSubMenuControl            See Also

Determines if a menu includes an up arrow.

function UpArrowExists: Boolean;

Description

Returns True, if a menu includes an up arrow to scroll through items when their numbers are greater than that of the VisibleCount property.

Note:	This method is protected, but not virtual.  Descendants can use it, but not override.


TdxBarSubMenuControl.VisibleCount

TdxBarSubMenuControl

Returns the number of a menu’s visible items.

function VisibleCount: Integer;

Description

Returns the number of a menu’s items displayed by TdxBarSubMenuControl.  If the number of all menu items is greater than that of VisibleCount, the menu displays an up/down arrow at the top or bottom of the menu.

Note:	This method is protected, but not virtual.  Descendants can use it, but not override.


TdxBarSubMenuControl.Hide

TdxBarSubMenuControl            See Also

Makes TdxBarSubMenuControl invisible.

procedure Hide;

Description

This method hides TdxBarSubMenuControl and its child bar controls.  Though the bar control is hidden, its properties and methods are still available.


TdxBarSubMenuControl.Show

TdxBarSubMenuControl            See Also

Shows a TdxBarSubMenuControl.

procedure Show;

Description

This method first generates an OnPopup event and then displays TdxBarSubMenuControl using animation effects which are specified within the TdxBarManager MenuAnimations property.


TdxBarSubMenuControl.OnCloseUp

TdxBarSubMenuControl

This event occurs before closing TdxBarSubMenuControl.

property OnCloseUp: TNotifyEvent;

Description

Use OnCloseUp to perform special actions when closing a menu without writing an OnClose event handler.  The handler specified by OnCloseUp might test certain items to make certain they have the valid contents before allowing the menu to close.


TdxBarSubMenuControl.OnPopup

TdxBarSubMenuControl

Occurs just before a popup menu appears.

property OnPopup: TNotifyEvent;

Description

Write an OnPopup event handler to perform specific actions before the appearance of a popup menu.  For instance, use an OnPopup event handler to set properties of TdxBarSubMenuControl.


TdxBarItemActionLink

Hierarchy           Methods            See Also

Specifies the link between an item control and a TAction object.

Unit

dxBar

TdxBarItemActionLink = class (TActionLink);

Description

The TAction object can be associated with an item by using the action list editor at design-time.  Actions are a way of centralizing user responses to commands.  The TdxBarItemActionLink class is used to organize appropriate interaction between items and TAction.  This class is only available in Borland Delphi 4™ or higher.


Hierarchy

TActonLink

|


TdxBarItemActionLink Methods

TdxBarItemActionLink               Legend

TdxBarItemActionLink

AssignClient

IsCaptionLinked

IsCheckedLinked

IsEnabledLinked

IsHelpContextLinked

IsHintLinked

IsImageIndexLinked

IsShortCutLinked

IsOnExecuteLinked

SetCaption

SetChecked

SetEnabled

SetHelpContext

SetHint

SetImageIndex

SetShortCut

SetVisible

SetOnExecute


TdxBarItemActionLink.AssignClient

TdxBarItemActionLink

Sets the link between TAction and an item.

procedure AssignClient(AClient: TObject); override;

Description

AClient is an object of type TdxBarItem associated with an action. This method is only available in Delphi 4™.


TdxBarItemActionLink.IsCaptionLinked

TdxBarItemActionLink

Introduces a method prototype to determine whether the action for caption and an item control are linked.

function IsCaptionLinked: Boolean; override;

Description

IsCaptionLinked is derived from the TActionLink IsCaptionLinked method.  IsCaptionLinked ensures that the action type supports appropriate events for the item.  Descendant classes override IsCaptionLinked to determine whether the action for caption is linked with the appropriate item property.  Returns True, if TAction controls the caption and the item caption equals the TAction caption. This method is only available in Delphi 4™.


TdxBarItemActionLink.IsCheckedLinked

TdxBarItemActionLink

Introduces a method to determine whether an action for checked state and the item are linked.

function IsCheckedLinked: Boolean; override;

Description

IsCheckedLinked is derived from the TActionLink IsCheckedLinked method.  Descendant classes override IsCheckedLinked to determine whether an action for checked state is linked with the appropriate item property.  IsCheckedLinked returns True, if TAction controls this event, the item is TdxBarButton, and the Checked property of the action equals the TdxBarButton Down property. This method is only available in Delphi 4™.


TdxBarItemActionLink.IsEnabledLinked

TdxBarItemActionLink

Introduces a method to determine whether an action for enabled state is linked with an item.

function IsEnabledLinked: Boolean; override;

Description

IsEnabledLinked is derived from the TActionLink IsEnabledLinked method.  IsEnabledLinked ensures that the action type supports the appropriate event for an item.  Descendant classes override IsEnabledLinked to determine whether the action for enabled state links with the appropriate item property.  IsEnabledLinked returns True, if TAction controls this event and the Enabled property of the linked item equals the TAction Enabled property. This method is only available in Delphi 4™.


TdxBarItemActionLink.IsHelpContextLinked

TdxBarItemActionLink

Introduces a method to determine whether an action for help context is linked with an item.

function IsHelpContextLinked: Boolean; override;

Description

IsHelpContextLinked is derived from the TActionLink IsHelpContextLinked method.  IsHelpContextLinked ensures that action type supports the appropriate event for an item.  IsHelpContextLinked returns True, if TAction controls this event and item HelpContext equals the action HelpContext property. This method is only available in Delphi 4™.


TdxBarItemActionLink.IsHintLinked

TdxBarItemActionLink

Introduces a method prototype to determine whether an action for hint and an item are linked.

function IsHintLinked: Boolean; override;

Description

IsHintLinked is derived from the TActionLink IsHintLinked method.  IsHintLinked ensures that action type supports the appropriate event for an item.  IsHintLinked returns True, if TAction controls this event and the item Hint property equals the action Hint property. This method is only available in Delphi 4™.


TdxBarItemActionLink.IsImageIndexLinked

TdxBarItemActionLink

Introduces a method to determine whether an action for image index and an item are linked.

function IsImageIndexLinked: Boolean; override;

Description

IsImageIndexHintLinked is derived from the TActionLink IsImageIndexLinked method.  IsImageIndexLinked ensures that action type supports the appropriate event for an item.  Returns True, if TAction controls this event and the item ImageIndex property equals the action ImageIndex. This method is only available in Delphi 4™.


TdxBarItemActionLink.IsShortCutLinked

TdxBarItemActionLink

Introduces a method to determine whether an action for shortcut and an item are linked.

function IsShortCutLinked: Boolean; override;

Description

IsShortCutLinked is derived from the TActionLink IsShortCutLinked method.  IsShortCutLinked ensures that action type supports the appropriate event for an item.  Returns True, if TAction controls this event. This method is only available in Delphi 4™.


TdxBarItemActionLink.IsOnExecuteLinked

TdxBarItemActionLink

Indicates whether an action for the OnExecute event handler and an item are linked.

function IsOnExecuteLinked: Boolean; override;

Description

IsOnExecuteLinked is derived from the TActionLink IsOnExecuteLinked method.  IsOnExecuteLinked indicates whether an action for the OnExecute event handler is linked to an OnClick event.  IsOnExecuteLinked returns True if TAction controls this event and the OnClick item event handler is the same as an OnExecute action. This method is only available in Delphi 4™.


TdxBarItemActionLink.SetCaption

TdxBarItemActionLink

Introduces an interface for the action of setting a caption on an item.

procedure SetCaption(const Value: string); override;

Description

SetCaption is a method which introduces an interface for the action of setting a caption on a linked item.  Value specifies a string to which the caption should be set. This method is only available in Delphi 4™.


TdxBarItemActionLink.SetChecked

TdxBarItemActionLink

Introduces an interface for the action of setting an item’s checked state.

procedure SetChecked(Value: Boolean); override;

Description

SetChecked is a method which introduces an interface for the action of setting an item’s checked state via an action link.  Value specifies whether the checked state should be set. This method is only available in Delphi 4™.


TdxBarItemActionLink.SetEnabled

TdxBarItemActionLink

Introduces an interface for the action of setting an item’s Enabled state.

procedure SetEnabled(Value: Boolean); override;

Description

Introduces an interface for the action of setting an item’s enabled state via an action link.  Value specifies whether the enabled state should be set.  This method is only available in Delphi 4™.


TdxBarItemActionLink.SetHelpContext

TdxBarItemActionLink

Introduces an interface for the action of setting an item’s help context.

procedure SetHelpContext(Value: THelpContext); override;

Description

Introduces an interface for the action of setting the help context of an item via an action link.  Value specifies the value to which a help context should be set.  This method is available in Delphi 4™ only.


TdxBarItemActionLink.SetHint

TdxBarItemActionLink

Introduces an interface for the action of setting an item’s hint.

procedure SetHint(const Value: string); override;

Description

Value specifies a hint string to be set.  This method is only available in Delphi 4™.


TdxBarItemActionLink.SetImageIndex

TdxBarItemActionLink

Introduces an interface for the action of setting the image index for an item control.

procedure SetImageIndex(Value: Integer); override;

Description

Value specifies the index to set for an item.  This method is only available in Delphi 4™.


TdxBarItemActionLink.SetShortCut

TdxBarItemActionLink

Introduces an interface for the action of setting the shortcut for a linked item.

procedure SetShortCut(Value: TShortCut); override;

Description

This method is only available in Delphi 4™.


TdxBarItemActionLink.SetVisible

TdxBarItemActionLink

Introduces an interface for the action of setting an item’s visible state.

procedure SetVisible(Value: Boolean); override;

Description

Value specifies whether the enabled state should be set.  This method is only available in Delphi 4™.


TdxBarItemActionLink.SetOnExecute

TdxBarItemActionLink

Sets the execution event handler for an item if the item is linked to an action for this event.

procedure SetOnExecute(Value: TNotifyEvent); override;

Description

SetOnExecute sets the OnClick event handler of an item.  SetOnExecute is called only if the item is linked for this event.  Value specifies the procedure that should be used for this event.  This method is only available in Delphi 4™.


TdxBarItem

Hierarchy          Properties           Methods           Events           See Also           Example1          Example2

TdxBarItem is an ancestor of all item classes.

Unit

dxBar

TdxBarItem = class(TComponent);

Description

TdxBarItem is inherited from TComponent and is the base class for all items of type TdxBarButton, TdxBarWindowItem, TdxBarEdit, TCustomdxBarCombo, TdxBarCustomCombo, TdxBarCombo, TCustomdxBarSubItem, TdxBarSubItem, TCustomdxBarContainerItem, TdxBarListItem, TdxBarContainerItem.

All items are non-visual objects.  They process mouse click and keyboard events, and thus they determine actions but not look and feel.  The appearance of items on screen is determined by an item control.  One item may have several item controls on different toolbars.  These item controls are called ‘linked item controls’ or ‘item controls corresponding to the item’.

If a TdxBarItem instance is created at design time, it is saved in a form’s resources and the form is its Owner.  It is also accessible via the TdxBarManager Items property.  For information regarding the creation of your own items, see dxBarRegisterItem.


Hierarchy

TComponent

|


TdxBarItem Properties

TdxBarItem               Legend

TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

UnclickingAfterDoing

Visible

VisibleForUser


TdxBarItem Methods

TdxBarItem               Legend

TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarItem Events

TdxBarItem               Legend

TdxBarItem

OnClick

OnCreate

OnDestroy


TdxBarItem.Align

TdxBarItem

Defines item control alignment within a toolbar area.

type

 TdxBarItemAlign = (iaLeft, iaCenter, iaRight, iaClient);

property Align: TdxBarItemAlign;

Description

The Align property is in effect only for items occupying the last position within the owning toolbar.  Note also, that this property is only useful when a bar’s UseRestSpace property value is True.  In this case, you can use the Align property to specify how the item is aligned within the bar’s empty space.

The table below describes the possible property values.

Value	Meaning
iaLeft	The item is aligned to the left and follows the preceding bar item control.
iaCenter	The item is centered within the toolbar’s empty space.
iaRight	The item is right-aligned within the toolbar.
iaClient	The item fills the entire toolbar’s empty space.

The default value of this property is iaLeft.


TdxBarItem.ActuallyVisible

TdxBarItem          See Also

Determines whether an item is accessible to a user.

property ActuallyVisible: Boolean;

Description

ActuallyVisible is True if an item is currently accessible to users in toolbars or in the customization form.  Otherwise,  ActuallyVisible is False.

ReadOnly Property


TdxBarItem.UnclickAfterDoing

TdxBarItem

property UnclickAfterDoing: Boolean;

Description

If UnclickAfterDoing is True, an item stays pressed during execution of the OnClick event handler and goes to its initial state when the OnClick event handler completes its work.

If UnclickAfterDoing is False, the button is restored to its original "uppressed" state immediately after the press event and does not wait for the OnClick event handler to complete its work.


TdxBarItem.VisibleForUser

TdxBarItem            See Also

Determines whether an item is visible to a user.

property VisibleForUser: Boolean;

Description

VisibleForUser returns True if an item is visible to a user.

ReadOnly Property


TdxBarItem.BarManager

TdxBarItem            See Also

property BarManager: TdxBarManager;

Description

Specifies the TdxBarManager to which a given TdxBarItem belongs.

ReadOnly Property


TdxBarItem.CurItemLink

TdxBarItem            See Also                  Example

Returns the current active item link.

property CurItemLink: TdxBarItemLink;

Description

One item can correspond to several item controls on different toolbars. CurItemLink specifies the TdxBarItemLink to the currently active item control.  This item control is the same as SelectedItem of the TCustomdxBarControl object.

ReadOnly Property


TdxBarItem.ClickItemLink

TdxBarItem            See Also                  Example 1          Example 2

Specifies the item link whose item control has been clicked.

property ClickItemLink: TdxBarItemLink;

Description

One item can correspond to several item controls on different toolbars.  ClickItemLink specifies the TdxBarItemLink for an item control that has just been clicked.

ReadOnly Property


TdxBarItem.Data

TdxBarItem

Specifies a pointer to any data associated with an item.

property Data: Pointer;

Description

This property is a pointer used by programmers to store any information.  If the pointer must be initialized before item creation and disposed of before item destruction, use the OnCreate and OnDestroy events of the item.


TdxBarItem.Glyph

TdxBarItem

Specifies the bitmap which appears on linked item controls.

property Glyph: TBitmap;

Note:	The suggested size of bitmaps is 16 by 16 pixels.


TdxBarItem.ImageIndex

TdxBarItem            See Also

Determines index in an image list.

property ImageIndex: Integer;

Description

Set ImageIndex to associate an item with an image in the Images, LargeImages or HotImages properties of TdxBarManager.


TdxBarItem.Index

TdxBarItem            See Also

Specifies item index in the TdxBarManager list.

property Index: Integer;

Description

TdxBarManager contains a list of all available items.  The index property returns the index of a given item in the TdxBarManager item list.  The first item’s index is 0.


TdxBarItem.LinkCount

TdxBarItem            See Also                  Example

Determines the number of item links contained in the Links property.

property LinkCount: Integer;

Description

An item control may have several item controls on different toolbars.  LinkCount returns the number of current links between an item and item controls.

ReadOnly Property


TdxBarItem.Links

TdxBarItem            See Also                  Example

Returns an object of type TdxBarItemLink with an Index which links to a given element.

property Links[Index: Integer]: TdxBarItemLink;

Description

One item can correspond to several item controls on different toolbars.  The Links property contains the TdxBarItemLink object array which defines the links between a given TdxBarItem and item controls on the toolbars.  The first element's index is 0.  When creating a new item control, a new element is added to the TdxBarItem Links array to specify an item link between this TdxBarItem and the item control on the toolbar.


TdxBarItem.ShortCut

TdxBarItem

Contains the shortcut property for TdxBarItem.

property ShortCut: TShortCut;

Description

Shortcut represents the key combination which activates a corresponding item.

Note:	Shortcut works only if a form includes a toolbar whose IsMainMenu property is set to True.


TdxBarItem.Visible

TdxBarItem            See Also              Example

Determines whether a TdxBarItem appears on screen.

property Visible: TdxBarItemVisible;

Description

Items are non-visual objects. This property defines the appearance style of these item controls:

Value	Meaning
ivAlways	Item controls are visible at design and run time.
ivNever	Item controls are not visible at run time.
ivInCustomizing	Item controls are only visible during toolbar customization.

By default, the Visible property is set to ivAlways.

The following code hides items to avoid data modification.  Items are TdxBarDBNavigator buttons:

  dxBarBDBNavEdit.Visible   := ivNever;

  dxBarBDBNavInsert.Visible := ivNever;

  dxBarBDBNavDelete.Visible := ivNever;


TdxBarItem.Action

TdxBarItem

Specifies the action associated with TdxBarItem.

property Action: TBasicAction;

Description

Action designates the action object associated with an item.  Actions may be associated with an item by using the action list editor at design time.  Actions are a method of centralizing user responses to commands.  For more information about Actions, see Delphi’s help.  This property is available in Delphi 4™ only.


TdxBarItem.Caption

TdxBarItem          Example

Specifies text which identifies an item to a user.

property Caption: string;

Description

Use Caption to associate an item with text which describes the item.  To create an accelerator in the Caption, include an ampersand (&) before the character.


TdxBarItem.Category

TdxBarItem          See Also          Example

Determines the category to which a given TdxBarItem belongs.

property Category: Integer;

Description

Category represents a group of items.  Categories are designed to easily manage item behavior.  All items of the same category may have similar properties.  If the value of this property equals  -1, the item does not belong to any category.


TdxBarItem.Description

TdxBarItem

Specifies an item’s description.

property Description: string;

Description

Description is the text string that appears within the customization form below the item control list.  Descriptions give users more information about items.


TdxBarItem.Enabled

TdxBarItem

Controls whether TdxBarItem responds to mouse, keyboard, and timer events.

property Enabled: Boolean;

Description

Use Enabled to change the availability of an item control to end users.  To disable a control, set Enabled to False.  All item controls that correspond to a given TdxBarItem will be disabled.  If False, item controls ignore mouse and keyboard events.


TdxBarItem.HelpContext

TdxBarItem

Provides a context number when calling context-sensitive online Help.

property HelpContext: THelpContext;

Description

Determines which help topic appears when a user presses F1 to request online help.  Each topic in a Help system should have a unique context number.  When TdxBarItem is selected in an application, pressing F1 displays a Help screen.  The Help screen to appear depends wholly on the value of the HelpContext property.


TdxBarItem.Hint

TdxBarItem          Example

Contains the text which appears when users moves the mouse over linked item controls.

property Hint: string;

Description

Use the Hint property to provide a string of help text which appears when users moves the mouse over linked item controls.


TdxBarItem.ActionLink

TdxBarItem            See Also

Specifies an associated object of TdxBarItemActionLink class.

property ActionLink : TdxBarItemActionLink;

Description

This property determines the action link between an action and TdxBarItem if such a link exists.  This property is available in Delphi 4™ only.


TdxBarItem.SetParentComponent

TdxBarItem          See Also

Sets the parent object of TdxBarItem.

procedure SetParentComponent(AParent: TComponent); override;

Description

This method sets the TdxBarItem BarManager property to the TdxBarManager to which a given item belongs.

Note:	Owner of the item is a form, not TdxBarManager.


TdxBarItem.ActionChange

TdxBarItem

Updates linked item controls to reflect changes in associated actions.

procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); dynamic;

Description

ActionChange is called automatically when an associated action changes.  Used for updating item controls to reflect an action’s current Caption, Enabled, Hint, Visible, and HelpContext properties and its OnClick event handler.  The Sender parameter is the associated action.

The CheckDefaults parameter specifies whether properties and event handlers should be changed if they differ from the default values.

When CheckDefaults is True, properties and event handlers are changed only when current values are the default values (that is, when values have not been previously changed).  When CheckDefaults is False, properties and event handlers are changed, regardless of their current values.  This method is available in Delphi 4™ only.


TdxBarItem.BarManagerChanged

TdxBarItem            See Also

Called to perform operations when the TdxBarManager to which a given item belongs changes.

procedure BarManagerChanged; virtual;

Description

This method performs no actions.  Descendants can override it to perform special operations when the BarManager property changes.


TdxBarItem.CanClicked

TdxBarItem

Specifies whether an item responds to mouse clicks.

function CanClicked: Boolean; virtual;

Description

This function is used internally to control mouse click response.  The CanClicked method returns True, if an item responds to mouse clicks.  If True, an OnClick event can be generated.  CanClicked always returns True for this class.


TdxBarItem.CaptionChanged

TdxBarItem            See Also

This method is called when TdxBarItem caption changes.

procedure CaptionChanged; virtual;

Description

This method calls the CaptionChanged method of a corresponding item control to reflect changes in TdxBarItem caption.


TdxBarItem.EnabledChanged

TdxBarItem            See Also

This procedure is called when the Enabled property changes.

procedure EnabledChanged; virtual;

Description

This method is called when a user changes the Enabled property from True to False or vice versa.  This method calls the EnabledChange of a corresponding item control to reflect changes.


TdxBarItem.GetActionLinkClass

TdxBarItem            See Also

Returns an appropriate action link class associated with controls.

type

  TdxBarItemActionLinkClass = class of TdxBarItemActionLink;

function GetActionLinkClass: TdxBarItemActionLinkClass; dynamic;

Description

GetActionLinkClass is used internally to access the appropriate class type for an action link used with a corresponding item.  This method is available in Delphi 4™ only.


TdxBarItem.GlyphChanged

TdxBarItem

This method is called when a TdxBarItem glyph changes.

procedure GlyphChanged; virtual;

Description

This method calls the GlyphChanged method of a corresponding item control to reflect changes in the Glyph property.


TdxBarItem.HasAccel

TdxBarItem

Specifies if TdxBarItem includes an accelerator key.

function HasAccel(AItemLink: TdxBarItemLink): Boolean; virtual;

Description

Returns True if a given item has an accelerator key.


TdxBarItem.HotGlyphChanged

TdxBarItem            See Also

Called when changing the hot image list of a parent TdxBarManager object.

procedure HotGlyphChanged; virtual;

Description

Called by the TdxBarManager when the TdxBarManager HotImages property changes.  The TdxBarItem HotGlyphChanged method performs no action.  Descendants can override it to perform required operations when changing images.


TdxBarItem.LargeGlyphChanged

TdxBarItem            See Also

This method is called when a TdxBarManager large image list changes.

procedure LargeGlyphChanged; virtual;

Description

This method is called by TdxBarManager when the TdxBarManager LargeImages property changes. TdxBarItem LargeGlyphChanged method performs no action.  Descendants can override it to perform required operations when changing images.


TdxBarItem.ShortCutChanged

TdxBarItem            See Also

This procedure is called when a TdxBarItem shortcut changes.

procedure ShortCutChanged; virtual;

Description

Keyboard shortcuts enable users to perform actions without directly accessing the control via key combinations.  Each time a TdxBarItem shortcut changes, this method is called.

Note:	Shortcuts only work if a form includes a main menu.


TdxBarItem.Update

TdxBarItem            See Also

Repaints corresponding item controls.

procedure Update; virtual;

Description

One item can correspond to several item controls on different toolbars.  This procedure repaints all item controls, except the selected, linked to a given TdxBarItem.  Descendants can override it to perform their own update procedures.


TdxBarItem.UseHotImages

TdxBarItem            See Also

Determines if a TdxBarItem uses image from the TdxBarManager HotImages list to draw linked item controls.

function UseHotImages: Boolean; virtual;

Description

For this class UseHotImages returns False.


TdxBarItem.UseLargeImages

TdxBarItem            See Also

Determines if a control uses an image from the BarManager.LargeImages list.

function UseLargeImages: Boolean; virtual;

Description

For this class UseLargeImages returns False.


TdxBarItem.VisibleChanged

TdxBarItem

This procedure is called when the TdxBarItem Visible property changes.

function VisibleChanged; virtual;

Description

This procedure calls the VisibleChanged method for linked item controls according to the Visible property of a given TdxBarItem.


TdxBarItem.Create

TdxBarItem

Creates a TdxBarItem instance.

constructor Create(AOwner: TComponent); override;

Description

This method creates and initializes a TdxBarItem object.  It sets the TdxBarItem BarManager property equal to the TdxBarManager object of the form and the Visible property is set to ivAlways.


TdxBarItem.Destroy

TdxBarItem

Destroys a TdxBarItem instance.

destructor Destroy; override;

Description

This method destroys the TdxBarItem object and removes associated records from the customizing and toolbar popup item lists.


TdxBarItem.Click

TdxBarItem            See Also

Calls the DirectClick method to respond to mouse clicks.

procedure Click; dynamic;

Description

The Click method simulates mouse clicks.  This method checks whether TdxBarItem responds to mouse click events and then calls the DirectClick method.


TdxBarItem.DirectClick

TdxBarItem            See Also

Processes mouse click events.

procedure DirectClick; dynamic;

Description

If Enabled is True, DirectClick calls TdxBarManager DoClickItem and then calls the DoClick event.  This method is one of the procedures and functions which processes mouse click events.


TdxBarItem.DoClick

TdxBarItem            See Also

This procedure generates an OnClick event.

procedure DoClick; dynamic;

Description

Override this method to perform special operations before or after calling an OnClick event handler.


TdxBarItem.GetParentComponent

TdxBarItem            See Also

Returns the parent component of a TdxBarItem object.

function GetParentComponent: TComponent; override;

Description

This function returns the TdxBarManager to which a given TdxBarItem belongs.  If there is no parent TdxBarManager, the function returns nil.


TdxBarItem.HasParent

TdxBarItem            See Also

Determines if TdxBarItem belongs to a TdxBarManager category.

function HasParent: Boolean; override;

Description

Returns True if TdxBarItem belongs to a TdxBarManager category (TdxBarItem Category property is greater than  -1).


TdxBarItem.UpdateEx

TdxBarItem

Repaints corresponding item controls.

procedure UpdateEx; virtual;

Description

This procedure repaints all corresponding item controls, except selected items.  UpdateEx also calls the RepaintBar method for bar controls with corresponding item controls, therefore, UpdateEx is useful for repainting item controls when changing the size of TdxBarItem.


TdxBarItem.OnCreate

TdxBarItem          See Also

Occurs when a form is created.

property OnCreate : TNotifyEvent;

Description

Use OnCreate to perform special processing when a TdxBarItem is created and invokes constructor.  Either implement this event or override a form’s constructor but do not do both.  Any objects created in the OnCreate event should be freed by the OnDestroy event.


TdxBarItem.OnClick

TdxBarItem          Example

Occurs when clicking the control.

property OnClick: TNotifyEvent;

Description

Use the OnClick event handler to write code which responds to click events.

Note for TdxBarWindowItem: Being placed on a vertical toolbar, whose RotateWhenVertical is True, bar items such as TdxBarEdit, TdxBarCombo, etc change their appearance and become like buttons.  The OnClick event is fired in respond to the user's click on such an item.


TdxBarItem.OnDestroy

TdxBarItem            See Also

This event occurs before a TdxBarItem object is destroyed.

property OnDestroy: TNotifyEvent ;

Description

Use OnDestroy to perform special processing when destroying a TdxBarItem object.  Either implement this event or override the destructor of the class, but do not do both.  This event should destroy any objects created in an OnCreate event.


TdxBarManager.AllowReset

TdxBarManager

Allows toolbars be restored.

property AllowReset: Boolean;

Description

If AllowReset is set to True (the default), a user can restore original settings for a selected toolbar by clicking the ‘Reset…’ button on the toolbar customization form.  Set AllowReset to False to prevent such behavior and to hide the ‘Reset…’ button.


TdxBarManager.AutoDockColor

TdxBarManager          See also

Determines whether a dock control has a specific color.

property AutoDockColor: Boolean;

Description

If AutoDockColor is set to True, the color of a dock control is equivalent to the background color of the form.  Otherwise, the color is taken from the TdxBarManager.DockColor property.

The default value is False.


TdxBarManager.DockColor

TdxBarManager          See also

Specifies the background color of a dock control.

property DockColor: TColor;

Description

The DockColor property defines the background color of a dock control if the TdxBarManager.AutoDockColor property is False.


TdxBarManager.ResetUsageData

TdxBarManager          See also

procedure ResetUsageData;

Description

Deletes a record of commands a user has used in an application and restores the default set of visible item controls to menus and toolbars. This action will not undo any explicit customizations.


TdxBarManager.ResetUsageDataWithConfirmation

TdxBarManager           See also

procedure ResetUsageDataWithConfirmation;

Description

Displays a generic dialog box with a request message.  In case of a positive answer the TdxBarManager.ResetUsageData method is called to undo user customizations.


TdxBarManager.ImageListBkColor

TdxBarManager          See also

property ImageListBkColor: TColor;

Description

Determines the transparent color of pictures within the TdxBarManager Image list.


TdxBarManager.MenusShowRecentItemsFirst

TdxBarManager          See also

Determines whether the most frequently used items will be placed in menus at first position.

property MenusShowRecentItemsFirst: Boolean;

Description

If MenusShowRecentItemsFirst is True (by default), when a user clicks menu items, they are "promoted" and displayed higher on the list.  Unused menu items are visually suppressed and not displayed on the menu.  Else, all menu items are displayed in the order of creation.

Note:	MenusShowRecentItemsFirst is effective only if the Style property is equal to bmsEnhanced or bmsFlat.


TdxBarManager.MostRecentItemsPercents

TdxBarManager          See also

Specifies the time bounds in percentage for calculating the most frequently used items.

property MostRecentItemsPercent: Byte;

Description

If the quantity of press events of an item control is less than the value of MostRecentItemsPercents, then this item control is added to the list of  the infrequently used items.  The default value is 95.

Note:	MenusShowRecentItemsFirst is effective only if the Style property is equal to bmsEnhanced.


TdxBarManager.ShowFullMenusAfterDelay

TdxBarManager          See also

Determines whether hidden items are automatically displayed in a menu.

property ShowFullMenusAfterDelay: Boolean;

Description

If ShowFullMenusAfterDelay is True (by default), menu items that are infrequently used will be automatically displayed after a delay.  Else, the menu expands only after clicking its bottom-most button.

Note:	MenusShowRecentItemsFirst is effective only if the Style property is equal to bmsEnhanced.


TdxBarManager.ShowHelpButton

TdxBarManager          See also          Example

Specifies whether the Help button is displayed in the customization form.

property ShowHelpButton: Boolean;

Description

If ShowHelpButton is set to True, the Help button is displayed in the left-bottom corner of the toolbar customization form.  Once clicked, the OnHelpButtonClick event is generated.  The default value is False.


TdxBarManager.HelpButtonGlyph

TdxBarManager          See also

Specifies a bitmap, which appears on the Help button in the customization form.

property HelpButtonGlyph: TBitmap;

Description

Set HelpButtonGlyph to a bitmap object, which contains the image, that must appear on the face of the button in the left-bottom corner of the toolbar customization form.  For more detailed information see the TSpeedButton.Glyph property.


TdxBarManager.HelpContext

TdxBarManager          See also

Provides a context number for use when calling context-sensitive Help.

property HelpContext: THelpContext;

Description

Assign a value to HelpContext to determine which help screen appears when a user clicks the Help button on the toolbar customization form to request help.  The default value is 0.


TdxBarManager.OnHelpButtonClick

TdxBarManager          See also          Example

Occurs when clicking the Help button in the customization form.

property OnHelpButtonClick: TNotifyEvent;

Description

Use the OnHelpButtonClick event handler to write code that responds to the click on the Help button in the left-bottom corner of the toolbar customization form.  By default, when a user clicks this button, the help screen appears.


TdxBarManager.UseF10ForMenu

TdxBarManager

Determines whether TdxBarManager responds to the F10 key press event.

property UseF10ForMenu: Boolean;

Description

If UseF10ForMenu is set to False, TdxBarManager does not respond to the F10 key press events and the menu will not will be called.  The default value is True.


TdxBarManager.OnShowCustomizingPopup

TdxBarManager          See also

Occurs before the customization menu appears.

type

  TdxBarShowToolbarsPopupEvent = procedure(Sender: TdxBarManager; PopupItemLinks: TdxBarItemLinks) of object;

property OnShowCustomizingPopup: TdxBarShowPopupEvent;

Description

Write an OnShowCustomizingPopup event handler to perform specific actions before displaying the customizing popup menu for an item.  The PopupItemLinks parameter contains item links of the customizing popup menu.  Use this parameter to add or delete items from the customizing popup menu.


TdxBarManager.OnBarClose

TdxBarManager

Occurs when a toolbar closes.

type

  TdxBarEvent = procedure(Sender: TdxBarManager; ABar: TdxBar) of object;

property OnBarClose: TdxBarEvent;

Description

Use OnBarClose to perform special processing when a floating toolbar closes.  This event specifies which event handler to call when a user clicks the toolbar’s Close button.


TdxBarItemLink.AvailableIndex

TdxBarItemLink          See also

Returns an item’s position in the AvailableItems array of TdxBarItemLinks.

property AvailableIndex: Integer;

Description

A TdxBarItemLink object is indexed in the AvailableItems array of TdxBarItemLinks to which it belongs.  The AvailableIndex property of TdxBarItemLink contains an item’s index value in that array.

AvailableItems is a zero-based array.  The first member of it has an index value of 0, the second member has an index value of 1, etc.

ReadOnly Property


TdxBarItemLink.CanVisibleIndex

TdxBarItemLink          See also

Returns an item’s position in the CanVisibleItems array of TdxBarItemLinks.

property CanVisibleIndex: Integer;

Description

TdxBarItemLink is indexed in the CanVisibletems array of TdxBarItemLinks to which it belongs.  The CanVisibleIndex property of TdxBarItemLink contains an item’s index value in that array.

CanVisibleItems is a zero-based array.  The first member of it has an index value of 0, the second member has an index value of 1, etc.

ReadOnly Property


TdxBarItemLink.Data

TdxBarItemLink          Example 2

Stores an integer value as a part of a TdxBarItemLink object.

property Data: Integer;

Description

The Data property has no predefined meaning similar to the Tag property of components.  The default value is 0.


TdxBarItemLink.MostRecentlyUsed

TdxBarItemLink

Determines whether an item control linked with a given TdxBarItemLink object is marked as the most frequently used.

property MostRecentlyUsed: Boolean;

Description

Sets the initial state of an item control.  When drawing a toolbar, item controls with the MostRecentlyUsed property active are drawn first and then all others follow.  This property is best to set at design time via the customizing popup menu.  If MostRecentlyUsed is set to False for a menu’s item, then it is not displayed at runtime in the menu.


TdxBarItemLink.RealItemLink

TdxBarItemLink

Contains the actual item link of a given TdxBarItemLink.

property RealItemLink: TdxBarItemLink;

Description

Used when creating additional (new) item controls.

ReadOnly Property


TdxBarItemLink.Visible

TdxBarItemLink          See also

Determines whether an item control appears on a toolbar.

property Visible: Boolean;

Description

If Visible is True, an item control linked to a given TdxBarItemLink object can be placed on the toolbar.  In this case a given TdxBarItemLink object is included into the TdxBarItemLinks.CanVisibleItems array.


TdxBarItemLinks.AvailableIndexOf

TdxBarItemLinks          See also

Returns position of a specified TdxItemLink in the TdxbarItemLinks.AvailableItems array.

function AvailableIndexOf(Value: TdxBarItemLink: Iteger;

Description

Call AvailableIndexOf to get the index of Value in AvailableItems.  Index of the first element in the AvailableItems array is 0.  AvailableIndexOf returns -1 if Value is not in the array.


TdxBarItemLinks.CanVisibleIndexOf

TdxBarItemLinks          See also

Returns position of a specified TdxItemLink in the TdxbarItemLinks.CanVisibleItems array.

function CanVisibleIndexOf(Value: TdxBarItemLink: Iteger;

Description

Call CanVisibleIndexOf to get the index of Value in CanVisibleItems.  The index of the first element in the CanVisibleItems array is 0.  CanVisibleIndexOf returns -1 if Value is not in the array.


TdxBarItemLinks.AvailableItems

TdxBarItemLinks          See also

Presents an indexed array of TdxBarItemLink elements with items that may be placed onto a toolbar.

property AvailableItems[Index: Integer]: TdxBarItemLink;

Description

The array contains only TdxBarItemLink objects with the Visible property of a corresponding item equal to ivAlways.  The value of the Index parameter corresponds to the AvailableIndex property of TdxBarItemLink.

ReadOnly Property


TdxBarItemLinks.AvailableItemCount

TdxBarItemLinks          See also

Returns the number of items in the AvailableItems array.

property AvailableItemCount: Integer;

Description

Contains the number of items in the TdxBarItemLinks.AvailableItems array.  Since this array is indexed starting with 0, the value of AvailableItemCount is always one greater than the index of the last member of AvailableItems.

ReadOnly Property


TdxBarItemLinks.CanVisibleItems

TdxBarItemLinks          See also

Presents an indexed array of TdxBarItemLink elements with visible and potential items.

property CanVisibleItems[Index: Integer]: TdxBarItemLink;

Description

The array contains TdxBarItemLink objects with visible items and items that do not currently fit in a toolbar.  The value of the Index parameter corresponds to the CanVisibleIndex property of TdxBarItemLink.

ReadOnly Property


TdxBarItemLinks.CanVisibleItemCount

TdxBarItemLinks          See also

Returns the number of items in the CanVisibleItems array.

property CanVisibleItemCount: Integer;

Description

Contains the number of items in the TdxBarItemLinks.CanVisibleItems array.  Since this array is indexed starting with 0, the CanVisibleCount value is always one greater than the index of the last member of CanVisibleItems.

ReadOnly Property


TdxBarBackgrounds
TdxBarBackgrounds Object

Hierarchy          Properties          Methods

Specifies images used as the background of bars and sub menus.

Unit

dxBar

TdxBarBackgrounds = class(TPersistent)

Description

The TdxBarBackgrounds object can be accessed via the Backgrounds property of the bar manager.  This object provides Bar and SubMenu properties that set default background bitmaps for bars and sub menus respectively.


TdxBarBackgrounds Hierarchy
Hierarchy

TPersistent

     |


Properties for TdxBarBackgrounds
TdxBarBackgrounds Properties

TdxBarBackgrounds          Legend

In TdxBarBackgrounds

Bar

BarManager

SubMenu


Methods for TdxBarBackgrounds
TdxBarBackgrounds Methods

TdxBarBackgrounds          Legend

In TdxBarBackgrounds

 Assign

 Create


TdxBarBackgrounds.Bar

TdxBarBackgrounds

Specifies the default background image for bars.

property Bar: TBitmap;

Description

Use the Bar property to set the default bitmap used as the background for bars.  The image below illustrates which interface elements are affected by this property.

As you can see in the above image, background bitmaps are not applied to bars themselves.  Instead, they are applied to dock controls and floating forms where bars are painted transparently.  To assign a background bitmap to an individual bar, use the bar’s BackgroundBitmap property.  Also, you can specify background bitmaps for individual dock controls by setting their BackgroundBitmap property to the desired value.


TdxBarBackgrounds.BarManager

TdxBarBackgrounds

Returns the bar manager that owns this object.

property BarManager: TdxBarManager;

Description

The BarManager property returns the bar manager whose Backgrounds property is represented by this TdxBarBackgrounds instance.  This property is used internally and most commonly you will have no need to use it in applications.  Its value is initialized by the constructor.

ReadOnly Property


TdxBarBackgrounds.SubMenu

TdxBarBackgrounds

Specifies the default background image for sub menus.

property SubMenu: TBitmap;

Description

Use the SubMenu property to specify the background image used by sub menus.  The image below illustrates which interface elements are affected by this property.

Note that the SubMenu property affects does not only affect sub items.  For instance, it specifies the background color for dropdowns of toolbar list items.  The specified image, however, is not used for editor items such as combo items, etc.

You can also specify background images for individual popup menus.  Use the desired popup menu’s BackgroundBitmap property for this purpose.


TdxBarBackgrounds.Assign

TdxBarBackgrounds

Assigns settings of one TdxBarBackgrounds object to another.

procedure Assign(Source: TPersistent); override;

Description

The Assign method is used to copy settings of one TdxBarBackgrounds object to another.  The Source parameter specifies the source object.  The method caller is the destination object.


TdxBarBackgrounds.Create

TdxBarBackgrounds

Creates an instance of the TdxBarBackgrounds class.

constructor Create(ABarManager: TdxBarManager);

Description

The constructor is used to create a new TdxBarBackgrounds object.  It is automatically called by the bar manager when it initializes its Backgrounds property.  The manager passes itself as the ABarManager parameter value.

Generally, you will have no need to create instances of the TdxBarBackgrounds class manually.


cxGetResourceString function

Retrieves a resource string for the specified resource identifier.

function cxGetResourceString(const ResString: Pointer): string;

Description

The cxGetResourceString function retrieves a resource string for the resource identifier specified by the ResString parameter.  You pass the address of the resource string as the identifier.

String constants for Express products are stored as resources.  The cxGetResourceString function is used internally to retrieve strings for specific control elements.  For instance, date combo items determine the caption to be displayed on the Clear button within the dropdown calendar by reading the value of the dxSBAR_DATECLEAR resource string as follows:

cxGetResourceString(@cxSDatePopupClear);

By default, it displays ‘Clear’.

For the purpose of localization, you can change the resource strings depending on the language and the regional settings.  To do so, call the cxSetResourceString procedure passing a resource identifier and the new value of the resource string as parameters.  This procedure substitutes the value of the resource string during execution only.

Note: all resource strings used by ExpressBars are declared in the dxBarStrs unit.


cxSetResourceString function

Substitutes a value of the resource string retrieved by the cxGetResourceString function.

procedure cxSetResourceString(const ResString: Pointer; const Value: string);

Description

String constants for Express products are stored as resources.  The cxGetResourceString function is used internally to retrieve strings for specific control elements.  You might use the cxSetResourceString procedure to substitute a value of a specific resource string during the program execution for localization purposes.  Note that a new value does not replace a resource in an executable file.

The ResString argument specifies a resource string identifier.  You should pass an address of the resource string as the ResString parameter.  A new value of the resource string is determined by Value.

All resource strings used in ExpressBars are declared in the dxBarStrs unit.

In the dxBarStrs unit, the dxSBAR_DATECLEAR resource string is declared.  By default, it identifies the ‘Clear’ string displayed in a button within the dropdown calendar of date combo items.  To display the German equivalent of the string, you can use the cxSetResourceString procedure.

//Delphi

cxSetResourceString(@dxSBAR_DATECLEAR, 'Löschen');

//C++ Builder

cxSetResourceString(&_dxSBAR_DATECLEAR, "Löschen");

This code changes the caption of the Clear button for all date combo items in the current application.


TdxBarWindowItem

Hierarchy          Properties           Methods           Events

TdxBarWindowItem is the ancestor for all items whose item controls have their own window handles.

Unit

dxBar

TdxBarWindowItem = class(TdxBarItem);

Description

This class is an ancestor of items with windowed item controls.

Windowed items are item controls that can receive focus in a running application and have a window handle.  This class is an ancestor of TdxBarEdit, TCustomdxBarCombo, TdxBarCustomCombo, TdxBarCombo.


Hierarchy

TComponent

     |

TdxBarItem

     |


TdxBarWindowItem Properties

TdxBarWindowItem               Legend

TdxBarWindowItem

CurText

EmptyWindow

FocusedItemLink

Text

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

UnclickingAfterDoing

Visible

VisibleForUser


TdxBarWindowItem Methods

TdxBarWindowItem               Legend

TdxBarWindowItem

Change

CurChange

DoEnter

DoExit

KeyDown

KeyPress

KeyUp

Derived form TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarWindowItem Events

TdxBarWindowItem               Legend

TdxBarWindowItem

OnChange

OnCurChange

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TdxBarWindowItem.DoEnter

TdxBarWindowItem          See Also

procedure DoEnter; dynamic;

Description

The DoEnter method is called when an item control, corresponding to an item, receives focus.  The DoEnter method generates the OnEnter event.


TdxBarWindowItem.DoExit

TdxBarWindowItem          See Also

procedure DoExit; dynamic;

Description

The DoExit is called when an item control, corresponding to an item, loses focus.  The DoExit method generates the OnExit event.


TdxBarWindowItem.OnEnter

TdxBarWindowItem          See Also

Occurs when an item contol, corresponding to an item, receives focus.

type

  TNotifyEvent = procedure(Sender : TObject) of object;

property OnEnter: TNotifyEvent;

Description

Write an OnEnter event handler to perform specific actions when an item control, corresponding to an item, receives focus.


TdxBarWindowItem.OnExit

TdxBarWindowItem          See Also

Occurs when an item control, corresponding to an item, loses focus.

type

  TNotifyEvent = procedure(Sender : TObject) of object;

property OnExit : TNotifyEvent;

Description

Write an OnExit event handler to perform specific actions when an item control, corresponding to an item, loses focus.


TdxBarWindowItem.EmptyWindow

TdxBarWindowItem            See Also

Determines whether text editing is available within TdxBarWindowItem.

property EmptyWindow: Boolean;

Description

This property is used internally.  If False, users may edit text in the window of a linked item control.  If set to True, linked item controls are drawn on screen, but users cannot edit text within them.  This property is similar to the ShowEditor property of combo box controls, but it is intended for all items with windowed controls.


TdxBarWindowItem.CurText

TdxBarWindowItem            See Also

Specifies the text string currently edited in an item.

property CurText: string;

Description

This property stores a text string that represents the current text in an active item control.  If such text does not exist, the property returns the same value as the Text property.  Unlike the Text property, CurText contains text currently being edited.


TdxBarWindowItem.Text

TdxBarWindowItem            See Also                  Example

Contains the text string associated with an item.

property Text: string;

Description

This property stores the string associated with an item.  It can be directly modified both programmatically and by users upon leaving the linked item control.  The Text property changes only after a user finishes text editing.  Changing the Text property causes repainting of all linked item controls.


TdxBarWindowItem.FocusedItemLink

TdxBarWindowItem            See Also

Returns the item link of the focused item control.

property FocusedItemLink: TdxBarItemLink;

Description

One item control can have several linked item controls.  Only one of the item controls can have focus at any given point in time.  This property returns the TdxBarItemLink object that links a given item with the focused linked item control.

ReadOnly Property


TdxBarWindowItem.Change

TdxBarWindowItem            See Also

Generates an OnChange event.

procedure Change; dynamic;

Description

Change is a protected method so that the derived classes can make additional responses to text changes beyond invoking the OnChange event handler.  When overriding be sure to call the inherited method to generate the OnChange event.


TdxBarWindowItem.CurChange

TdxBarWindowItem            See Also

Generates an OnCurChange event.

procedure CurChange; dynamic;

Description

The CurChange method is called every time you press an alphanumeric key.  It generates an OnCurChange event every time the CurText property changes.


TdxBarWindowItem.KeyDown

TdxBarWindowItem            See Also

Generates an OnKeyDown event.

procedure KeyDown(var Key: Word; Shift: TShiftState); dynamic;

Description

This procedure is called when pressing a key in the window of a linked item control.  KeyDown is called when pressing any key, including Shift, Alt, Ctrl and function keys.

For the TdxBarWindowItem class, KeyDown does nothing except call the event handler attached to the OnKeyDown event.  Descendants can override KeyDown to provide other responses in addition to this event-handler call.  The Key parameter specifies the pressed key on the keyboard.  If you assign 0 to Key, all further key processing is canceled.


TdxBarWindowItem.KeyPress

TdxBarWindowItem            See Also

Generates an OnKeyPress event.

procedure KeyPress(var Key: Char); dynamic;

Description

The KeyPress method is called in response to a key-press message (WM_CHAR) from Windows.  The TdxBarWindowItem KeyPress method does nothing except call the OnKeyPress event handler.  Descendants override KeyPress to provide other responses in addition to this event-handler call.  Both the KeyPress and OnKeyPress event handlers can suppress further key processing by setting the Key parameter to 0.


TdxBarWindowItem.KeyUp

TdxBarWindowItem            See Also

Generates an OnKeyUp message.

procedure KeyUp(var Key: Word; Shift: TShiftState); dynamic;

Description

The KeyUp method is called when a user releases the key in the window of a linked item control.  KeyUp is called when releasing any key, including Shift, Alt, Ctrl and function keys.

The KeyUp method calls the OnKeyUp event handler if assigned.  Descendants can override KeyUp to provide other responses in addition to the inherited event-handler call.  If you assign 0 to Key, all further key processing is canceled.


TdxBarWindowItem.OnChange

TdxBarWindowItem             See Also           Example

Occurs when the text of an edit control changes.

property OnChange: TNotifyEvent;

Description

This event occurs when finishing text editing, that is, if a user presses Enter.  Define the OnChange event-handler to avoid multiple event-handler calls.


TdxBarWindowItem.OnCurChange

TdxBarWindowItem            See Also

Occurs on text editing.

property OnCurChange: TNotifyEvent;

Description

This event occurs after modifying text in an active item control - text is defined by the CutText property.  Unlike the OnChange event, the OnCurChange occurs every time a user changes text in an item control window, that is, on alphanumeric key press events.  Use OnCurChange when your application needs to process current changes of edited text.


TdxBarWindowItem.OnKeyDown

TdxBarWindowItem            See Also

Occurs when a user presses a key in a linked item control.

type

  TShiftState = set of (ssShift, ssAlt, ssCtrl, ssLeft, ssRight, ssMiddle, ssDouble);

  TKeyEvent = procedure(Sender: TObject; var Key: Word; Shift: TShiftState) of object;

property OnKeyDown: TKeyEvent;

Description

This event occurs after pressing a key in the active TdxBarWindowItem item control.  Use the OnKeyDown event handler to specify special processing for key press events.  The OnKeyDown handler can respond to all keyboard keys, including function keys and keys combined with the Shift, Alt, and Ctrl keys, and those of the mouse.  If you assign 0 to Key, all further key processing is cancelled.


TdxBarWindowItem.OnKeyPress

TdxBarWindowItem            See Also

Occurs when users press a single character key.

type

  TKeyPressEvent = procedure(Sender: TObject; var Key: Char) of object;

property OnKeyPress: TKeyPressEvent;

Description

This event occurs after pressing an alphanumeric key in the active linked item control of the TdxBarWindowItem item as well as after the OnKeyDown.  Use the OnKeyPress event handler to perform an operation as a result of a single character key press event.  If the Key is equal to 0, all further key processing is canceled.


TdxBarWindowItem.OnKeyUp

TdxBarWindowItem            See Also

Occurs when users release a key once pressed.

type

  TKeyEvent = procedure(Sender: TObject; var Key: Word; Shift: TShiftState) of object;

property OnKeyUp: TKeyEvent;

Description

This event occurs on releasing a key in the active item control of a TdxBarWindowItem item.  Use the OnKeyUp event handler to provide special processing that occurs when a key is released.  The OnKeyUp handler can respond to all keyboard keys, including function keys and keys combined with the Shift, Alt, and Ctrl keys.  If you assign 0 to the Key, all further key processing is canceled.


TdxBarButton

Hierarchy          Properties           Methods           Events            See Also          Example 1          Example 2

The item of the TdxBarButton type represents a toolbar button.

Unit

dxBar

TdxBarButton = class(TdxBarItem);

Description

Buttons are the most common element on toolbars.  The purpose of this class is to create various kinds of buttons: standard, toggle, grouped buttons, and buttons with dropdown menus.  Write an OnClick event handler to define a button’s action.


Hierarchy

TComponent

     |

TdxBarItem

     |


TdxBarButton Properties

TdxBarButton               Legend

TdxBarButton

AllowAllUp

ButtonStyle

CloseSubMenuOnClick

Down

DropDownEnabled

DropDownMenu

GroupIndex

Lowered

PaintStyle

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

UnclickingAfterDoing

Visible

VisibleForUser


TdxBarButton Methods

TdxBarButton               Legend

TdxBarButton

ButtonStyleChanged

CanChangePaintStyle

DownChanged

DoDropDown

DropDownEnabledChanged

PaintStyleChanged

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarButton Events

TdxBarButton               Legend

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TdxBarButton.Lowered

TdxBarButton

Specifies the appearance of a toolbar button.

property Lowered: Boolean;

Description

Set the Lowered property to True to depress a toolbar button. You can, for instance, use this property to keep a button pressed after a user has released it.

The default value is False.


TdxBarButton.CloseSubMenuOnClick

TdxBarButton          See Also

Determines whether a sub menu closes when pressing this button.

property CloseSubMenuOnClick: Boolean;

Description

If CloseSubMenuOnClick is True,  the sub menu behaves as designed, i.e it closes; if CloseSubMenuOnClick is False, it remains on screen.  It can be most useful if, for example, the sub menu buttons function as check buttons.  In this case, the CloseSubMenuOnClick property of these buttons should be set to False.  To close a sub menu, press the mouse button somewhere outside of it.

Note: You should deactivate this option if a buttons style is not bsChecked.


TdxBarButton.AllowAllUp

TdxBarButton            See Also

Determines the behavior of the toggle button in a group.

property AllowAllUp: Boolean;

Description

This property is used by toggle buttons (ButtonStyle is set to bsChecked) if they are grouped with the GroupIndex property.  If AllowAllUp is True, then there may not be an unselected button in a group.   If AllowAllUp is False, at least one button is always selected.   By default, AllowAllUp is False.


TdxBarButton.ButtonStyle

TdxBarButton          Example

Determines button style.

type

  TdxBarButtonStyle = (bsDefault, bsChecked, bsDropDown);

property ButtonStyle: TdxBarButtonStyle;

Description

This property determines the way a button appears on the screen and specifies a button’s behavior.

Value	Meaning
bsDefault	A standard button.
bsChecked	A toggle button.
bsDropDown	A dropdown button with a dropdown menu.


TdxBarButton.DropDownEnabled

TdxBarButton            See Also

Specifies whether the dropdown menu can be activated.

property DropDownEnabled: Boolean;

Description

DropDownEnabled is applicable only if the ButtonStyle is bsDropDown.  If DropDownEnabled is False, then a user cannot activate a dropdown menu and the arrow button is disabled.  To enable a dropdown menu, set DropDownEnabled to True.


TdxBarButton.GroupIndex

TdxBarButton          See also

Allows buttons to work together as a group.

property GroupIndex: Integer;

Description

This property is used by toggle buttons (ButtonStyle is set to bsChecked).  When GroupIndex is 0, the button behaves independently of all other toolbar buttons.  If several buttons have an equal non-zero GroupIndex, they are grouped together.  When a user clicks one of these buttons, it remains selected until the user clicks another button belonging to the same group.  The AllowAllUp property determines whether all the buttons of the group can be unselected.


TdxBarButton.Down

TdxBarButton            See Also          Example

Specifies whether a toggle button has a sunken appearance.

property Down: Boolean;

Description

This property is used by toggle buttons (ButtonStyle is set to bsChecked).  If True, the button appears as sunken (down), otherwise, the button appears as raised (up).  The property is affected by the GroupIndex and AllowAllUp properties.  The Down property is toggled automatically upon a button click event.


TdxBarButton.DropDownMenu

TdxBarButton            See Also

Specifies the menu activated when users press a dropdown button.

property DropDownMenu: TdxBarPopupMenu;

Description

This property is used by dropdown buttons (ButtonStyle is set to bsDropDown).  It specifies the popup menu of the TdxBarPopupMenu type that drops down when the arrow button is pressed.


TdxBarButton.PaintStyle

TdxBarButton            See Also          Example

Specifies the look of linked item controls on screen.

type

  TdxBarPaintStyle = (psStandard, psCaption, psCaptionInMenu, psCaptionGlyph);

property PaintStyle: TdxBarPaintStyle;

Description

This property specifies the button paint style.  It works with the non-dropdown buttons only (ButtonStyle is not equal to bsDropDown).  Paint style can be one of the following:

Value	Meaning
psStandard	A button contains a text caption or a picture.  What is exactly drawn on a button depends on the button location.  If a button is placed on a toolbar, the component draws only pictures, the caption is not drawn.  If a button is placed on a sub item, the component draws both a caption and a picture.  The component uses the following order to draw pictures:    the glyph, if defined;    the picture, specified by the ImageIndex property. Note: if a button is located on a toolbar and no images are specified, then this button appears as an empty rectangle.  In other words, when PaintStyle is psStandard, the caption is not drawn for buttons on toolbars, even if the caption was specified.
psCaption	Button’s caption is used to identify the button to a user.
psCaptionGlyph	Button’s caption and picture are used, the caption appears next to the glyph on the button.
psCaptionInMenu	In sub menus, the caption is drawn on the button surface. If the button is placed on the toolbar, then the image is drawn on it.

This property affects all corresponding item controls.  To change the paint style of a particular item control, use the UserPaintStyle property of its item link.


TdxBarButton.ButtonStyleChanged

TdxBarButton            See Also

This method is called on changing button style.

procedure ButtonStyleChanged; virtual;

Description

This method is called on changing the ButtonStyle property of the TdxBarButton.  ButtonStyleChanged sets the Down property to False and updates the look of all linked item controls.  Override this method to perform special actions when changing button styles.


TdxBarButton.CanChangePaintStyle

TdxBarButton            See Also

Specifies whether TdxBarButton styles can be changed.

function CanChangePaintStyle: Boolean; virtual;

Description

If CanChangePaintStyle returns True, the TdxBarButton paint style item can be changed from the current to another.  This function always returns True for the TdxBarButton class.  Descendants can override it to prevent changing paint styles.  This method is used internally and you should not need to call it.


TdxBarButton.DownChanged

TdxBarButton            See Also

This method is called on changing the Down property.

procedure DownChanged; virtual;

Description

This method calls the DownChanged method of every linked item control to reflect changes.  Override this method to perform special operations when changing the Down property.


TdxBarButton.DoDropDown

TdxBarButton            See Also

Activates an associated dropdown menu.

procedure DoDropDown(X, Y: Integer; ByMouse: Boolean); dynamic;

Description

DoDropDown is used internally to activate a dropdown menu.  This method drops down a menu only for bsDropDown ButtonStyle buttons.  X and Y specify the coordinates the menu appears at.  If ByMouse is True, the menu is activated by mouse click events.  Descendants can override this method to perform special actions on menu activation.


TdxBarButton.DropDownEnabledChanged

TdxBarButton            See Also

This method is called on changing the DropDownEnabled property.

procedure DropDownEnabledChanged; virtual;

Description

This procedure calls the DropDownEnabledChanged property of every linked item control to reflect the changes.  Override this method to perform special actions on changing the DropDownEnabled property.


TdxBarButton.PaintStyleChanged

TdxBarButton            See Also

This method is called when the PaintStyle property changes.

procedure PaintStyleChanged; virtual;

Description

This method is used internally.  It calls the PaintStyleChanged method of every linked item control to reflect changes.  Descendants can override it to perform additional processing when changing the TdxBarButton PaintStyle property.


TdxBarEdit

Hierarchy          Properties           Methods           Events          Example

The TdxBarEdit item provides a text edit field on a toolbar.

Unit

dxBar

TdxBarEdit = class(TdxBarWindowItem);

Description

TdxBarEdit encapsulates the behavior common for all text editing components.  TCustomdxBarCombo and TdxBarCombo are inherited from this item.  The look of the TdxBarEdit on the toolbar depends on bar control location.  If the parent bar control is docked to the top or bottom side of a form, or if the toolbar is floating, TdxBarEdit items appear as ordinary edit windows.  If the parent toolbar is docked to the left or right side of a form, TdxBarEdit items appear as buttons.


Hierarchy

TComponent

     |

TdxBarItem

     |

TdxBarWindowItem

     |


TdxBarEdit Properties

TdxBarEdit               Legend

TdxBarEdit

MaxLength

ReadOnly

ShowCaption

Width

Derived form TdxBarWindowItem

CurText

EmptyWindow

FocusedItemLink

Text

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

ShowCaption

UnclickingAfterDoing

Visible

VisibleForUser


TdxBarEdit Methods

TdxBarEdit               Legend

TdxBarEdit

WidthChanged

Derived from TdxBarWindowItem

Change

CurChange

DoEnter

DoExit

KeyDown

KeyPress

KeyUp

Derived form TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarEdit Events

TdxBarEdit               Legend

Derived from TdxBarWindowItem

OnChange

OnCurChange

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TdxBarEdit.MaxLength

TdxBarEdit

Specifies the maximum number of characters a user can enter into the edit window.

property MaxLength: Integer;

Description

This property stores the maximum number of characters for edited text.  If MaxLength is 0, the maximum value of 32,766 is used.


TdxBarEdit.ReadOnly

TdxBarEdit

Determines whether users can change TdxBarEdit text.

property ReadOnly: Boolean;

Description

This property specifies whether the text in an item control can be modified.  Set ReadOnly to False to enable the edit control to allow editing.


TdxBarEdit.ShowCaption

TdxBarEdit

Specifies whether the item control's caption is displayed.

property ShowCaption: Boolean;

Description

Set the ShowCaption property to False to hide an item control's caption.  The default value for this property is True.


TdxBarEdit.Width

TdxBarEdit          See also

Specifies the horizontal size of linked item controls in pixels.

property Width: Integer;

Description

This property determines the default width of linked item controls in pixels. The default value is 100.  To specify the width of a particular item control, use the TdxBarItemLink UserWidth property.


TdxBarEdit.WidthChanged

TdxBarEdit         See also

This method is called when changing the TdxBarEdit Width property.

procedure WidthChanged; virtual;

Description

This method updates all linked item controls to reflect changes.  Descendants override this method to perform special actions when changing the Width property.  If you have specified a particular width for an item control, changes in the TdxBarEdit Width property do not affect it.  Call Reset from the customizing popup menu to make linked item controls react to TdxBarEdit Width changes.


TCustomdxBarCombo

Hierarchy          Properties           Methods           Events              Example

This class represents a combo box with a customized dropdown window.

Unit

dxBar

TCustomdxBarCombo = class(TdxBarEdit);

Description

Items of the TCustomdxBarCombo type are intended to work with custom dropdown windows.  TCustomdxBarCombo is a base class for defining item classes that represent a specialized Windows combo box.

There are certain conditions concerning the dropdown window of a TCustomdxBarCombo item.  The description of the <DropDownWindowClass> class that represents the dropdown window should include at least the following (in addition to your code):

constructor <DropDownWindowClass>.Create(AOwner: TComponent);

begin

  inherited;

  Visible := False;

end;

procedure <DropDownWindowClass>.CreateParams(var Params: TCreateParams);

begin

  inherited;

  with Params do

    ExStyle := ExStyle or WS_EX_TOOLWINDOW or WS_EX_TOPMOST;

end;

procedure <DropDownWindowClass>.CreateWnd;

begin

  inherited;

  Windows.SetParent(Handle, 0);

  CallWindowProc(DefWndProc, Handle, WM_SETFOCUS, 0, 0);

end;

The OnGetDropDownWindow event handler has to return the handle of the newly created dropdown window.  You may also specify its size in this event handler.  The OnCheckKeyForDropDownWindow allows, if necessary, to process key press events in the dropdown window.


Hierarchy

TComponent

     |

TdxBarItem

     |

TdxBarWindowItem

     |

TdxBarEdit

     |


TCustomdxBarCombo Properties

TCustomdxBarCombo               Legend

TCustomdxBarCombo

DropDownWindow

DroppedDown

ShowEditor

Derived from TdxBarEdit

MaxLength

ReadOnly

ShowCaption

Width

Derived form TdxBarWindowItem

CurText

EmptyWindow

FocusedItemLink

Text

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

UnclickingAfterDoing

Visible

VisibleForUser


TCustomdxBarCombo Methods

TCustomdxBarCombo               Legend

TCustomdxBarCombo

AfterDropDown

CheckKeyForDropDownWindow

CloseUp

DropDown

GetDropDownWindow

Derived from TdxBarEdit

WidthChanged

Derived from TdxBarWindowItem

Change

CurChange

DoEnter

DoExit

KeyDown

KeyPress

KeyUp

Derived form TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TCustomdxBarCombo Events

TCustomdxBarCombo               Legend

TCustomdxBarCombo

OnCheckKeyForDropDownWindow

OnCloseUp

OnDropDown

OnGetDropDownWindow

Derived from TdxBarWindowItem

OnChange

OnCurChange

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TCustomdxBarCombo.AfterDropDown

TCustomdxBarCombo          See Also

procedure AfterDropDown; dynamic;

Description

Used internally.  This method is called, after a dropdown window is displayed on screen.  By default, AfterDropDown performs no actions.


TCustomdxBarCombo.DropDownWindow

TCustomdxBarCombo            See Also

Specifies the HWND handle of a dropdown window.

property DropDownWindow: HWND;

Description

This property stores the handle of a dropdown window.  This handle is set within the OnGetDropDownWindow event handler.

ReadOnly Property


TCustomdxBarCombo.DroppedDown

TCustomdxBarCombo

Determines whether a dropdown window is visible.

property DroppedDown: Boolean;

Description

This property specifies the visibility and activity of a dropdown window.  If DroppedDown is True, the dropdown window is visible and active.


TCustomdxBarCombo.ShowEditor

TCustomdxBarCombo            See Also

Specifies whether the TCustomdxBarCombo text editor allows editing.

property ShowEditor: Boolean;

Description

This property determines if users can edit data in a linked item control.  The value of this property is inverse to the EmptyWindow property.


TCustomdxBarCombo.OnCheckKeyForDropDownWindow

TCustomdxBarCombo

Occurs when users press a key in a linked item control.

type

TdxBarCheckKeyForDropDownWindowEvent = procedure (Sender: TCustomdxBarCombo; Key: Word; Shift: TShiftState; var AcceptKey: Boolean) of object;

property OnCheckKeyForDropDownWindow: TdxBarCheckKeyForDropDownWindowEvent;

Description

This event occurs after each key press in an active linked item control.  The Key parameter is a virtual key code, the Shift parameter reacts to Shift, Ctrl and Alt key press events.  If AcceptKey is True, a dropdown window will process key press events, otherwise, key press events will be processed by the TCustomdxBarCombo item.


TCustomdxBarCombo.OnCloseUp

TCustomdxBarCombo            See Also

Occurs when closing a dropdown window.

property OnCloseUp: TNotifyEvent;

Description

This event occurs when closing a visible dropdown window.  It is not recommended to destroy the dropdown window in the OnCloseUp event handler in order to avoid conflicts caused by the event handler of the dropdown window class.  It is better to allow the parent window to manage it.


TCustomdxBarCombo.OnDropDown

TCustomdxBarCombo            See Also

Occurs when a dropdown window is to be displayed.

property OnDropDown: TNotifyEvent;

Description

This event occurs before displaying a dropdown window.  You can initialize the data for the dropdown window within the OnDropDown event handler.


TCustomdxBarCombo.OnGetDropDownWindow

TCustomdxBarCombo            See Also              Example

Occurs when receiving the handle of a dropdown window.

type

  TdxBarGetDropDownWindowEvent = procedure (Sender: TCustomdxBarCombo; var Window: HWND) of object;

property OnGetDropDownWindow: TdxBarGetDropDownWindowEvent;

Description

This event occurs when retrieving the DropDownWindow property.  You must write a OnGetDropDownWindow event handler to determine the handle of your dropdown window.  The Window parameter is a HWND handle of the dropdown window.  The OnGetDropDownWindow event handler can create a dropdown window if it has not been created earlier and set its size.  For more information about creating dropdown windows, review the section describing TCustomdxBarCombo.


TCustomdxBarCombo.CheckKeyForDropDownWindow

TCustomdxBarCombo            See Also

Determines if a dropdown window processes key press events.

type

  TShiftState = set of (ssShift, ssAlt, ssCtrl, ssLeft, ssRight, ssMiddle, ssDouble);

function CheckKeyForDropDownWindow(Key: Word; Shift: TShiftState): Boolean; virtual;

Description

The Key parameter is a Windows virtual key code.  The Shift parameter indicates the Ctrl, Alt and Shift key states.  The function returns True if a pressed key must be processed by the dropdown window.  This function also generates an OnCheckKeyForDropDownWindow event.


TCustomdxBarCombo.CloseUp

TCustomdxBarCombo

Closes a dropdown window.

procedure CloseUp; dynamic;

Description

The CloseUp method hides a dropdown window, if active, and generates an OnCloseUp event.


TCustomdxBarCombo.DropDown

TCustomdxBarCombo            See Also

Displays a window specified by the DropDownWindow parameter.

procedure DropDown(X, Y: Integer); dynamic;

Description

The Dropdown method activates a dropdown window.  X and Y are the left top corner coordinates of the dropdown window.  This function first calls the CheckDropDownPoint to check the X and Y, then generates an OnDropDown event and finally activates the dropdown window.


TCustomdxBarCombo.GetDropDownWindow

TCustomdxBarCombo            See Also

Returns the HWND handle of a dropdown window

function GetDropDownWindow: HWND; virtual;

Description

This method generates the OnGetDropDownWindow event and returns the HWND handle of a dropdown window.  Override this function to get the HWND handle of a dropdown window without writing a OnGetDropDownWindow event handler.


TdxBarCustomCombo

Hierarchy          Properties           Methods           Events

TdxBarCustomCombo is a class for combobox objects with a custom dropdown list.

Unit

dxBar

TdxBarCustomCombo = class(TCustomdxBarCombo);

Description

TdxBarCustomCombo is a base class for defining items with customized dropdown lists.  The TdxBarCustomCombo is an ancestor for the TdxBarFontNameCombo and TdxBarImageCombo classes.  The dropdown list items of TdxBarCustomCombo are text strings.  Descendants can define special types for listbox items.


Hierarchy

TComponent

     |

TdxBarItem

     |

TdxBarWindowItem

     |

TdxBarEdit

     |

TCustomdxBarCombo

     |


TdxBarCustomCombo Properties

TdxBarCustomCombo               Legend

TdxBarCustomCombo

Canvas

CurItemIndex

DropDownCount

DropDownWidth

ItemHeight

ItemIndex

Items

ItemsHeight

ListBox

Sorted

Derived from TCustomdxBarCombo

DroppedDown

DropDownWindow

ShowEditor

Derived from TdxBarEdit

MaxLength

ReadOnly

ShowCaption

Width

Derived form TdxBarWindowItem

CurText

EmptyWindow

FocusedItemLink

Text

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

UnclickingAfterDoing

Visible

VisibleForUser


TdxBarCustomCombo Methods

TdxBarCustomCombo               Legend

TdxBarCustomCombo

DrawItem

GetDropDownWidth

MeasureItem

MeasureItemWidth

Derived from TCustomdxBarCombo

AfterDropDown

CheckKeyForDropDownWindow

CloseUp

DropDown

GetDropDownWindow

Derived from TdxBarEdit

WidthChanged

Derived from TdxBarWindowItem

Change

CurChange

DoEnter

DoExit

KeyDown

KeyPress

KeyUp

Derived form TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarCustomCombo Events

TdxBarCustomCombo               Legend

TdxBarCustomCombo

OnDrawItem

OnMeasureItem

Derived from TCustomdxBarCombo

OnCheckKeyForDropDownWindow

OnCloseUp

OnDropDown

OnGetDropDownWindow

Derived from TdxBarWindowItem

OnChange

OnCurChange

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TdxBarCustomCombo.Canvas

TdxBarCustomCombo

Specifies a TCanvas object that presents a drawing surface for linked item controls.

property Canvas: TCanvas;

Description

Canvas is used internally to provide easy drawing of linked item controls.  Canvas encapsulates a Windows device context, providing all required tools and methods for drawing.

ReadOnly Property


TdxBarCustomCombo.CurItemIndex

TdxBarCustomCombo

Determines the index of the currently selected dropdown list item.

property CurItemIndex: Integer;

Description

Use this property to obtain or set the index of the currently selected item in a dropdown list.


TdxBarCustomCombo.ItemHeight

TdxBarCustomCombo

Specifies listbox item height in pixels.

property ItemHeight: Integer;

Description

Use ItemHeight to control the height of an item in a dropdown listbox.  If ItemHeight is 0, TdxBarCustomCombo calculates listbox item height.  Set the ItemHeight greater than 0 to precisely specify listbox item height.  The default ItemHeight value is 0.

Note:	You can always change the height of a particular item using the MeasureItem method or from the OnMeasureItem event handler.


TdxBarCustomCombo.Items

TdxBarCustomCombo            See Also

Contains the strings that appear in a dropdown listbox.

property Items: TStrings;

Description

Items is an array of strings similar to TCustomListBox.  Use the Items property to add, insert, delete, and move item strings.  Descendants can define special types for their own items.


TdxBarCustomCombo.ItemsHeight

TdxBarCustomCombo            See Also

Contains an array of listbox item height.

property ItemsHeight[Index: Integer]: Integer;

Description

Elements of the ItemsHeight array contain the height of a particular listbox item in pixels.  ItemsHeight is similar to the TCustomListBox ItemsHeight property because the TdxBarCustomCombo object uses the list box as a dropdown window.  Use the OnMeasureItem event to customize the height of a particular item in a dropdown list.

ReadOnly Property


TdxBarCustomCombo.ListBox

TdxBarCustomCombo            See Also

Specifies a list box for the dropdown window.

property ListBox: TCustomListBox;

Description

ListBox represents the window that appears as a dropdown window.  The handle of the dropdown listbox window is returned by the DropDownWindow method.  The Items property corresponds to the items of this listbox.

ReadOnly Property


TdxBarCustomCombo.Sorted

TdxBarCustomCombo            See Also

Specifies whether items in a list box are sorted alphabetically.

property Sorted: Boolean;

Description

This property corresponds to the TCustomListBox Sorted property.  If Sorted is True, items in a dropdown list are alphabetized; Else, the items are unsorted.  When Sorted is True, items are added or inserted in alphabetical order.


TdxBarCustomCombo.ItemIndex

TdxBarCustomCombo            See Also

Specifies the index of a selected listbox item in a dropdown listbox.

property ItemIndex: Integer;

Description

This property corresponds to the ItemIndex property of TCustomListBox.  ItemIndex is used to select a listbox item at runtime.  Set the ItemIndex value to the index of the listbox item to be selected.  The ItemIndex of the first listbox item is 0.  If no item is selected, ItemIndex is -1.  The default value for the ItemIndex is  -1.


TdxBarCustomCombo.DropDownCount

TdxBarCustomCombo

Specifies the number of the listbox items that appear in a dropdown list.

property DropDownCount: Integer;

Description

By default, a dropdown list contains eight items.  If the DropDownCount value is less, than the number of the listbox items, the dropdown list displays a vertical scroll bar.


TdxBarCustomCombo.DropDownWidth

TdxBarCustomCombo

Specifies dropdown window width.

property DropDownWidth: Integer;

Description

Set the value of dropdown window width using this property.

Note:	Be sure that width is large enough to display all item strings because a horizontal scroll bar is not supported.


TdxBarCustomCombo.CheckKeyForDropDownWindow

TdxBarCustomCombo            See Also

Specifies whether a dropdown window processes key press events.

function CheckKeyForDropDownWindow(Key: Word; Shift: TShiftState): Boolean; override;

Description

The function returns True if the pressed key is to be processed by the dropdown window; Else it returns False.  CheckKeyForDropDownWindow returns True if the key is VK_UP, VK_DOWN, VK_PRIOR or VK_NEXT.  This function overrides the TCustomdxBarCombo CheckKeyForDropDownWindow function.  The Key parameter is a virtual key code.  The Shift parameter indicates Ctrl, Alt and Shift key states.


TdxBarCustomCombo.DrawItem

TdxBarCustomCombo

Draws a listbox item specified by the AIndex parameter.

procedure DrawItem(AIndex: Integer; ARect: TRect; AState: TOwnerDrawState); virtual;

Description

AIndex is an index of listbox items in the Items array.  The indexing of the listbox items starts with 0.  ARect defines the rectangle wherein to place text.  AState is used to determine if the listbox item has a focus.  If an OnDrawItem event handler is not provided, the TdxBarCustomCombo fills the Rect parameter with current brush and writes the text value of the item specified by the Index parameter.  Descendants can override this method to draw their own items.


TdxBarCustomCombo.GetDropDownWidth

TdxBarCustomCombo

Returns dropdown window width.

function GetDropDownWidth: Integer; virtual;

Description

The result of this function is used internally to prepare dropdown window activation.


TdxBarCustomCombo.GetDropDownWindow

TdxBarCustomCombo            See Also

Returns the HWND handle of a dropdown listbox window.

function GetDropDownWindow: HWND; override;

Description

This method overrides the TCustomdxBarCombo GetDropDownWindow method.  TdxBarCustomCombo GetDropDownWindow returns the HWND handle of a dropdown listbox window.


TdxBarCustomCombo.MeasureItem

TdxBarCustomCombo            See Also

Determines height of an item in a listbox.

procedure MeasureItem(AIndex: Integer; var AHeight: Integer); virtual;

Description

The MeasureItem method determines the height of a particular listbox item.  AIndex specifies the listbox item index in the TdxBarCustomCombo Items array.   AHeight corresponds to the height of the listbox item.  This procedure also generates an OnMeasureItem event.  The OnMeasureItem event handler can set appropriate values for listbox item height.


TdxBarCustomCombo.MeasureItemWidth

TdxBarCustomCombo            See Also

Determines listbox item width in pixels.

procedure MeasureItemWidth(AIndex: Integer; var AWidth: Integer); virtual;

Description

Use this method to determine the length of listbox items.  AIndex specifies the index of the listbox item in the TdxBarCustomCombo Items array.  AWidth corresponds to the width of the listbox item.  TdxBarCustomCombo MeasureItemWidth method defines the listbox item length in relation to used font.  Descendants can override this method to access the proper width for their items.  If a listbox item contains additional elements such as graphical lines or additional strings, the MeasureItemWidth should specify the width of the whole item, not just text width.


TdxBarCustomCombo.OnDrawItem

TdxBarCustomCombo         See also

Occurs when a dropdown listbox item is to be displayed.

type

  TdxBarDrawItemEvent = procedure(Sender: TdxBarCustomCombo; AIndex: Integer; ARect: TRect; AState: TOwnerDrawState) of object;

property OnDrawItem: TdxBarDrawItemEvent;

Description

Write an OnDrawItem event handler to draw items in a TdxBarCustomCombo dropdown list.  An OnDrawItem event handler can add graphic elements to listbox items, or replace the text of the listbox item with graphics.  OnDrawItem passes parameters to its event handler: AIndex specifies the index of the item in the TdxBarCustomCombo Items array, ARect provides the coordinates for drawing, AState specifies item state.


TdxBarCustomCombo.OnMeasureItem

TdxBarCustomCombo          See also

Occurs every time users access listbox item height.

type

  TdxBarMeasureItemEvent = procedure(Sender: TdxBarCustomCombo; AIndex: Integer; var AHeight: Integer) of object;

property OnMeasureItem: TdxBarMeasureItemEvent;

Description

Write an OnMeasureItem event handler to specify the height, in pixels, required to draw an item in a dropdown list window.  Different listbox items may have different heights.  The event handler can set the AHeight parameter to the height of the proper listbox item.  The AIndex parameter, passed by the OnMeasureItem, determines the listbox item index in the array, specified by the Items property.  The event handler sets the proper listbox item height in the AHeight parameter.


TdxBarCombo

Hierarchy          Properties          Methods           Events           See Also

TdxBarCombo represents a standard combo box.

Unit

dxBar

TdxBarCombo = class(TdxBarCustomCombo);

Description

TdxBarCombo is the TdxBarCustomCombo  ‘published’ variant.  TdxBarCombo is a TdxBarCustomCombo class descendant.  It inherits all its properties and methods and publishes some of them.  This is the only difference between these classes. TdxBarCombo dropdown listbox contains text strings.


Hierarchy

TComponent

     |

TdxBarItem

     |

TdxBarWindowItem

     |

TdxBarEdit

     |

TCustomdxBarCombo

     |

TdxBarCustomCombo

     |


TdxBarCombo Properties

TdxBarCombo               Legend

Derived from TdxBarCustomCombo

Canvas

CurItemIndex

DropDownCount

DropDownWidth

ItemHeight

ItemIndex

Items

ItemsHeight

ListBox

Sorted

Derived from TCustomdxBarCombo

DroppedDown

DropDownWindow

ShowEditor

Derived from TdxBarEdit

MaxLength

ReadOnly

ShowCaption

Width

Derived form TdxBarWindowItem

CurText

EmptyWindow

FocusedItemLink

Text

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

UnclickingAfterDoing

Visible

VisibleForUser


TdxBarCombo Methods

TdxBarCombo               Legend

Derived from TdxBarCustomCombo

CheckKeyForDropDownWindow

DrawItem

GetDropDownWidth

GetDropDownWindow

MeasureItem

MeasureItemWidth

Derived from TCustomdxBarCombo

AfterDropDown

CloseUp

DropDown

Derived from TdxBarEdit

WidthChanged

Derived from TdxBarWindowItem

Change

CurChange

DoEnter

DoExit

KeyDown

KeyPress

KeyUp

Derived form TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarCombo Events

TdxBarCombo               Legend

Derived from TdxBarCustomCombo

OnDrawItem

OnMeasureItem

Derived from TCustomdxBarCombo

OnCheckKeyForDropDownWindow

OnCloseUp

OnDropDown

OnGetDropDownWindow

Derived from TdxBarWindowItem

OnChange

OnCurChange

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TCustomdxBarSubItem

Hierarchy          Properties           Methods           Events          See also

TCustomdxBarSubItem is the base class for items that have links to other TdxBarManager items.

Unit

dxBar

TCustomdxBarSubItem = class(TdxBarItem);

Description

TCustomdxBarSubItem is the ancestor for all subitem types.  Subitems are objects that contain links to other items from the TdxBarManager list.  Each subitem is visually represented either by an item control with a submenu or by a set of item controls, specified by the item links.  The descendants of this class are TdxBarSubItem and TCustomdxBarContainerItem.


Hierarchy

TComponent

     |

TdxBarItem

     |


TCustomdxBarSubItem Properties

TCustomdxBarSubItem               Legend

In TCustomdxBarSubItem

BarSize

Detachable

DetachingBar

ItemLinks

ShowCaption

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

UnclickingAfterDoing

Visible

VisibleForUser


TCustomdxBarSubItem Methods

TCustomdxBarSubItem               Legend

TCustomdxBarSubItem

CanContainItem

DoCloseUp

DoPopup

DropDown

GetDetachingBar

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TCustomdxBarSubItem Events

TCustomdxBarSubItem               Legend

TCustomdxBarSubItem

OnCloseUp

OnDetaching

OnPaintBar

OnPopup

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TCustomdxBarSubItem.BarSize

TCustomdxBarSubItem

Determines bar size at the left side of a submenu.

property BarSize: Integer;

Description

Use the BarSize property to set the necessary size of a bar in pixels.  The default value for this property is 0.

Use the OnPaintBar event to draw this bar based upon your specific needs.


TCustomdxBarSubItem.Detachable

TCustomdxBarSubItem          See Also

Specifies whether a toolbar subitem is detachable.

property Detachable: Boolean;

Description

The ExpressBars Suite allows you to implement detachable submenus in your application.  Said differently, if the Detachable property is set to True, a bar appears at the top of the submenu list.  By dragging this bar, a user can activate the toolbar assigned via the DetachingBar property.

The default value is False.


TCustomdxBarSubItem.DetachingBar

TCustomdxBarSubItem          See Also

Specifies a toolbar connected to a specific subitem.

property DetachingBar: Integer;

Description

The ExpressBars Suite allows you to implement detachable submenus in your application.  Said differently, if the Detachable property is set to True, a bar appears at the top of the submenu list.  By dragging this bar, a user can activate the toolbar assigned via the DetachingBar property.  The DetachingBar property contains the toolbar’s index.  The first toolbar index is 0.   The default value is -1.


TCustomdxBarSubItem.GetDetachingBar

TCustomdxBarSubItem          See Also

Returns a toolbar assigned to a specific subitem.

function GetDetachingBar: TdxBar;

Description

The ExpressBars Suite allows you to implement detachable submenus in your application.  Said differently, if the Detachable property is set to True, a bar appears at the top of the submenu list.  By dragging this bar, a user can activate the toolbar assigned via the DetachingBar property.  The DetachingBar property contains the toolbar’s index, therefore, call the GetDetachingBar method to obtain the appropriate TdxBar object.


TCustomdxBarSubItem.OnDetaching

TCustomdxBarSubItem          See Also

Occurs when a user starts to drag the bar.

property OnDetaching: TNotifyEvent;

Description

Write an OnDetaching event handler to perform specific actions when a user starts to drag the detaching bar.  For instance, you can create your own toolbar and assign it to the subitem on the fly.


TCustomdxBarSubItem.OnPaintBar

TCustomdxBarSubItem

Occurs when drawing a bar at the left side of the submenu.

type

  TdxBarPaintSubMenuBarEvent = procedure(Sender: TObject; Canvas: TCanvas; const R: TRect) of object;

property OnPaintBar: TdxBarPaintSubMenuBarEvent;

Description

Write an OnPaintBar event handler to draw a bar based upon your specific needs.  The Canvas parameter determines the drawing canvas.  The R parameter specifies the drawing rectangle.

The following example illustrates how to draw a bar and fill it with a lime color.

Canvas.Brush.Color := clLime;

Canvas.FillRect(R);


TCustomdxBarSubItem.DoCloseUp

TCustomdxBarSubItem          See Also

procedure DoCloseUp; dynamic;

Description

DoCloseUp is called upon closing a sub item.  DoCloseUp generates the OnCloseUp event.  Descendants can override this method to perform specific actions on closing a sub menu.


TCustomdxBarSubItem.DoPopup

TCustomdxBarSubItem          See Also

procedure DoPopup; dynamic;

Description

DoPopup is called when a sub item opens.  DoPopup generates the OnPopup event.  Descendants can override this method to perform specific actions on opening the a menu.


TCustomdxBarSubItem.DropDown

TCustomdxBarSubItem

Opens the item’s dropdown window.

procedure DropDown;

Description

The sub item’s dropdown window can be opened by end users by clicking the item or pressing the specified accelerator key.  However, you may need to provide additional or other means of opening dropdowns.  In this instance, you need to respond to specific user actions and call the DropDown method of the desired sub item.


TCustomdxBarSubItem.OnCloseUp

TCustomdxBarSubItem          See Also

Occurs when a dropdown window closes.

type

  TNotifyEvent = procedure(Sender : TObject) of object;

property OnCloseUp: TNotifyEvent;

Description

Write an OnCloseUp event handler to perform specific actions when closing a dropdown window.


TCustomdxBarSubItem.OnPopup

TCustomdxBarSubItem          See Also

Occurs when a dropdown window opens.

type

  TNotifyEvent = procedure(Sender : TObject) of object;

property OnPopup: TNotifyEvent;

Description

Write an OnCloseUp event handler to perform specific actions when opening a dropdown window.


TCustomdxBarSubItem.ShowCaption

TCustomdxBarSubItem

Determines whether the sub item caption is displayed.

property ShowCaption: Boolean;

Description

If ShowCaption is True, then the caption of a given sub item will be displayed on a toolbar.  Otherwise, it is not displayed.  Use this property if you want the sub item to be displayed as an icon without any text.  See the picture below:


TCustomdxBarSubItem.ItemLinks

TCustomdxBarSubItem

ItemLinks is an array of item links to TdxBarManager items.

property ItemLinks: TdxBarItemLinks;

Description

The ItemLinks property contains a list of item links to items contained in TCustomdxBarSubItem.  These item links are used when creating item controls for a given subitem.  For instance, if you wish to add a new button to a subitem, add the item link for this button to the ItemLinks subitem.


TCustomdxBarSubItem.CanContainItem

TCustomdxBarSubItem

Specifies whether an item link to a particular item can be added to the TCustomdxBarSubItem ItemLinks list.

function CanContainItem(AItem: TdxBarItem): Boolean;

Description

This function returns True if the item link to an item, specified by the AItem parameter, can be added to the TCustomdxBarSubItem ItemLinks property; Else, it returns False.  Self-reference is not available.


TdxBarSubItem

Hierarchy           Properties           Methods           Events           See also           Example

This class is a direct descendant of the TCustomdxBarSubItem class.

Unit

dxBar

TdxBarSubItem = class(TCustomdxBarSubItem);

Description

Items of the TdxBarSubItem type are used to represent subitems on toolbars.  Subitems are items that contain other items, specified in the TdxBarManager list.  TdxBarSubItem is visually represented as a submenu.  The TdxBarSubItem is a direct descendant of TCustomdxBarSubItem.  The only difference between these classes is that the TdxBarSubItem has a published ItemLinks property.


Hierarchy

TComponent

     |

TdxBarItem

     |

TCustomdxBarSubItem

     |


TdxBarSubItem Properties

TdxBarSubItem               Legend

TdxBarSubItem

AllowCustomizing

Derived from TCustomdxBarSubItem

BarSize

Detachable

DetachingBar

ItemLinks

ShowCaption

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

UnclickingAfterDoing

Visible

VisibleForUser


TdxBarSubItem Methods

TdxBarSubItem               Legend

Derived from TCustomdxBarSubItem

CanContainItem

DoCloseUp

DoPopup

DropDown

GetDetachingBar

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarSubItem Events

TdxBarSubItem               Legend

Derived from TCustomdxBarSubItem

OnCloseUp

OnDetaching

OnPaintBar

OnPopup

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TdxBarSubItem.AllowCustomizing

TdxBarSubItem

Determines whether a user can customize sub items.

property AllowCustomizing: Boolean;

Description

If AllowCustomizing is True, a user can customize a given sub item.  Said differently, he can add, delete, and move item links.


TCustomdxBarContainerItem

Hierarchy           Propertes           Methods           Events

TCustomdxBarContainerItem is a base class for items with programmatically added item links.

Unit

dxBar

TCustomdxBarContainerItem = class(TCustomdxBarSubItem);

Description

Since item links are added to the TCustomdxBarContainerItem programmatically, you cannot add any item control to it at design time.  Use TCustomdxBarContainerItem descendants to create sub menus with floating number of items at runtime, such as a list of recently used files or a list of child windows.  TdxBarListItem and TdxBarContainerItem are inherited from this class.


Hierarchy

TComponent

     |

TdxBarItem

     |

TCustomdxBarSubItem

     |


TCustomdxBarContainerItem Properties

TCustomdxBarContainerItem               Legend

Derived from TCustomdxBarSubItem

BarSize

Detachable

DetachingBar

ItemLinks

ShowCaption

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

UnclickingAfterDoing

Visible

VisibleForUser


TCustomdxBarContainerItem Methods

TCustomdxBarContainerItem               Legend

TCustomdxBarContainerItem

AddListedItemLinks

DeleteListedItemLinks

ClearItemList

Derived from TCustomdxBarSubItem

CanContainItem

DoCloseUp

DoPopup

GetDetachingBar

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TCustomdxBarContainerItem Events

TCustomdxBarContainerItem               Legend

TCustomdxBarContainerItem

OnGetData

Derived from TCustomdxBarSubItem

OnCloseUp

OnDetaching

OnPaintBar

OnPopup

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TCustomdxBarContainerItem.AddListedItemLinks

TCustomdxBarContainerItem            See Also

Adds the item links defined in the TCustomdxBarContainerItem ItemLinks property to the item links of another object that can contain them.

procedure AddListedItemLinks(AItemLinks: TdxBarItemLinks; AIndex: Integer; FirstCall: Boolean); virtual;

Description

This method is used internally.  It adds the item links specified by the ItemLinks property to the TdxBarItemLinks object specified by the AItemLinks parameter.  The start position in the  TdxBarItemLinks object wherein to add item links is specified by the AIndex parameter.  FirstCall determines whether it is necessary to generate the OnGetData event.  Descendants can override this method to add their own item links to the item links of toolbars or sub items.


TCustomdxBarContainerItem.DeleteListedItemLinks

TCustomdxBarContainerItem            See Also

Removes item links specified by the ItemLinks property from the item links of another object containing the items.

procedure DeleteListedItemLinks(AItemLinks: TdxBarItemLinks; AIndex: Integer); virtual;

Description

This method is used internally.  It removes item links added by the AddListedItemLinks method from the TdxBarItemLinks object specified by the AItemLinks parameter.  AIndex determines the position of the first item link to delete.  The DeleteListedItemLinks method for this class does nothing.  Descendants can override it to remove previously added item links from toolbar item links.


TCustomdxBarContainerItem.ClearItemList

TCustomdxBarContainerItem           See also

Clears the item links list specified by the ItemLinks property.

procedure ClearItemList; virtual;

Description

This method is used internally.  TCustomdxBarContainer ClearItemList does nothing except for setting an indicator which specifies whether it is necessary to clear the item list.  Descendants can override this method to clear the item links list.


TCustomdxBarContainerItem.OnGetData

TCustomdxBarContainerItem          Example

Occurs prior to activation of the list stored in a container item on screen.

property OnGetData: TNotifyEvent;

Description

Write an OnGetData event handler to perform specific actions before a container item activates its list on screen.  For instance, the event handler can mark several items in a list as selected.


TdxBarListItem

Hierarchy          Properties           Methods          Events           Example 1          Example 2

TdxBarListItem is used to represent a list of toolbar strings.

Unit

dxBar

TdxBarListItem = class(TCustomdxBarContainerItem);

Description

The TdxBarListItem items are useful for the display of a numerated list of strings.  Examples of numerated lists are lists of recently used files and lists of active windows in MDI applications.  When creating numerated lists every text string is prefixed by a number.  If the TdxBarListItem is placed on the toolbar, the TdxBarListItem appears as a submenu.  If the TdxBarListItem is placed on a submenu, TdxBarListItems is presented as a string list.


Hierarchy

TComponent

     |

TdxBarItem

     |

TCustomdxBarSubItem

     |

TCustomdxBarContainerItem

     |


TdxBarListItem Properties

TdxBarListItem               Legend

TdxBarListItem

DataIndex

ItemIndex

Items

ShowCheck

ShowNumbers

Derived from TCustomdxBarSubItem

BarSize

Detachable

DetachingBar

ItemLinks

ShowCaption

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

UnclickingAfterDoing

Visible

VisibleForUser


TdxBarListItem Methods

TdxBarListItem               Legend

Derived form TCustomdxBarContainerItem

AddListedItemLinks

DeleteListedItemLinks

ClearItemList

Derived from TCustomdxBarSubItem

CanContainItem

DoCloseUp

DoPopup

GetDetachingBar

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarListItem Events

TdxBarListItem               Legend

Derived from TCustomdxBarContainerItem

OnGetData

Derived from TCustomdxBarSubItem

OnCloseUp

OnDetaching

OnPaintBar

OnPopup

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TdxBarListItem.ItemIndex

TdxBarListItem            See Also                    Example

Specifies the index of a selected item in a list.

property ItemIndex : Integer;

Description

Use ItemIndex to select a list item at runtime.  The ItemIndex corresponds to the item number in the list.  The ItemIndex of the first list item is 0.  If no item is selected, the value is  -1.


TdxBarListItem.DataIndex

TdxBarListItem            See Also

Determines an array of text strings that make up a list.

property DataIndex : Integer;

Description

Use the DataIndex property to select a list item at runtime.  The DataIndex property corresponds to the item number in the list.  The DataIndex of the first list item is 0.  If no item is selected, the value is  -1.  This property works similar to the ItemIndex property but if item text is equal to dash "-", it is not considered when calculating the DataIndex.


TdxBarListItem.Items

TdxBarListItem            See Also                   Example 1          Example 2

Determines an array of text strings that make up a list.

property Items: TStrings;

Description

Specifies the TStrings object, whose items are drawn on a bar control.  During display, TdxBarListItem strings are numerated automatically.  If the string is equal to ‘-’, it is treated as a separator and the component does not create an item link and thus is not taken into consideration by the component when calculating the ItemIndex.  The item control corresponding to the string next to the ‘-‘ string starts a group.


TdxBarListItem.ShowCheck

TdxBarListItem            See Also

Determines whether to mark a selected item in a list.

property ShowCheck: Boolean;

Description

If True, the selected list item displays a check mark.  The selected item is determined by the ItemIndex property.  If ShowCheck is False, list items are displayed much like standard menu items.


TdxBarContainerItem

Hierarchy            Properties           Methods           Events            Example

TdxBarContainerItem types represent items with programmatically added links on a toolbar.

Unit

dxBar

TdxBarContainerItem = class(TCustomdxBarContainerItem);

Description

This class represents the item in which the programmer may specify links to other items of the TdxBarManager.  By filling the ItemLinks property with appropriate values, you can create a structure that resembles Favorites in Microsoft(r) Internet Explorer™ 4.0.  The ItemLinks property can be updated at any moment in time, however, it can be easier to perform this action in the OnGetData event handler.


Hierarchy

TComponent

|

TdxBarItem

|

TdxBarButton

|

TdxBarWindowItem

|

TdxBarEdit

|

TcustomdxBarCombo

|

TdxBarCombo

|

TCustomdxBarSubItem

|

TCustomdxBarContainerItem

|


TdxBarContainerItem Properties

TdxBarContainerItem               Legend

Derived from TCustomdxBarSubItem

BarSize

Detachable

DetachingBar

ItemLinks

ShowCaption

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

UnclickingAfterDoing

Visible

VisibleForUser


TdxBarContainerItem Methods

TdxBarContainerItem               Legend

TdxBarContainerItem

AddListedItemLinks

DeleteListedItemLinks

Derived form TCustomdxBarContainerItem

ClearItemList

Derived from TCustomdxBarSubItem

CanContainItem

DoCloseUp

DoPopup

GetDetachingBar

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarContainerItem Events

TdxBarContainerItem               Legend

Derived from TCustomdxBarContainerItem

OnGetData

Derived from TCustomdxBarSubItem

OnCloseUp

OnDetaching

OnPaintBar

OnPopup

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TdxBarContainerItem.AddListedItemLinks

TdxBarContainerItem            See Also

Adds its own item links to bar control item links.

procedure AddListedItemLinks(AItemLinks: TdxBarItemLinks; AIndex: Integer; FirstCall: Boolean); override;

Description

This procedure adds new item links to TdxBarItemLinks objects specified by the AItemLinks parameter.  AItemLinks is the ItemLinks property of the destination toolbar.  This method deletes the item link from the destination item links and inserts its own item links according to the number of strings specified by the Items property.  AIndex specifies the position in the destination item links at which the addition starts.  FirstCall specifies whether the OnGetData event is generated.  The BeginGroup property of the first added link is set to True.


TdxBarContainerItem.DeleteListedItemLinks

TdxBarContainerItem

Deletes its own item links from the toolbar item links.

procedure DeleteListedItemLinks(AItemLinks: TdxBarItemLinks; AIndex: Integer); override;

Description

This method removes previously added item links from the TdxBarItemLink specified by the AItemLinks parameter.  AIndex specifies the start position from where to remove the item links.  Be sure that the AItemLinks and AIndex parameters specify the same item links that were used in the AddListedItemLinks method.


TdxBarItemControl

Hierarchy          Properties           Methods

TdxBarItemControl is an abstract base class for item controls that represents toolbar items.

Unit

dxBar

TdxBarItemControl = class(TObject);

Description

TdxBarItemControl is a base class for all item controls.  Item controls represent items on a toolbar.  One item can have several item controls.  TdxBarItemControl is an ancestor of the TdxBarButtonControl, TdxBarSubItemControl, TdxBarWinControl.  TdxBarItemControl provides the basic properties and methods that item controls use to interact with users.


Hierarchy

TObject

|


TdxBarItemControl Properties

TdxBarItemControl               Legend

TdxBarItemControl

BarManager

 	Caption

 	Enabled

 	Glyph

HasWindow

 	Height

 	Hint

IsActive

IsSelected

 	ImageIndex

 	Images

Item

ItemLink

Parent

 	Pressed

 	ShortCut

 	Width


TdxBarItemControl Methods

TdxBarItemControl               Legend

TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged


TdxBarItemControl.DrawSelected

TdxBarItemControl

function DrawSelected: Boolean; virtual;

Description

Used internally.  DrawSelected returns True, if an item control is selected (the mouse is either above it or it is selected in customizing mode).


TdxBarItemControl.ImageIndex

TdxBarItemControl          See Also

property ImageIndex: Integer;

Description

Returns the index of a picture associated with an item from an image list.  This picture is drawn on the item control.

ReadOnly Property


TdxBarItemControl.Images

TdxBarItemControl          See Also

C++Builder 4™, Delphi 4™, Delphi 5™

property Images: TCustomImageList;

Delphi 3™, C++Builder 3™

property Images: TImageList;

Description

Returns the image list associated with an item.  The ImageIndex property indicates the image to be drawn on the surface of an item control.

ReadOnly Property


TdxBarItemControl.Pressed

TdxBarItemControl          See Also

Determines whether an item control is pressed.

property Pressed: Boolean;

Description

If Pressed is True, an item control is pressed or focused.  The PressChanged method is called upon changing this property.


TdxBarItemControl.PressedChanged

TdxBarItemControl          See Also

procedure PressedChanged; virtual;

Description

This method is called when changing the Pressed property.  Item Controls use it to perform specific actions when changing the Pressed property.


TdxBarItemControl.Caption

TdxBarItemControl            See Also

Specifies item control caption.

property Caption: string;

Description

Caption is the text that identifies an item control to the user.  Use the TdxBarItemLink UserCaption property to customize the caption of a particular item control.  If UserCaption is not defined, the item control Caption is the same as the Caption of the underlying item.

ReadOnly Property


TdxBarItemControl.Enabled

TdxBarItemControl            See Also

Determines whether an item control responds to mouse, keyboard, and timer events.

property Enabled: Boolean;

Description

Enabled refers to the Enabled property of an underlying item. Set Enabled property of the underlying item to False to disable an item control.  If Enabled is False, the item control ignores mouse and keyboard events.

ReadOnly Property


TdxBarItemControl.Height

TdxBarItemControl            See Also

Specifies the vertical size of an item control in pixels.

property Height: Integer;

Description

Use the Height property to get the height of an item control.  The height of an item control depends on toolbar layout.  For example, when changing toolbar DockingStyle from dsTop to dsLeft, the item control Height property changes.

ReadOnly Property


TdxBarItemControl.Hint

TdxBarItemControl            See Also

Specifies item control Hint.

property Hint: string;

Description

The TdxBarItemControl Hint property refers to the Hint property of an underlying item.

ReadOnly Property


TdxBarItemControl.Glyph

TdxBarItemControl            See Also

Specifies the Glyph of an item control.

property Glyph: TBitmap;

Description

Specifies the glyph drawn on an item control’s surface.  The TdxBarItemControl Glyph property depends upon the Glyph property of the underlying item and the UserGlyph property of the item link between a given item control and its underlying item.  The appearance of the glyph on the item control depends upon the TdxBarItemLink PaintStyle property.

ReadOnly Property


TdxBarItemControl.ShortCut

TdxBarItemControl            See Also

Specifies an item control shortcut.

property ShortCut: TShortCut;

Description

Specifies the shortcut of a given item control.  The ShortCut property refers to the shortcut of the underlying item.

Note: Users can activate an item control by using shortcuts if the form contains a toolbar whose IsMainMenu property is set to True.

ReadOnly Property


TdxBarItemControl.Width

TdxBarItemControl            See Also

Returns the horizontal size of an item control in pixels.

property Width: Integer;

Description

Returns the width of a given item control. Item control width depends on the Width property of the underlying item, the item link UserWidth property, and toolbar layout.

ReadOnly Property


TdxBarItemControl.BarManager

TdxBarItemControl            See Also

Specifies the TdxBarManager to which a given control belongs.

property BarManager: TdxBarManager;

Description

This property returns the TdxBarManager to which a given item control belongs.

ReadOnly Property


TdxBarItemControl.HasWindow

TdxBarItemControl

Specifies whether a given item is a windowed control.

property HasWindow: Boolean;

Description

This property is always False for this class.  Descendant windowed item controls return True.

ReadOnly Property


TdxBarItemControl.IsActive

TdxBarItemControl

Specifies whether a mouse pointer rests over an item control.

property IsActive: Boolean;

Description

IsActive is True when the mouse pointer is over an item control.  When users moves a mouse pointer away from the control, IsActive is set to False.  IsActive is not the same as the IsSelected property.  The following diagram outlines differences between these properties:

ReadOnly Property


TdxBarItemControl.IsSelected

TdxBarItemControl            See Also

Returns True if an item control is selected on a toolbar.

property IsSelected: Boolean;

Description

A toolbar usually contains several item controls and only one of them may be selected at any point in time.  This property determines if the item control is selected.  The item control is selected if the mouse pointer is over it and the Enabled property is True.  TdxBarItemControl IsSelected is a ReadOnly property.  As shown in the following diagrams, IsSelected is not the same as the IsActive property:


TdxBarItemControl.Item

TdxBarItemControl

Specifies an underlying item.

property Item: TdxBarItem;

Description

This property returns the underlying item for a given item control.  You can also access the underlying item by means of the ItemLink property and typecasting.  For the TdxBarItemControl class these two results are the same, but for descendants it is advisable to use the Item property.

ReadOnly Property


TdxBarItemControl.ItemLink

TdxBarItemControl            See Also

Specifies the TdxBarItemLink object that links an item control to an underlying item.

property ItemLink: TdxBarItemLink;

Description

ItemLink specifies the link between a given item control and its underlying item.  It also defines properties of the control such as Caption, Glyph, PaintStyle, and Width.

ReadOnly Property


TdxBarItemControl.Parent

TdxBarItemControl            See Also

Specifies the bar control to which a given item control belongs.

property Parent: TCustomdxBarControl;

Description

Parent is the parent bar control of type TdxBarControl or TdxBarSubMenuControl.

ReadOnly Property


TdxBarItemControl.CaptionChanged

TdxBarItemControl            See Also

This procedure is called when changing item control captions.

procedure CaptionChanged; virtual;

Description

This method calls the RepaintBar method of the parent toolbar.  Override this method to perform special actions when changing captions.


TdxBarItemControl.BeginGroupChanged

TdxBarItemControl            See Also

This method is called when changing the BeginGroup property.

procedure BeginGroupChanged; virtual;

Description

BeginGroupChanged calls the RepaintBar method of the parent toolbar to redraw all item controls.  Descendants can override this method to perform special actions when changing the BeginGroup property.


TdxBarItemControl.EnabledChanged

TdxBarItemControl            See Also

This procedure is called when changing the Enabled property.

procedure EnabledChanged; virtual;

Description

If the Enabled property changes to False and the item control is selected on the toolbar, the SelectedItem property of the TdxBar object is set to nil.


TdxBarItemControl.GlyphChanged

TdxBarItemControl            See Also

This procedure is called when changing the Glyph property.

procedure GlyphChanged; virtual;

Description

GlyphChanged calls the Repaint method to redraw the item control.  Descendants can override this method if they need special actions during glyph change events.


TdxBarItemControl.ShortCutChanged

TdxBarItemControl            See Also

This procedure is called when changing the ShortCut property.

procedure ShortCutChanged; virtual;

Description

ShortCutChanged calls the parents RepaintBar method to reflect changes in the ShortCut property.  It is required if an item control is placed in a submenu and the ShortCut is shown next to the item control caption.


TdxBarItemControl.VisibleChanged

TdxBarItemControl            See Also

This method is called when changing the Visible property of an underlying item.

procedure VisibleChanged; virtual;

Description

Users can change the Visible property of an underlying item to hide or display linked item controls.  VisibleChanged calls the RepainBar method of the bar control to which a given item control belongs.


TdxBarItemControl.CanClicked

TdxBarItemControl

Specifies whether an item control responds to mouse clicks.

function CanClicked: Boolean; virtual;

Description

This function always returns True for this class.  That means that the item control responds to mouse clicks and the OnClick event of the underlying item is generated.  Descendants can override this function to specify whether it responds to mouse clicks.


TdxBarItemControl.Click

TdxBarItemControl

Activates an item control.

procedure Click(ByMouse: Boolean); virtual;

Description

This procedure activates the item control.  The Click method calls the ControlClick and ControlUnclick procedures.  The ByMouse parameter specifies whether the item control has been activated by pressing the mouse button.  If ByMouse is False, the item control has been activated by pressing a keyboard key.


TdxBarItemControl.ControlActivate

TdxBarItemControl            See Also

Changes an item control’s state to active.

procedure ControlActivate(Immediately: Boolean); virtual;

Description

The item control is active when the mouse pointer is over it; Else, the item control is inactive.  The TdxBarItemControl ControlActivate method does nothing except for setting the IsActive property to True.  The Immediately parameter determines the timespan before the control activates.  Descendants can override the ControlActive method to perform special actions on activation of an item control.


TdxBarItemControl.ControlInactivate

TdxBarItemControl            See Also

Changes the control state to inactive.

procedure ControlInactivate(Immediately: Boolean); virtual;

Description

The item control is inactive if the mouse pointer is away from a control.  This method performs no actions except for setting the TdxBarItemControl IsActive property to False.  The Immediately parameter determines the timespan before the control deactivates.  Descendants can override this method to perform special actions when deactivating an item control.


TdxBarItemControl.ControlClick

TdxBarItemControl            See Also

Simulates a mouse click.

procedure ControlClick(ByMouse: Boolean); virtual;

Description

This method activates the item control as if a user has clicked the item control.  ByMouse specifies whether this method has been called by a mouse click. TdxBarItemControl ControlClick method performs no actions.  Descendants can override it to respond to mouse click events.


TdxBarItemControl.ControlUnclick

TdxBarItemControl            See Also

Simulates a mouse button release event when over an item control.

procedure ControlUnclick(ByMouse: Boolean); virtual;

Description

ByMouse specifies whether this method has been called by a mouse click.  ControlUnclick calls, when possible, the DirectClick method of the underlying item in order to generate an OnClick event.


TdxBarItemControl.HasHint

TdxBarItemControl            See Also

Determines whether an item control includes a hint.

function HasHint: Boolean; virtual;

Description

Returns True if the underlying item has a hint; Otherwise it returns False.


TdxBarItemControl.IsDestroyOnClick

TdxBarItemControl

Specifies whether a parent bar control loses focus when a user clicks the item control.

function IsDestroyOnClick: Boolean; virtual;

Description

Determines whether a bar control loses focus after a user clicks an item control.  For instance, after a user clicks a button on a toolbar, the toolbar loses focus, but if a user clicks an edit control, the toolbar will stay focused until the user leaves the edit control.  If an item control loses focus after mouse click events, this function returns True.  TdxBarItemControl IsDestroyOnClick method always returns True.


TdxBarItemControl.Paint

TdxBarItemControl           Example

Paints an item control.

type

  TdxBarPaintType = (ptHorz, ptMenu, ptVert);

procedure Paint(ARect: TRect; PaintType: TdxBarPaintType); virtual;

Description

The paint method of the TdxBarItemControl class performs no actions.  Descendants can override it to draw items they represent.  ARect specifies the rectangle for drawing.  PaintType determines the item control drawing style: ptHorz specifies that the item control is in a horizontal position, ptVert specifies a vertical position, ptMenu specifies the item control is placed onto the menu.


TdxBarItemControl.Create

TdxBarItemControl            See Also

Creates an instance of the TdxBarItemControl class.

constructor Create(AItemLink: TdxBarItemLink); virtual;

Description

This method creates and initializes the TdxBarItemControl object.  AItemLink specifies the item link that describes the link between a given item control and the underlying item.  The Parent property is set equal to the BarControl property of the item link.


TdxBarItemControl.Destroy

TdxBarItemControl            See Also

Destroys a TdxBarItemControl object.

destructor Destroy; override;

Description

If a given item control is selected, the Destroy method sets the SelectedItem property of the parent bar control to nil.


TdxBarItemControl.Repaint

TdxBarItemControl            See Also

Repaints an item control on screen.

procedure Repaint; virtual;

Description

Call Repaint to reflect any changes in an item control.


TdxBarWinControl

Hierarchy          Properties           Methods

TdxBarWinControl is the abstract base class for all windowed item controls.

Unit

dxBar

TdxBarWinControl = class(TdxBarItemControl);

Description

Windowed item controls are item controls that:

•	Can receive focus in a running application.  Other controls may display data, but users can use the keyboard to interact with an item control only if the item control is a windowed control.

•	Have a window handle.  A window handle is the identifier provided by Windows(r) for a window.

All windowed item controls on toolbars are TdxBarWinControl class descendants.  TdxBarEditControl, TCustomdxComboControl, TdxbarComboControl classes derive methods and properties from the TdxBarWinControl class.


Hierarchy

TObject

     |

TdxBarItemControl

     |


TdxBarWinControl Properties

TdxBarWinControl               Legend

TdxBarWinControl

Handle

Item

Focused

Text

WindowRect

Derived from TdxBarItemControl

BarManager

 	Caption

 	Enabled

 	Glyph

HasWindow

 	Height

 	Hint

IsActive

IsSelected

 	ImageIndex

 	Images

ItemLink

Parent

 	Pressed

 	ShortCut

 	Width


TdxBarWinControl Methods

TdxBarWinControl               Legend

TdxBarWinControl

CanClicked

ControlClick

IsDestroyOnClick

WndProc

Derived from TdxBarItemControl

BeginGroupChanged

CaptionChanged

Click

ControlActivate

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged


TdxBarWinControl.Focused

TdxBarWinControl

Specifies whether an item control has focus.

property Focused: Boolean;

Description

If True, the item control has focus.  Set Focused to False to remove focus from the item.


TdxBarWinControl.Handle

TdxBarWinControl

Returns the window handle of an item control.

property Handle: HWND;

Description

This property specifies the HWND handle of an item control window.

ReadOnly Property


TdxBarWinControl.Item

TdxBarWinControl            See Also

Specifies the item linked to an item control.

property Item: TdxBarWindowItem;

Description

Returns the item with which a given item is linked and which is the underlying item for a given item control.  The link between the items and the item controls is defined by the TdxBarItemLink property.

ReadOnly Property


TdxBarWinControl.Text

TdxBarWinControl

Contains item control text.

property Text: string;

Description

The Text property is used for reading the text of an item control or specifying a new string for the Text value.  For edit controls, Text appears within the item control.  For combo boxes, Text is the contents of the combo box editor.


TdxBarWinControl.WindowRect

TdxBarWinControl

Specifies the rectangle occupied by an item control.

property WindowRect: TRect;

Description

This property is used internally to draw an item control on screen.  WindowRect specifies the rectangle in which to draw the item control.


TdxBarWinControl.CanClicked

TdxBarWinControl            See Also

Determines whether an item control responds to mouse clicks.

function CanClicked: Boolean; override;

Description

CanClicked returns True if an item control responds to mouse click events; False otherwise.  The appearance of the windowed control depends upon the DockingStyle of the parent bar control.  If the parent bar control is docked to the left or to the right side of a form, the windowed control appears as a button.  In this instance, it can respond to mouse click events.  If the item control has a horizontal layout, the OnClick event is not generated.


TdxBarWinControl.ControlClick

TdxBarWinControl            See Also

Activates an item control.

procedure ControlClick(ByMouse: Boolean); override;

Description

The ControlClick method is called when a user clicks an item control.  ByMouse specifies whether an item control has been activated by a mouse click.  The ControlClick method sets the Focused property to True and calls the inherited method.


TdxBarWinControl.IsDestroyOnClick

TdxBarWinControl            See Also

Specifies whether the parent bar control loses focus.

function IsDestroyOnClick: Boolean; override;

Description

IsDestroyOnClick always returns False for this class.  It means that the bar control will stay focused after a user clicks the item control.


TdxBarWinControl.WndProc

TdxBarWinControl

This procedure is a default window procedure of the item control.

procedure WndProc(var Message: TMessage); virtual;

Description

All window messages for a given item control are first processed by the WndProc procedure.  Descendants override WndProc when they need special processing of events.


TdxBarButtonControl

Hierarchy          Properties           Methods

Represents a button control on the toolbar.

Unit

dxBar

TdxBarButtonControl = class(TdxBarItemControl);

Description

TdxBarButtonControl represents TdxbarButton items on screen.  Use the TdxBarButton ButtonStyle property to determine the type of button to be displayed.  To customize the look of TdxBarButtonControl, use the PaintStyle property of the TdxBarItemLink object that links the TdxBarButton item and the given item control.


Hierarchy

TObject

     |

TdxBarItemControl

     |


TdxBarButtonControl Properties

TdxBarButtonControl               Legend

TdxBarButtonControl

 	ButtonStyle

 	Down

 	DropDownEnabled

 	DroppedDown

 	GroupIndex

Item

 	PaintStyle

Derived from TdxBarItemControl

BarManager

 	Caption

 	Enabled

 	Glyph

HasWindow

 	Height

 	Hint

IsActive

IsSelected

 	ImageIndex

 	Images

ItemLink

Parent

 	Pressed

 	ShortCut

 	Width


TdxBarButtonControl Methods

TdxBarButtonControl               Legend

TdxBarButtonControl

ArrowWidth

ButtonStyleChanged

DoCloseUp

DoDropDown

DownChanged

DropDownEnabledChanged

GetDefaultHeight

GetDefaultWidth

GetHeight

GetWidth

PaintStyleChanged

Derived from TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged


TdxBarButtonControl.ButtonStyle

TdxBarButtonControl            See Also

Returns the style of a given button control.

type

  TdxBarButtonStyle = (bsDefault, bsChecked, bsDropDown);

property ButtonStyle : TdxBarButtonStyle;

Description

TdxBarButtonControl ButtonStyle corresponds to the ButtonStyle of an underlying item.

ReadOnly Property


TdxBarButtonControl.Down

TdxBarButtonControl            See Also

Determines whether a given button control has a sunken appearance.

property Down: Boolean;

Description

If ButtonStyle is bsChecked, this property returns the Down property of the underlying TdxBarButton item.  If the ButtonStyle is not bsChecked, the Down property is False.

ReadOnly Property


TdxBarButtonControl.DropDownEnabled

TdxBarButtonControl            See Also

Determines whether a dropdown menu can be activated.

property DropDownEnabled: Boolean;

Description

The DropDownEnabled property of a given item control corresponds to the DropDownEnabled property of the underlying item.

ReadOnly Property


TdxBarButtonControl.DroppedDown

TdxBarButtonControl            See Also

Specifies whether a dropdown window is active.

property DroppedDown: Boolean;

Description

This property corresponds to the DroppedDown property of a TdxBarButton.  This property is True, if a bsDropDown style button dropdown window is active.  If ButtonStyle is not bsDropDown, then DroppedDown always returns False.

ReadOnly Property


TdxBarButtonControl.GroupIndex

TdxBarButtonControl            See Also

Determines the index of the group to which a button belongs.

property GroupIndex: Integer;

Description

This property corresponds to the GroupIndex property of an underlying item.

ReadOnly Property


TdxBarButtonControl.PaintStyle

TdxBarButtonControl            See Also

Specifies the PaintStyle of an item control.

type

  TdxBarPaintStyle = (psStandard, psCaption, psCaptionInMenu, psCaptionGlyph);

property PaintStyle: TdxBarPaintStyle;

Description

This property returns PaintStyle specified by the TdxBarItemLink object.

ReadOnly Property


TdxBarButtonControl.Item

TdxBarButtonControl            See Also

Specifies an underlying item.

property Item: TdxBarButton;

Description

This property returns the TdxBarButton item to which a given item control is linked.  Item controls are linked to items via the TdxBarItemLink object.

ReadOnly Property


TdxBarButtonControl.ArrowWidth

TdxBarButtonControl

Returns the width of an arrow button.

function ArrowWidth: Integer; virtual;

Description

If ButtonStyle is bsDropDown, then the arrow button is drawn next to the button.  The ArrowWidth function returns the width of the arrow button.  The size of the arrow button depends on the parent bar control type: ArrowWidth returns different results for different types of parent bar controls.  ArrowWidth is different for TdxBarControl and  TdxBarSubMenuControl.


TdxBarButtonControl.ButtonStyleChanged

TdxBarButtonControl            See Also

This method is called when changing the ButtonStyle property of an underlying item.

procedure ButtonStyleChanged; virtual;

Description

This method calls the RepaintBar method of the parent bar control to reflect button style changes.  Override it to perform special actions when button style has changed.


TdxBarButtonControl.DoCloseUp

TdxBarButtonControl            See Also

Closes the active dropdown window.

procedure DoCloseUp; dynamic;

Description

This method closes the active dropdown window for bsDropDown style buttons.  If ButtonStyle of TdxBarButtonControl differs from bsDropDown, this method does nothing.


TdxBarButtonControl.DoDropDown

TdxBarButtonControl            See Also

Activates a dropdown window.

procedure DoDropDown(ByMouse: Boolean); dynamic;

Description

This method activates the dropdown menu associated with bsDropDown style buttons.  ByMouse indicates the means by which the procedure activates.  If ByMouse is True, the method has been activated by mouse click.  DoDropDown determines the initial coordinates for the dropdown window and passes them to the TdxBarButton DoDropDown method.


TdxBarButtonControl.DownChanged

TdxBarButtonControl            See Also

This method is called when changing the Down property of an underlying item.

procedure DownChanged; virtual;

Description

If ButtonStyle is dsChecked, this method is called when the Down property changes.  If ButtonStyle is not dsChecked, this method does nothing.


TdxBarButtonControl.DropDownEnabledChanged

TdxBarButtonControl            See Also

This method is called when changing the DropDownEnabled property of an underlying item.

procedure DropDownEnabledChanged; virtual;

Description

If ButtonStyle is bsDropDown, then the method is called every time the DropDownEnabled property changes.


TdxBarButtonControl.GetDefaultHeight

TdxBarButtonControl            See Also

Returns the default height of a button.

function GetDefaultHeight: Integer; virtual;

Description

The default height represents the height of a button when the parent bar control has horizontal orientation.


TdxBarButtonControl.GetDefaultWidth

TdxBarButtonControl            See Also

Returns the default width of a button.

function GetDefaultWidth: Integer; virtual;

Description

The default width represents the width of a button when the parent bar control has horizontal orientation.


TdxBarButtonControl.GetWidth

TdxBarButtonControl            See Also

Returns the actual width of a button control.

function GetWidth: Integer; virtual;

Description

This method returns the actual width of a button control on a toolbar.


TdxBarButtonControl.GetHeight

TdxBarButtonControl            See Also

Returns the actual height of a button.

function GetHeight: Integer; virtual;

Description

This method returns the actual height of a button on a toolbar.


TdxBarButtonControl.PaintStyleChanged

TdxBarButtonControl            See Also

This method is called when changing the PaintStyle property.

procedure PaintStyleChanged; virtual;

Description

PaintStyle of the TdxBarButtonControl changes when the PaintStyle of an underlying item is changed, or the PaintStyle property of the item link of the underlying item is changed.


TdxBarEditControl

Hierarchy          Properties           Methods          See Also

Represents a toolbar edit control.

Unit

dxBar

TdxBarEditControl = class(TdxBarWinControl);

Description

TdxBarEditControl represents TdxBarEdit items on toolbars.  TdxBarEditControl is the ancestor for TCustomdxBarCombo.


Hierarchy

TObject

     |

TdxBarItemControl

     |

TdxBarWinControl

     |


TdxBarEditControl Properties

TdxBarEditControl               Legend

TdxBarEditControl

 	CaptionWidth

Item

 	MaxLength

 	ReadOnly

 	ShowCaption

Derived from TdxBarWinControl

Handle

Focused

Text

WindowRect

Derived from TdxBarItemControl

BarManager

 	Caption

 	Enabled

 	Glyph

HasWindow

 	Height

 	Hint

IsActive

IsSelected

 	ImageIndex

 	Images

ItemLink

Parent

 	Pressed

 	ShortCut

 	Width


TdxBarEditControl Methods

TdxBarEditControl               Legend

TdxBarEditControl

WidthChanged

Derived from TdxBarWinControl

CanClicked

ControlClick

IsDestroyOnClick

WndProc

Derived from TdxBarItemControl

BeginGroupChanged

CaptionChanged

Click

ControlActivate

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged


TdxBarEditControl.CaptionWidth

TdxBarEditControl

Returns caption text width.

property CaptionWidth: Integer;

Description

The CaptionWidth property is used internally to obtain the width of an edit item control caption in pixels.

ReadOnly Property


TdxBarEditControl.MaxLength

TdxBarEditControl            See Also

Specifies the maximum number of characters a user can enter into an edit control.

property MaxLength: Integer;

Description

MaxLength corresponds to the MaxLength property of an underlying item.

ReadOnly Property


TdxBarEditControl.ReadOnly

TdxBarEditControl            See Also

Determines whether a user may change text in an edit control.

property ReadOnly: Boolean;

Description

This property corresponds to the ReadOnly property of an underlying item.

ReadOnly Property


TdxBarEditControl.ShowCaption

TdxBarEditControl            See Also

Specifies whether an edit item control caption is displayed.

property ShowCaption: Boolean;

Description

If the ShowCaption property to False, the edit item control caption is hidden.

ReadOnly Property


TdxBarEditControl.Item

TdxBarEditControl            See Also

Specifies an underlying item.

property Item: TdxBarEdit;

Description

This property returns a TdxBarEdit item to which a given item control is linked.  Item controls are linked to items via the TdxBarItemLink object.

ReadOnly Property


TdxBarEditControl.WidthChanged

TdxBarEditControl            See Also

Called when changing an item control’s width.

procedure WidthChanged; virtual;

Description

This method is called when changing the width of an item control.   Item control width may be changed by setting a new value to the UserWidth property of an item link.  If UserWidth has not been defined, item control width may be changed by setting a new value to the Width property of an underlying item.


TCustomdxBarComboControl

Hierarchy          Properties           Methods

This class represents a combo box with a custom dropdown window.

Unit

dxBar

TCustomdxBarComboControl = class(TdxBarEditControl);

Description

Item controls of type TCustomdxBarComboControl represent comboboxes with a custom dropdown window on the toolbar.  TCustomdxBarComboControl is a base class for all item controls both for the standard combo box with a dropdown list and combo boxes with a customized dropdown window, such as TdxBarTreeViewComboContol or TdxBarDateComboControl (item controls for the TdxBartreeViewCombo and TdxBarDateCombo items).


Hierarchy

TObject

     |

TdxBarItemControl

     |

TdxBarWinControl

     |

TdxBarEditControl

     |


TCustomdxBarComboControl Properties

TCustomdxBarComboControl               Legend

TCustomdxBarComboControl

DropDownButtonRect

DropDownWindow

DroppedDown

Item

Derived from TdxBarEditControl

 	CaptionWidth

 	MaxLength

 	ReadOnly

 	ShowCaption

Derived from TdxBarWinControl

Handle

Focused

Text

WindowRect

Derived from TdxBarItemControl

BarManager

 	Caption

 	Enabled

 	Glyph

HasWindow

 	Height

 	Hint

IsActive

IsSelected

 	ImageIndex

 	Images

ItemLink

Parent

 	Pressed

 	ShortCut

 	Width


TCustomdxBarComboControl Methods

TCustomdxBarComboControl               Legend

TCustomdxBarComboControl

ControlInactivate

Derived from TdxBarEditControl

WidthChanged

Derived from TdxBarWinControl

CanClicked

ControlClick

IsDestroyOnClick

WndProc

Derived from TdxBarItemControl

BeginGroupChanged

CaptionChanged

Click

ControlActivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged


TCustomdxBarComboControl.DropDownButtonRect

TCustomdxBarComboControl

Determines the rectangle containing a dropdown button.

property DropDownButtonRect: TRect;

Description

This property is used internally to draw a dropdown button.  Usually DropDownButtonRect specifies the rectangle next to the ‘edit window’ rectangle in an item control

ReadOnly Property


TCustomdxBarComboControl.DropDownWindow

TCustomdxBarComboControl            See Also

Determines the HWND handle of a dropdown window.

property DropDownWindow: HWND;

Description

It returns the HWND handle of a dropdown window.  This handle is used internally.  To correctly define a dropdown window ,see the TCustomdxBarCombo.

ReadOnly Property


TCustomdxBarComboControl.DroppedDown

TCustomdxBarComboControl            See Also

Specifies whether a dropdown window is active.

property DroppedDown: Boolean;

Description

Set DroppedDown to True to make a dropdown window visible and activate it.  If you set DroppedDown to False, the dropdown window is hidden.


TCustomdxBarComboControl.Item

TCustomdxBarComboControl            See Also

Returns the item to which a given item control is linked.

property Item: TCustomdxBarCombo;

Description

It specifies the TCustomdxBarCombo item, which is the underlying item for a given item control.  The links between item and item control are described by the TdxBarItemLink object.

ReadOnly Property


TCustomdxBarComboControl.ControlInactivate

TCustomdxBarComboControl            See Also

Makes an item control inactive.

procedure ControlInactivate(Immediately: Boolean); override;

Description

This procedure makes an item control inactive.  Before calling the inherited method, ControlInactivate hides a dropdown window.  The Immediately parameter determines if a timeout exists before an item control deactivates.  If the parameter is True,  the item control deactivates immediately, otherwise there is a timespan before deactivation.  Descendants can override this method to perform operations on item control deactivation.


TdxBarComboControl

Hierarchy          Properties           Methods

This class represents a combo box with a dropdown list.

Unit

dxBar

TdxBarComboControl = class(TCustomdxBarComboControl);

Description

This item control represents a combo box with a dropdown list on a bar control.  TdxBarComboControl represents such items as TdxBarCombo on a toolbar.  It also represents the following items: TdxBarColorCombo, TdxBarFontNameCombo.  TdxBarComboControl is an ancestor for the TdxBarImageComboControl.


Hierarchy

TObject

     |

TdxBarItemControl

     |

TdxBarWinControl

     |

TdxBarEditControl

     |

TCustomdxBarComboControl

     |


TdxBarComboControl Properties

TdxBarComboControl               Legend

TdxBarComboControl

 	ItemIndex

Item

 	Items

LocalItemIndex

 	Sorted

Derived from TCustomdxBarComboControl

DropDownButtonRect

DropDownWindow

DroppedDown

Derived from TdxBarEditControl

 	CaptionWidth

 	MaxLength

 	ReadOnly

 	ShowCaption

Derived from TdxBarWinControl

Handle

Focused

Text

WindowRect

Derived from TdxBarItemControl

BarManager

 	Caption

 	Enabled

 	Glyph

HasWindow

 	Height

 	Hint

IsActive

IsSelected

 	ImageIndex

 	Images

ItemLink

Parent

 	Pressed

 	ShortCut

 	Width


TdxBarComboControl Methods

TdxBarComboControl               Legend

Derived from TCustomdxBarComboControl

ControlInactivate

Derived from TdxBarEditControl

WidthChanged

Derived from TdxBarWinControl

CanClicked

ControlClick

IsDestroyOnClick

WndProc

Derived from TdxBarItemControl

BeginGroupChanged

CaptionChanged

Click

ControlActivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged


TdxBarComboControl.ItemIndex

TdxBarComboControl            See Also

Specifies the selected item index in a dropdown list.

property ItemIndex: Integer;

Description

Refers to the ItemIndex property of a TdxBarCustomCombo item.  TdxBarComboControl ItemIndex returns the index of selected items in an Items list.  Unlike the LocalItemIndex property all item controls, which are based on the same item have the same ItemIndex.

ReadOnly Property


TdxBarComboControl.Items

TdxBarComboControl            See Also

Determines the strings that appear in a dropdown list.

property Items: TStrings;

Description

This property returns a set of strings, which is displayed in a dropdown window.

ReadOnly Property


TdxBarComboControl.Sorted

TdxBarComboControl            See Also

Determines whether items in a dropdown list are alphabetically sorted.

property Sorted: Boolean;

Description

This property refers to the Sorted property of an underlying item and returns True if items in the dropdown list are alphabetized.

ReadOnly Property


TdxBarComboControl.Item

TdxBarComboControl            See Also

Specifies the underlying item for a given item control.

property Item: TdxBarCustomCombo;

Description

This property returns the TdxBarCustomCombo item to which a given item control is linked.  The links between the item and item control are specified by the TdxBarItemLink object.  If the type of the underlying item differs from TdxBarCustomCombo (e.g. TdxBarFontNameCombo or TdxBarColorCombo), you must use typecasting in order to work with the underlying item.

ReadOnly Property


TdxBarComboControl.LocalItemIndex

TdxBarComboControl            See Also

Specifies the selected dropdown list item.

property LocalItemIndex: Integer;

Description

This property specifies the highlighted item in an active dropdown window.  When a user navigates through the items in a dropdown list, the LocalItemIndex property is changed, and the value of the currently selected item appears in the edit box portion of the combo box.  The first item in the list has index 0.  Unlike ItemIndex, the LocalItemIndex property specifies the index in the active item control.  After a user confirms changes, the ItemIndex property of the underlying item is set equal to the LocalItemIndex.


TdxBarSubItemControl

Hierarchy          Properties           Methods          See Also

Represents a subitem on a toolbar.

Unit

dxBar

TdxBarSubItemControl = class(TdxBarItemControl);

Description

This class represents TdxBarSubItem on a toolbar.  When clicking the mouse, TdxBarSubItemControl creates a bar control of type TdxBarSubMenuControl with item controls, specified by the ItemLinks property.  The arrow is drawn next to the TdxBarSubItemControl to indicate that the item control has a dropdown menu, but if the TdxBarSubItemControl is placed on the main menu toolbar, the arrow is not drawn.  This class is an ancestor for the TdxBarContainerItemControl.


Hierarchy

TObject

     |

TdxBarItemControl

     |


TdxBarSubItemControl Properties

TdxBarSubItemControl               Legend

TdxBarSubItemControl

Item

SubMenuControl

Derived from TdxBarItemControl

BarManager

 	Caption

 	Enabled

 	Glyph

HasWindow

 	Height

 	Hint

IsActive

IsSelected

 	ImageIndex

 	Images

ItemLink

Parent

 	Pressed

 	ShortCut

 	Width


TdxBarSubItemControl Methods

TdxBarSubItemControl               Legend

TdxBarSubItemControl

GlyphChanged

CanClicked

ControlClick

CreateSubMenuControl

GetDefaultHeight

GetDefaultWidth

Derived from TdxBarItemControl

BeginGroupChanged

CaptionChanged

Click

ControlActivate

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

HasHint

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged


TdxBarSubItemControl.Item

TdxBarSubItemControl          See also

Specifies an underlying item.

property Item: TCustomdxBarSubItem;

Description

This property returns a TCustomdxBarSubItem item to which a given item control is linked.  The link between items and item controls is defined by the TdxBarItemLink.

ReadOnly Property


TdxBarSubItemControl.SubMenuControl

TdxBarSubItemControl            See Also

Specifies the sub menu, which appears when a user clicks the TdxBarsubItemControl.

property SubMenuControl: TdxBarSubMenuControl;

Description

Use this property at run time to set the TdxBarSubMenuControl object which activates when users click a given item control.


TdxBarSubItemControl.GlyphChanged

TdxBarSubItemControl            See Also

This method is called when the glyph drawn on an item control is changed.

procedure GlyphChanged; override;

Description

The TdxBarSubItemControl Glyph property is changed when changing the Glyph property of an underlying item or when changing the UserGlyph property of the item link, specified by the ItemLink property.  GlyphChanged calls the Repaint method to reflect changes in the Glyph property.


TdxBarSubItemControl.CanClicked

TdxBarSubItemControl          See Also

Specifies an item control’s response to mouse clicks.

function CanClicked: Boolean; override;

Description

This method overrides the TdxBarItemControl method.  CanClicked always returns False for this class.


TdxBarSubItemControl.ControlClick

TdxBarSubItemControl

Activates an item control.

procedure ControlClick(ByMouse: Boolean); override;

Description

ByMouse specifies whether a control has been activated by the mouse.  If ByMouse is False, then the control has been activated by a key press event; If True – the item control has been activated after a mouse click.


TdxBarSubItemControl.CreateSubMenuControl

TdxBarSubItemControl          See Also

Creates a bar control of type TdxBarSubMenuControl.

procedure CreateSubMenuControl; virtual;

Description

This method creates the TdxBarSubMenuControl.  This item control appears when a user clicks the TdxBarSubItemControl.  Item controls contained in the TdxBarSubmenuControl are described by the ItemLinks property of the TdxBarSubItem object to which a given TdxBarSubItemControl is linked.


TdxBarSubItemControl.GetDefaultHeight

TdxBarSubItemControl            See Also

Returns the default height of a given item control.

function GetDefaultHeight: Integer; virtual;

Description

This method is used internally.  It returns the height of an item control assuming it has a horizontal layout.


TdxBarSubItemControl.GetDefaultWidth

TdxBarSubItemControl            See Also

Returns the default width of a given item control.

function GetDefaultWidth: Integer; virtual;

Description

This method is used internally.  It returns the width of an item control assuming it has a horizontal orientation.


TdxBarContainerItemControl

Hierarchy          Properties           Methods            See Also

This class represents container items on toolbars.

Unit

dxBar

TdxBarContainerItemControl = class(TdxBarSubItemControl);

Description

The TdxBarContainerItemControl item control represents TdxBarListItem and TdxBarContainerItem items on screen.


Hierarchy

TObject

     |

TdxBarItemControl

     |

TdxBarSubItemControl

     |


TdxBarContainerItemControl Properties

TdxBarContainerItemControl               Legend

TdxBarContainerItemControl

Item

Derived from TdxBarSubMenuControl

SubMenuControl

Derived from TdxBarItemControl

BarManager

 	Caption

 	Enabled

 	Glyph

HasWindow

 	Height

 	Hint

IsActive

IsSelected

 	ImageIndex

 	Images

ItemLink

Parent

 	Pressed

 	ShortCut

 	Width


TdxBarContainerItemControl Methods

TdxBarContainerItemControl               Legend

TdxBarContainerItemControl

CreateSubMenuControl

Derived from TdxBarSubMenuControl

GlyphChanged

CanClicked

ControlClick

GetDefaultHeight

GetDefaultWidth

Derived from TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

HasHint

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged


TdxBarContainerItemControl.Item

TdxBarContainerItemControl            See Also

Specifies an associated container item.

property Item: TCustomdxBarContainerItem;

Description

The Item property specifies an underlying container item.  TdxBarContainerItemControl represents TdxBarListItem and TdxBarContainerItem type items on screen.  TdxBarContainerItemControl uses item links, specified by the ItemLinks property of the underlying item, for the display of contained item controls on screen.

ReadOnly Property


TdxBarContainerItemControl.CreateSubMenuControl

TdxBarContainerItemControl            See Also

Creates a sub menu to represent a given item control on screen.

procedure CreateSubMenuControl; override;

Description

The TdxBarContainerItemControl appears on screen as a sub menu.  This method creates and initializes the TContainerItemSubMenuControl object that represents the container item on screen.


ActiveBarControl

Unit

dxBar

function ActiveBarControl: TCustomdxBarControl;

Description

This function returns the active bar control (the toolbar or submenu that receives keyboard messages).  ActiveBarControl returns nil if there is no such object.


GetBarManagerByForm

See Also                  Example

Unit

dxBar

function GetBarManagerByForm(AForm: TCustomForm): TdxBarManager;

Description

This function returns the TdxBarManager type object belonging to the form specified by the AForm parameter or nil if there is no such object. Use the dxBarManagerList variable to get the list of all available TdxBarManager objects of an application.


dxBarManagerList

See Also

Unit

dxBar

var

  dxBarManagerList: TdxBarManagerList;

Description

This global variable is common for an entire application and stores the list of all objects of type TdxBarManager.


dxBarCustomizingForm

See Also

Unit

dxBarCustForm

type

  TdxBarCustomizingForm = class(TForm);

function dxBarCustomizingForm: TdxBarCustomizingForm;

Description

This function returns a customization form or nil if there is no such a form.  You can discover which TdxBarManager is currently in customizing mode by reading the CustomizingBarManager property of the TdxBarManagerList object.  Use the dxBarManagerList variable to get the list of all available TdxBarManager objects.


dxBarRegisterItem

See Also          Example

Registers an item class.

Unit

dxBar

type

  TdxBarItemClass = class of TdxBarItem;

  TdxBarItemControlClass = class of TdxBarItemControl;

procedure dxBarRegisterItem(AItemClass: TdxBarItemClass;

  AItemControlClass: TdxBarItemControlClass; AVisible: Boolean);

Description

This procedure is necessary when creating custom items.  Use dxBarRegisterItem to register your own item classes.  dxbarRegisterItem links an item control class, specified by the AItemControlClass to the item class, specified by the AItemClass.  If AVisible is True, the new item will be visible in the TdxBarManager list of registered items; Else, the item is not visible in the list, but you can still create it at run time and use it as any other item.


dxBarUnregisterItem

See Also          Example

Unregisters an item class.

Unit

dxBar

type

  TdxBarItemClass = class of TdxBarItem;

procedure dxBarUnregisterItem(AItemClass: TdxBarItemClass);

Description

Use this procedure to unregister an item class.  The AItemClass parameter specifies the item class to unregister.  After unregistering, you can no longer work with the item.


Custom Item example
dxBarRegisterItem, dxBarUnregisterItem Example

The following code demonstrates custom item creation.  This custom item is similar to TdxBarStatic, but allows you to specify text color.

unit CustomItem;

interface

uses

  Classes, Graphics, Windows, dxBar;

type

   // defines the item class

   TdxBarColorStatic = class(TdxBarItem)

   private

    FColor : TColor;

    procedure SetColor(AColor : TColor);

   public

    constructor Create(AOwner : TComponent); override;

   published

    property Color:TColor read FColor write SetColor;

   end;

  // defines the item control class

  TdxBarColorStaticControl = class(TdxBarItemControl)

   private

    function GetItem: TdxBarColorStatic;

   protected

    function GetHeight: Integer; override;

    function GetWidth: Integer; override;

    function IsDestroyOnClick: Boolean; override;

    procedure Paint(ARect: TRect; PaintType: TdxBarPaintType); override;

   public

    property Item : TdxBarColorStatic read GetItem;

   end;

procedure Register;

implementation

constructor TdxBarColorStatic.Create(AOwner : TComponent);

begin

 inherited;

 FColor := 0;

end;

procedure TdxBarColorStatic.SetColor(AColor : TColor);

var

 i : integer;

begin

// sets a new color and updates all linked item controls

 FColor := AColor;

 Update;

end;

function TdxBarColorStaticControl.GetItem : TdxBarColorStatic;

begin

 Result := TdxBarColorStatic(ItemLink.Item);

end;

// paints the item control on screen

procedure TdxBarColorStaticControl.Paint(ARect : TRect; PaintType : TdxBarPaintType);

var

 Canvas : TCanvas;

 Size : TSize;

 AText : string;

 OldColor : TColor;

begin

 if ARect.Left = ARect.Right then Exit;

 AText := Item.Caption;

 Canvas := Parent.Canvas;

 SetBkMode(Canvas.Handle, TRANSPARENT);

 OldColor := GetTextColor(Canvas.Handle);

 SetTextColor(Canvas.Handle, Item.Color);

 Windows.FillRect(Canvas.Handle, ARect, GetSysColorBrush(COLOR_BTNFACE));

 GetTextExtentPoint32(Canvas.Handle, PChar(AText), Length(AText), Size);

 if PaintType = ptVert then

  with ARect do

   OffsetRect(ARect,(Right-Left+Size.cy)div 2,(Bottom-Top-Size.cx)div 2)

 else

  with ARect do

   OffsetRect(ARect,(Right-Left-Size.cx)div 2,(Bottom-Top-Size.cy)div 2);

 DrawText(Canvas.Handle, PChar(AText), Length(AText),

    ARect, DT_SINGLELINE or DT_NOCLIP);

 SetTextColor(Canvas.Handle, OldColor);

 SetBkMode(Canvas.Handle, OPAQUE);

end;

function TdxBarColorStaticControl.IsDestroyOnClick: Boolean;

begin

 Result := False;

end;

function TdxBarColorStaticControl.GetWidth : integer;

var

 Size : TSize;

 AText: string;

begin

 AText := Item.Caption;

 GetTextExtentPoint32(Parent.Canvas.Handle, PChar(AText), Length(AText), Size);

 if IsVertical(Parent) then

  Result := Parent.TextSize;

 else

  Result := Size.cx + (Parent.TextSize div 2);

end;

// returns the item control height according to its layout

function TdxBarColorStaticControl.GetHeight : integer;

var

 Size : TSize;

 AText: string;

begin

 AText := Item.Caption;

 GetTextExtentPoint32(Parent.Canvas.Handle, PChar(AText), Length(AText), Size);

 if IsVertical(Parent) then

  Result := Size.cx + (Parent.TextSize div 2)

 else

  Result := Parent.TextSize;

end;

procedure Register;

begin

 RegisterNoIcon([TdxBarColorStatic]);

end;

initialization

dxBarRegisterItem(TdxBarColorStatic,TdxBarColorStaticControl,True);

finalization

dxBarUnregisterItem(TdxBarColorStatic);

end.


IsVertical

See Also          Example

Determines whether a bar control has a vertical layout.

Unit

dxBar

function IsVertical(ABarControl: TCustomdxBarControl): Boolean;

Description

This function returns True, if DockingStyle of the bar control, specified by the ABarControl parameter, equals dsLeft or dsRight, otherwise it is False.


Customizing Popup Menu

See Also

The customizing popup menu is used for customizing the look of a particular item control.  The customizing popup menu is activated at design time when clicking the right mouse button over an item control.

Options of the customizing popup menu correspond to the properties of the TdxBarItemLink object:

Reset

Resets all custom settings for an item control.  Clicking the Reset clears all user settings for item controls (sets the TdxBarItemLink UserDefine property to empty).

Delete

Removes an item control from the form.

Name

Sets the custom caption for an item control.  This option corresponds to the UserCaption property of the TdxBarItemLink object.

PaintStyle options

PaintStyle options define the custom paint style for an item control.  Options of this section correspond to the UserPaintStyle property of TdxBarItemLink.

Default Style

Sets the default style for an item control.

The default style is different for different item controls.

Text Only (Always)

Item control is drawn as text.

Text Only (In menus)

Item control is drawn as text in menus only.

Image and Text

Image and text are drawn on the item control’s surface.

BeginGroup

Inserts a group separator before an item control.  This option corresponds to the BeginGroup property of the TdxBarItemLink object.

At design-time the customizing popup menu includes the following items:

Visible

Determines whether an item control will be visible at runtime.  Uncheck Visible to hide it at runtime.

Most Recently Used

Determines whether an item control refers to the most frequently used item controls.  Uncheck this item to send the item control to the bottom of the recently used items list.


TdxBarListItem.ShowNumbers

TdxBarListItem            See Also

Determines whether to display the numeration of TdxBarListItem strings.

property ShowNumbers: Boolean;

Description

If set to True (by default), numbers are displayed on the left side of TdxBarListItem strings.  Set the ShowNumbers property to False to suppress this set.


dxBarHintWindowClass

See Also          Example

Unit

dxBar

type

  TdxBarHintWindowClass = class of TdxBarHintWindow;

dxBarHintWindowClass: TdxBarHintWindowClass;

Description

This global variable is designed to specify the window class used to display hints.  By default, the dxBarHintWindowClass refers to the TdxBarHintWindow class.


TdxBarHintWindow

Hierarchy          Methods          See Also          Example

Unit

dxBar

TdxBarHintWindow = class(TCustomControl);

Description

This class is a window used to display hints.  Your application can use its own window class to display hints based upon this class.


Hierarchy

TCustomControl

|


TdxBarHintWindow Methods

TdxBarHintWindow          Legend

TdxBarHintWindow

Paint

ActivateHint


TdxBarHintWindow.Paint

TdxBarHintWindow          Example

procedure Paint; override;

Description

This procedure draws a hint window on screen.


TdxBarHintWindow.ActivateHint

TdxBarHintWindow          Example

procedure ActivateHint(P: TPoint; const AHint: string; BarManager: TdxBarManager); virtual;

Description

This procedure is called before displaying a hint window for an item handled by a BarManager.  The P parameter determines the coordinates of the top left corner of the hint window.  AHint is the string used as a hint.


Custom Hint Window Example

C++Builder

This example demonstrates how you can use your own window to display hints.  A bitmap can be also displayed in the hint window.

// Delphi

type

  TMyHint = class (TdxBarHintWindow)

  private

    FBitmap : TBitmap;

  protected

    procedure Paint; override;

  public

    constructor Create(AOwner :TComponent); override;

    destructor Destroy; override;

    procedure ActivateHint(P: TPoint; const AHint: string; BarManager: TdxBarManager); override;

  end;

implementation

  . . .

constructor TMyHint.Create(AOwner : TComponent);

begin

  inherited Create(AOwner);

  FBitmap := TBitmap.Create;

  // The following line uses the LoadBmp function

  // that is not described here.

  // It can load a bitmap from resources or a file.

  FBitmap := LoadBmp( . . .);

end;

destructor TMyHint.Destroy;

begin

  FBitmap.Free;

end;

procedure TMyHint.Paint;

var

  R :TRect;

begin

  R := ClientRect;

  DrawEdge(Canvas.Handle, R, BDR_RAISEDOUTER, BF_RECT);

  Canvas.Draw(2 , (Height - FBitmap.Height) div 2, FBitmap);

  Canvas.TextOut(FBitmap.Width + 2 , (Height - Canvas.TextHeight(Caption)) div 2, Caption);

end;

procedure TMyHint.ActivateHint(P: TPoint; const AHint: string; BarManager: TdxBarManager);

var

 H : integer;

begin

  inherited;

  H := Canvas.TextHeight(Caption);

  if FBitmap.Height > H then

    H := FBitmap.Height;

  Height :=  H + 4;

  Width := FBitmap.Width + 3 + Canvas.TextWidth(Caption) + 3;

end;

  . . .

initialization

  dxBarHintWindowClass := TMyHint;


Custom Hint Window Example (C++Builder)

Delphi

// C++Builder

Project.cpp

#include <vcl.h>

#pragma hdrstop

USERES("Project.res");

USEFORM("Unit1.cpp", Form1);

#include "Unit1.h"

WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)

{

    try

    {

        Application->Initialize();

        dxBarHintWindowClass = __classid(TMyHint);

        Application->CreateForm(__classid(TForm1), &Form1);

        Application->Run();

    }

    catch (Exception &exception)

    {

        Application->ShowException(&exception);

    }

    return 0;

}

// C++Builder

Unit1.h

...

class TMyHint : public TdxBarHintWindow

{

private:

    Graphics::TBitmap * FBitmap;

protected:

    void __fastcall Paint(void);

public:

    __fastcall TMyHint(TComponent * AOwner);

    __fastcall ~TMyHint(void);

    void __fastcall ActivateHint(const tagPOINT &P, const AnsiString AHint, TdxBarManager * BarManager);

};

// C++Builder

Unit1.cpp

...

__fastcall TMyHint::TMyHint(TComponent * AOwner) : TdxBarHintWindow(AOwner)

{

  FBitmap = new Graphics::TBitmap;

  // The following line uses the LoadBmp function

  // that is not described here.

  // It can load a bitmap from resources or a file.

  FBitmap->LoadFromFile( . . . );

}

__fastcall TMyHint::~TMyHint(void)

{

  delete FBitmap;

}

void __fastcall TMyHint::Paint(void)

{

  RECT R;

  R = ClientRect;

   DrawEdge(Canvas->Handle, &R, BDR_RAISEDOUTER, BF_RECT);

  Canvas->Draw(2 , (int)((Height - FBitmap->Height) / 2), FBitmap);

  Canvas->TextOut(FBitmap->Width + 2 , (int)((Height - Canvas->TextHeight(Caption))/2), Caption);

}

void __fastcall TMyHint::ActivateHint(const tagPOINT &P, const AnsiString AHint, TdxBarManager * BarManager)

{

 TdxBarHintWindow::ActivateHint(P, AHint, BarManager);

 int H = Canvas->TextHeight(Caption);

 if (FBitmap->Height > H)

   H = FBitmap->Height;

 Height =  H + 4;

 Width = FBitmap->Width + 3 + Canvas->TextWidth(Caption) + 3;

}


dxBarExtItems Unit

Items

TdxBarColorCombo

TdxBarControlContainerItem

TdxBarDateCombo

TdxBarFontNameCombo

TdxBarImageCombo

TdxBarInPlaceSubItem

TdxBarMRUListItem

TdxBarLargeButton

TdxBarProgressItem

TdxBarSpinEdit

TdxBarStatic

TdxBarToolbarsListItem

TdxBarTreeViewCombo

Item Controls

TdxBarColorComboControl

TdxBarControlContainerControl

TdxBarDateComboControl

TdxBarImageComboControl

TdxBarInPlaceSubItemControl

TdxBarLargeButtonControl

TdxBarProgressControl

TdxBarSpinEditControl

TdxBarStaticControl

TdxBarToolbarsListItemControl

TdxBarTreeViewComboControl

Objects

TdxBarDateNavigator

TdxBarTreeView

Functions

dxBarColorDialog

dxBarFontDialog


TdxBarColorCombo

Hierarchy          Properties           Methods            Events           See Also           Example 1          Example 2

Provides the ability to work with a combo box whose dropdown window contains a color list.

Unit

dxBarExtItems

TdxBarColorCombo = class(TdxBarCustomCombo);

Description

TdxBarColorCombo is used to select colors from a combo box.  It provides a list of sixteen predefined colors: clBlack, clMaroon, clGreen, clOlive, clNavy, clPurple, clTeal, clGray, clSilver, clRed, clLime, clYellow, clBlue, clFuchsia, clAqua, clWhite.  If DockingStyle of a toolbar to which a TdxBarColorCombo belongs is dsRight or dsLeft, TdxBarColorCombo appears as a button.  When pressed, a color selection dialog appears.


Hierarchy

TComponent

     |

TdxBarItem

     |

TdxBarWindowItem

     |

TdxBarEdit

     |

TCustomdxBarCombo

     |

TdxBarCustomCombo

     |


TdxBarColorCombo Properties

TdxBarColorCombo               Legend

TdxBarColorCombo

AutoColor

AutoColorText

Color

CurColor

CustomColorText

ShowAutoColor

ShowCustomColorButton

ShowEditor

Text

Derived from TdxBarCustomCombo

Canvas

CurItemIndex

DropDownCount

DropDownWidth

ItemHeight

ItemIndex

Items

ItemsHeight

ListBox

Sorted

Derived from TCustomdxBarCombo

DroppedDown

DropDownWindow

ShowEditor

Derived from TdxBarEdit

MaxLength

ReadOnly

ShowCaption

Width

Derived form TdxBarWindowItem

CurText

EmptyWindow

FocusedItemLink

Text

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

UnclickingAfterDoing

Visible

VisibleForUser


TdxBarColorCombo Methods

TdxBarColorCombo               Legend

TdxBarColorCombo

Change

Create

DoClick

Derived from TdxBarCustomCombo

CheckKeyForDropDownWindow

DrawItem

GetDropDownWidth

GetDropDownWindow

MeasureItem

MeasureItemWidth

Derived from TCustomdxBarCombo

AfterDropDown

CloseUp

DropDown

Derived from TdxBarEdit

WidthChanged

Derived from TdxBarWindowItem

CurChange

DoEnter

DoExit

KeyDown

KeyPress

KeyUp

Derived form TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Destroy

DirectClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarColorCombo Events

TdxBarColorCombo               Legend

Derived from TdxBarCustomCombo

OnDrawItem

OnMeasureItem

Derived from TCustomdxBarCombo

OnCheckKeyForDropDownWindow

OnCloseUp

OnDropDown

OnGetDropDownWindow

Derived from TdxBarWindowItem

OnChange

OnCurChange

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TdxBarColorCombo.CurColor

TdxBarColorCombo          See Also

Specifies the color currently selected in TdxBarColorCombo.

property CurColor: TColor;

Description

Use this property to specify the current color for TdxBarColorCombo.  It is used only during editing.  The CurColor property is set to 0, as soon as a user presses ENTER or exits the color combo.


TdxBarColorCombo.AutoColor

TdxBarColorCombo          See Also

Specifies the color to be displayed in a list as the automatic color.

property AutoColor: TColor;

Description

Use this property to specify the color to be displayed in a dropdown list as the automatic color.

Note:	The automatic color item is visible if the ShowAutoColor property is True.


TdxBarColorCombo.AutoColorText

TdxBarColorCombo          See Also

Specifies the text of the automatic color item.

property AutoColorText: string;

Description

Use this property to indicate automatic color item text.  By default, this text equals "(automatic)".

Note:	The automatic color item is visible if the ShowAutoColor property is True.


TdxBarColorCombo.ShowAutoColor

TdxBarColorCombo          See Also

Determines whether the automatic color item is displayed in TdxBarColorCombo.

property ShowAutoColor: Boolean;

Description

If ShowAutoColor is True, TdxBarColorCombo includes an automatic color item.

Use the AutoColor and AutoColorText properties to determine the color and text of the automatic color item.


TdxBarColorCombo.ShowCustomColorButton

TdxBarColorCombo

Determines whether the custom color button is visible.

property ShowCustomColorButton: Boolean;

Description

If ShowCustomColorButton is True, then a custom color button is drawn to the left of TdxBarColorCombo.  Press this button to activate the color dialog with which users can select any custom color not displayed in the dropdown list.


TdxBarColorCombo.Color

TdxBarColorCombo          See Also          Example 1          Example 2

Specifies selected color.

property Color: TColor;

Description

This property specifies the current color.  Assign a value to the Color property in the Object Inspector or in program code to set a default color when opening the color selection dialog.


TdxBarColorCombo.ShowEditor

TdxBarColorCombo            See Also

Specifies whether to allow editing within a combo box.

property ShowEditor: Boolean;

Description

If True, color name may be entered into the combo box editor by users.  If this name matches a color name from the dropdown list, the selected color changes.  Otherwise, the combo box has no selected color and ‘no value’ appears within the combo box editor.


TdxBarColorCombo.Text

TdxBarColorCombo            See Also

Specifies the text to appear in a combo box.

property Text: String;

Description

The Text property contains the generally accepted name of the current color.  For instance, for the clRed color, the Text property is equal to ‘Red’.  If a color with the specified name is in the list, the selected color changes, otherwise, value of the CustomColorText property appears in the combo box editor.  The same result occurs if the selected color does not match any predefined colors.


TdxBarColorCombo.Change

TdxBarColorCombo            See Also

Responds to the changes in a combo box.

procedure Change; override;

Description

This procedure is called when combo box contents change.  Changes in the TdxBarColorCombo Color or Text properties lead to changes in selected color.


TdxBarColorCombo.Create

TdxBarColorCombo

Creates an instance of the TdxBarColorCombo type.

constructor Create(AOwner: TComponent); override;

Description

This method creates and initializes the TdxBarColorCombo object.  After the inherited constructor has been called, the Create method creates the dropdown list.  The number of dropdown list items is sixteen.  The predefined colors are the following: clBlack, clMaroon, clGreen, clOlive, clNavy, clPurple, clTeal, clGray, clSilver, clRed, clLime, clYellow, clBlue, clFuchsia, clAqua, clWhite.  The Create method sets the ShowEditor to False and loads an image for the Glyph property from resources.


TdxBarColorCombo.DoClick

TdxBarColorCombo            See Also

Activates the color selection dialog.

procedure DoClick; override;

Description

This procedure is called if the DockingStyle of a toolbar to which a given combo box belongs is dsRight or dsLeft.  With these docking styles, the combo box appears as a toolbar button. The DoClick method is called on the button click event and displays a color selection dialog.  The color selected from this dialog is stored in the Color property of the TdxBarColorCombo object.


TdxBarFontNameCombo

Hierarchy          Properties           Methods          Events           Example

Represents a combo box with a list of fonts available to the system.

Unit

dxBarExtItems

TdxBarFontNameCombo = class(TdxBarCustomCombo);

Description

TdxBarFontNameCombo type items provide an easy mechanism for font selection.  The selected font name is stored in the TdxBarFontNameCombo Text property.  It allows selection by means of the keyboard or a dropdown list.


Hierarchy

TComponent

     |

TdxBarItem

     |

TdxBarWindowItem

     |

TdxBarEdit

     |

TCustomdxBarCombo

     |

TdxBarCustomCombo

     |


TdxBarFontNameCombo Properties

TdxBarFontNameCombo               Legend

TdxBarFontNameCombo

ShowEditor

Derived from TdxBarCustomCombo

Canvas

CurItemIndex

DropDownCount

DropDownWidth

ItemHeight

ItemIndex

Items

ItemsHeight

ListBox

Sorted

Derived from TCustomdxBarCombo

DroppedDown

DropDownWindow

Derived from TdxBarEdit

MaxLength

ReadOnly

ShowCaption

Width

Derived form TdxBarWindowItem

CurText

EmptyWindow

FocusedItemLink

Text

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

UnclickingAfterDoing

Visible

VisibleForUser


TdxBarFontNameCombo Methods

TdxBarFontNameCombo               Legend

TdxBarFontNameCombo

Create

DoClick

Derived from TdxBarCustomCombo

CheckKeyForDropDownWindow

DrawItem

GetDropDownWidth

GetDropDownWindow

MeasureItem

MeasureItemWidth

Derived from TCustomdxBarCombo

AfterDropDown

CloseUp

DropDown

Derived from TdxBarEdit

WidthChanged

Derived from TdxBarWindowItem

Change

CurChange

DoEnter

DoExit

KeyDown

KeyPress

KeyUp

Derived form TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Destroy

DirectClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarFontNameCombo Events

TdxBarFontNameCombo               Legend

Derived from TdxBarCustomCombo

OnDrawItem

OnMeasureItem

Derived from TCustomdxBarCombo

OnCheckKeyForDropDownWindow

OnCloseUp

OnDropDown

OnGetDropDownWindow

Derived from TdxBarWindowItem

OnChange

OnCurChange

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TdxBarFontNameCombo.ShowEditor

TdxBarFontNameCombo

Specifies whether editing is available in the combo box editor.

property ShowEditor: Boolean;

Description

If True, users may enter font names using the keyboard.  If a font name does not exist, the combo box locates the nearest match to the text entered.


TdxBarFontNameCombo.Create

TdxBarFontNameCombo            See Also

Creates an instance of the TdxBarFontNameCombo type.

constructor Create(AOwner: TComponent); override;

Description

This method creates and initializes the TdxBarFontNameCombo object.  After calling the inherited constructor, the Create method builds the font name list.  The DropDownCount property is set to 12.  By default, the font list is sorted in alphabetical order.  The ShowEditor property is set to False.


TdxBarFontNameCombo.DoClick

TdxBarFontNameCombo            See Also

Activates a font selection dialog.

procedure DoClick; override;

Description

This procedure is called only if DockingStyle of the toolbar to which a given combo box belongs is dsRight or dsLeft.  In such an instance, the combo box appears as a button on the toolbar.  Pressing this button calls the DoClick method.  DoClick activates a font selection dialog.  The name of the selected font is stored in the combo box Text property.


TdxBarImageCombo

Hierarchy          Properties           Methods           Events

Provides methods and properties to create combo boxes with text and image items in the dropdown list.

Unit

dxBarExtItems

TdxBarImageCombo = class(TdxBarCustomCombo);

Description

The dropdown items list of the TdxBarImageCombo object consists of text strings and images.  An application may display either text, image, or both within the combo box.  The text element of the dropdown list is drawn next to the image.  There are two methods of item selection from this dropdown list: Selection from the dropdown list itself or seleciton via the keyboard.


Hierarchy

TComponent

     |

TdxBarItem

     |

TdxBarWindowItem

     |

TdxBarEdit

     |

TCustomdxBarCombo

     |

TdxBarCustomCombo

     |


TdxBarImageCombo Properties

TdxBarImageCombo               Legend

TdxBarImageCombo

ImageIndexes

Images

Items

ShowEditor

Sorted

ItemIndex

ShowText

Derived from TdxBarCustomCombo

Canvas

CurItemIndex

DropDownCount

DropDownWidth

ItemHeight

ItemsHeight

ListBox

Derived from TCustomdxBarCombo

DroppedDown

DropDownWindow

Derived from TdxBarEdit

MaxLength

ReadOnly

ShowCaption

Width

Derived form TdxBarWindowItem

CurText

EmptyWindow

FocusedItemLink

Text

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

UnclickingAfterDoing

Visible

VisibleForUser


TdxBarImageCombo Methods

TdxBarImageCombo               Legend

TdxBarImageCombo

Create

DoClick

ImagesChanged

Derived from TdxBarCustomCombo

CheckKeyForDropDownWindow

DrawItem

GetDropDownWidth

GetDropDownWindow

MeasureItem

MeasureItemWidth

Derived from TCustomdxBarCombo

AfterDropDown

CloseUp

DropDown

Derived from TdxBarEdit

WidthChanged

Derived from TdxBarWindowItem

Change

CurChange

DoEnter

DoExit

KeyDown

KeyPress

KeyUp

Derived form TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Destroy

DirectClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarImageCombo Events

TdxBarImageCombo               Legend

Derived from TdxBarCustomCombo

OnDrawItem

OnMeasureItem

Derived from TCustomdxBarCombo

OnCheckKeyForDropDownWindow

OnCloseUp

OnDropDown

OnGetDropDownWindow

Derived from TdxBarWindowItem

OnChange

OnCurChange

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TdxBarImageCombo.ImageIndexes

TdxBarImageCombo                  Example

Contains an image index array of dropdown list items.

property ImageIndexes[Index: Integer]: Integer;

Description

Every dropdown list item is presented as a text string and as a picture.  Each element of the ImageIndexes array is an index of the item image in the image list specified by the ImageList property. The Index parameter is the index of the dropdown list item in the TdxBarImageCombo Items list.  If the ImageIndexes array element is  -1, then the dropdown item list has no associated image.


TdxBarImageCombo.Images

TdxBarImageCombo            See Also

Specifies the images list associated with a dropdown items list.

property Images: TImageList;

for Delphi 4™

property Images: TCustomImageList;

Description

Every dropdown item consists of text and an image.  The ImageList contains the bitmaps to display next to text for a dropdown item.


TdxBarImageCombo.Items

TdxBarImageCombo            See Also                  Example

Specifies dropdown list items.

property Items: TStrings;

Description

Contains an array of items displayed in a dropdown list.  Every item from the TdxBarImageCombo list consists of text and an image.  The image is drawn to the left of text.  Images are associated with items via the ImageIndexes property.


TdxBarImageCombo.ImagesChanged

TdxBarImageCombo

Called on changing the ImageList property.

procedure ImagesChanged; virtual;

Description

Each time a change is made to the TdxBarImageCombo ImageList property, the ImageChanged method is called.  Override it to perform special actions when changing the ImageList property.


TdxBarImageCombo.Create

TdxBarImageCombo

Creates a TdxBarImageCombo type object.

constructor Create(AOwner: TComponent); override;

Description

This method creates and initializes the TdxBarImageCombo object.  After calling the inherited constructor, the Create method loads the default glyph from resources, sets the ShowEditor property to False and sets the ShowText property to True.


TdxBarImageCombo.DoClick

TdxBarImageCombo            See Also

Activates a dialog to select a dropdown list item.

procedure DoClick; override;

Description

This method is called only if the DockingStyle of a bar control is dsRight or dsLeft.  In this instance, TdxBarImageCombo appears as a button on the toolbar.  If the OnClick event handler is assigned, the DoClick method generates the OnClick event.  Otherwise, after calling the inherited method, DoClick activates a list box window.


TdxBarImageCombo.ShowEditor

TdxBarImageCombo

Specifies whether to show an editor in a combo box.

property ShowEditor : Boolean;

Description

Setting the ShowEditor to True allows combo box text editing.  If the text matches one of the dropdown list items, this item appears in the combo box editor.  If text does not match any of the dropdown list items, the combo box displays only the text without an associated image.


TdxBarImageCombo.Sorted

TdxBarImageCombo                  Example

Specifies whether to show the dropdown list items in alphabetical order.

property Sorted : Boolean;

Description

If True, items in a drop down list are alphabetized; Else, the dropdown list items are displayed in order of creation.  When the Sorted is True, a new item is set to the dropdown list according to the value of its text.


TdxBarImageCombo.ItemIndex

TdxBarImageCombo

Specifies the selected dropdown list item.

property ItemIndex : Integer;

Description

ItemIndex defines the index of a selected dropdown list item.  The index of the first dropdown list item is 0.


TdxBarImageCombo.ShowText

TdxBarImageCombo

Specifies whether to display text within a dropdown list.

property ShowText: Boolean;

Description

Each item in a TdxBarImageCombo object consists of text and an image.  The text appears next to the image in the dropdown list and in the combo box editor.  If ShowText is True, TdxBarImageCombo shows both the text and the image.  Set ShowText to False in order to prevent the display of item text.

	The ShowText property is set to False.
	The ShowText property is set to True.


TdxBarDateCombo

Hierarchy          Properties           Methods            Events          See Also

TdxBarDateCombo provides methods and properties for a quick and easy date selection.

Unit

dxBarExtItems

TdxBarDateCombo = class(TCustomdxBarCombo);

Description

TdxBarDateCombo provides users with a powerful date selection mechanism.  The dropdown window of this combo box appears as a calendar.  It allows selection via a visual calendar or a keyboard.  The selected date is stored in the Date property as a TDateTime value and in the Text property as a string.


Hierarchy

TComponent

     |

TdxBarItem

     |

TdxBarWindowItem

     |

TdxBarEdit

     |

TCustomdxBarCombo

     |


TdxBarDateCombo Properties

TdxBarDateCombo               Legend

TdxBarDateCombo

CurDate

Date

DateOnStart

DatePopup

MaxDate

MinDate

ShowDayText

ShowDayText

ShowTodayButton

ShowClearButton

Derived from TCustomdxBarCombo

CurItemIndex

DropDownCount

DropDownWidth

ItemHeight

ItemIndex

Items

ItemsHeight

ListBox

Sorted

Derived from TCustomdxBarCombo

DroppedDown

DropDownWindow

ShowEditor

Derived from TdxBarEdit

MaxLength

ReadOnly

ShowCaption

Width

Derived form TdxBarWindowItem

CurText

EmptyWindow

FocusedItemLink

Text

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

UnclickingAfterDoing

Visible

VisibleForUser


TdxBarDateCombo Methods

TdxBarDateCombo               Legend

TdxBarDateCombo

Create

Destroy

DoClick

DropDown

Derived from TCustomdxBarCombo

CheckKeyForDropDownWindow

DrawItem

GetDropDownWidth

GetDropDownWindow

MeasureItem

MeasureItemWidth

Derived from TCustomdxBarCombo

AfterDropDown

CloseUp

Derived from TdxBarEdit

WidthChanged

Derived from TdxBarWindowItem

Change

CurChange

DoEnter

DoExit

KeyDown

KeyPress

KeyUp

Derived form TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

DirectClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarDateCombo Events

TdxBarDateCombo               Legend

Derived from TCustomdxBarCombo

OnDrawItem

OnMeasureItem

Derived from TCustomdxBarCombo

OnCheckKeyForDropDownWindow

OnCloseUp

OnDropDown

OnGetDropDownWindow

Derived from TdxBarWindowItem

OnChange

OnCurChange

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TdxBarDateCombo.CurDate

TdxBarDateCombo          See Also

Specifies the selected date in TdxBarDateCombo.

property CurDate: TDateTime;

Description

Use this property to obtain the selected date in a date editor.  This property is only effective during editing.  It is cleared upon pressing the ENTER key of TdxBarDateCombo.


TdxBarDateCombo.DatePopup

TdxBarDateCombo            See Also

Specifies a dropdown calendar window.

property DatePopup: TdxBarDateNavigator;

Description

Use this property to refer to the dropdown calendar.  The DatePopup property is used internally to customize calendar behavior.

ReadOnly Property


TdxBarDateCombo.Date

TdxBarDateCombo                  Example

Contains the selected date.

property Date: TDateTime;

Description

Use it to set or retrieve a date.  TdxBarDateCombo provides two methods of date selection: from the dropdown calendar or the keyboard.  When using the keyboard, be sure to use the ENTER key to confirm data input.


TdxBarDateCombo.DateOnStart

TdxBarDateCombo

Specifies the date displayed by the date combo at application startup.

type

  TdxBarDateOnStart = (bdsToday, bdsNullDate, bdsCustom);

property DateOnStart: TdxBarDateOnStart;

Description

Use the DateOnStart property to specify the date displayed by the date combo at application startup.  The following values are available for this property.

Value	Description
bdsToday	The current date is displayed.
bdsNullDate	The date combo is empty.
bdsCustom	The date specified by the Text property is displayed.
Note: the actual date displayed within the date combo is also affected by the MinDate and MaxDate properties.  For instance, setting the DateOnStart property to bdsToday will not always result in displaying the current date.  If the current date is less than specified by the MinDate property, the MinDate property will specify the displayed date, etc.


TdxBarDateCombo.MaxDate

TdxBarDateCombo

Specifies the maximum available date.

property MaxDate: TDateTime;

Description

The MaxDate property is used to specify the upper limit of dates that can be specified by this date combo.  If an end user chooses a date that exceeds this limit, the selected date is automatically set to MaxDate.

Note: the MaxDate property cannot be set to a value less than that specified by the MinDate property.


TdxBarDateCombo.MinDate

TdxBarDateCombo

Specifies the minimum date available.

property MinDate: TDateTime;

Description

Use the MinDate property to specify the lower limit for dates that can be specified by this date combo.  If an end user chooses a date prior to this minimum, the selected date is automatically set to the MinDate property value.  Also, the MinDate property specifies the date that will be selected if pressing the Clear button of the date combo dropdown window.

Note: the MinDate property cannot be set to a value greater than that specified by the MaxDate property.


TdxBarDateCombo.ShowDayText

TdxBarDateCombo

Specifies whether the day name is displayed within the date combo.

property ShowDayText: Boolean;

Description

Use the ShowDayText property to specify the visibility of the day name.  If set to True, the day name is visible; otherwise, it is hidden.  The image below shows the same date combo when the ShowDayText property is set to True and False respectively.


TdxBarDateCombo.ShowTodayButton

TdxBarDateCombo            See Also

Specifies whether to show the ‘Today’ button within a dropdown calendar.

property ShowTodayButton: Boolean;

Description

The ShowTodayButton is True by default.  If True, a ‘Today’ button is drawn within the calendar.  This button sets TdxBarDateCombo to the current system date.

	The ShowTodayButton property is set to True.
	The ShowTodayButton property is set to False.


TdxBarDateCombo.ShowClearButton

TdxBarDateCombo            See Also

Specifies whether to show the ‘Clear’ button within a dropdown calendar.

property ShowClearButton: Boolean;

Description

The ShowClearButton is True by default.  If True, a ‘Clear’ button is drawn within the calendar.  This button sets TdxBarDateCombo to a NULL date value.

	The ShowClearButton property is set to True.
	The ShowClearButton property is set to False.


TdxBarDateCombo.DropDown

TdxBarDateCombo            See Also

Displays a dropdown calendar.

procedure DropDown(X, Y: Integer); override;

Description

Used to initialize calendar parameters and to display a dropdown calendar.  The X and Y parameters specify the left top corner coordinates of the calendar window.  This procedure is called only if DockingStyle of the parent bar control is not dsRight or dsLeft.


TdxBarDateCombo.Create

TdxBarDateCombo            See Also

Creates an instance of TdxBarDateCombo.

constructor Create(AOwner: TComponent); override;

Description

This method is used to create and initialize a TdxBarDateCombo object.  After calling the inherited method, Create sets the Date property to the current date and sets the ShowTodayButton and ShowClearButton to True.  Descendants can override this method to perform special actions with an object.


TdxBarDateCombo.Destroy

TdxBarDateCombo

Destroys a TdxBarDateCombo object.

destructor Destroy; override;

Description

This method destroys a TdxBarDateCombo instance.  Descendants can override it to perform additional actions while destroying the object.


TdxBarDateCombo.DoClick

TdxBarDateCombo            See Also

Opens a dialog to select a date.

procedure DoClick; override;

Description

This method is only called if DockingStyle of the parent bar control is set to dsRight or dsLeft.  In this instance, TdxBarDateCombo appears as a toolbar button.  Press this button to call the DoClick procedure.  The DoClick method opens a date selection dialog.  Use the ShowTodayButton and the ShowClearButton properties to customize the look of the calendar.


TdxBarTreeViewCombo

Hierarchy          Properties           Methods           Events              Example

TdxBarTreeViewCombo is a combo box with a treeview dropdown window.

Unit

dxBarExtItems

TdxBarTreeViewCombo = class(TCustomdxBarCombo);

Description

TdxBarTreeViewCombo provides tree-structured data representation within your toolbar.  TdxBarTreeViewCombo is an ancestor for all toolbar combo box elements with a dropdown tree.  A TdxBarTreeViewCombo dropdown window contains a treeview.


Hierarchy

TComponent

     |

TdxBarItem

     |

TdxBarWindowItem

     |

TdxBarEdit

     |

TCustomdxBarCombo

     |


TdxBarTreeViewCombo Properties

TdxBarTreeViewCombo               Legend

TdxBarTreeViewCombo

AllowResizing

ChooseByDblClick

DropDownHeight

DropDownWidth

FullExpand

Images

Indent

Items

SelectedNode

ShowButtons

ShowEditor

ShowImageInEdit

ShowLines

ShowRoot

SortType

StateImages

TreeView

Derived from TCustomdxBarCombo

DropDownWindow

DroppedDown

ShowEditor

Derived from TdxBarEdit

MaxLength

ReadOnly

ShowCaption

Width

Derived form TdxBarWindowItem

CurText

EmptyWindow

FocusedItemLink

Text

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

UnclickingAfterDoing

Visible

VisibleForUser


TdxBarTreeViewCombo Methods

TdxBarTreeViewCombo               Legend

TdxBartreeViewCombo

Create

Destroy

DoClick

DoSelectedNodeChanged

DropDown

Derived from TCustomdxBarCombo

AfterDropDown

CheckKeyForDropDownWindow

CloseUp

DropDown

GetDropDownWindow

Derived from TdxBarEdit

WidthChanged

Derived from TdxBarWindowItem

Change

CurChange

DoEnter

DoExit

KeyDown

KeyPress

KeyUp

Derived form TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

DirectClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarTreeViewCombo Events

TdxBarTreeViewCombo               Legend

TdxBarTreeViewCombo

OnExpanded

OnExpanding

OnCanSelectNode

OnChanging

OnCollapsed

OnCollapsing

OnCompare

OnGetImageIndex

OnGetSelectedIndex

OnTreeViewChange

Derived from TCustomdxBarCombo

OnCheckKeyForDropDownWindow

OnCloseUp

OnDropDown

OnGetDropDownWindow

Derived from TdxBarWindowItem

OnChange

OnCurChange

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TdxBarTreeViewCombo.SelectedNode

TdxBarTreeViewCombo            See Also

Specifies a selected node.

property SelectedNode: TTreeNode;

Description

Enables you to work with the selected node of a treeview.  SelectedNode is similar to that of TTreeView object.


TdxBarTreeViewCombo.TreeView

TdxBarTreeViewCombo            See Also              Example

Specifies the tree view that appears in a dropdown window.

property TreeView: TdxBarTreeView;

Description

Use this property to access a TdxBarTreeView tree node contained in a dropdown window.

ReadOnly Property


TdxBarTreeViewCombo.AllowResizing

TdxBarTreeViewCombo            See Also

Specifies whether users can resize a dropdown window.

property AllowResizing : Boolean;

Description

If AllowResizing is True, users can change dropdown window size and the dropdown window paints a window resizer grip; Else, the dropdown window does not include resizing and looks like a standard combo box list window.  In this instance, you must use the DropDownWidth and DropDownHeight properties to set dropdown window size.


TdxBarTreeViewCombo.ChooseByDblClick

TdxBarTreeViewCombo

Specifies whether to close a dropdown window via a mouse double-click.

property ChooseByDblClick: Boolean;

Description

Use the ChooseByDblClick property to specify the manner in which a dropdown treeview window is closed.  If this property is set to True, a mouse double-click selects the appropriate node to display within an editor and closes the dropdown window.  If this property is set to False, these actions are performed via a single mouse click event.  The default value for the ChooseByDblClick property is True.


TdxBarTreeViewCombo.DropDownHeight

TdxBarTreeViewCombo            See Also

Specifies dropdown window height.

property DropDownHeight: Integer;

Description

Use this property to set or access a dropdown window’s height.  If a dropdown window’s height is less than the height of the expanded tree view, a vertical scroll bar appears on the left side of the dropdown window.


TdxBarTreeViewCombo.DropDownWidth

TdxBarTreeViewCombo            See Also

Specifies dropdown window width.

property DropDownWidth: Integer;

Description

Use this property to set or access a dropdown window’s width.  If a dropdown window’s width is less than the width of the expanded tree view, a horizontal scroll bar appears at the bottom of the dropdown window.


TdxBarTreeViewCombo.FullExpand

TdxBarTreeViewCombo            See Also

Specifies whether a tree view appears fully expanded.

property FullExpand: Boolean;

Description

If True, then a tree view in a dropdown window is fully expanded.

	The FullExpand property is set to True.
	The FullExpand property is set to False.
Note:	Assigning the FullExpand property to False at runtime does not generate node collapse.


TdxBarTreeViewCombo.Images

TdxBarTreeViewCombo          See Also

Specifies the images that appear to the left of node text.

property Images: TImageList;

for Delphi 4™

property Images: TCustomImageList;

Description

Use this property to set or access the image list whose images are associated with dropdown tree nodes.  The image index, associated with the dropdown tree node, is stored in the ImageIndex property of the dropdown tree node.


TdxBarTreeViewCombo.Indent

TdxBarTreeViewCombo

Specifies the area to the left side of node text.

property Indent: Integer;

Description

This property is similar to the Indent property of the TTreeView object.

	The Indent property is set to 15.
	The Indent property is set to 25.
	The Indent property is set to 35.


TdxBarTreeViewCombo.Items

TdxBarTreeViewCombo

Specifies the nodes of a dropdown tree.

property Items: TTreeNodes;

Description

Use this property to make changes to dropdown tree nodes.  Dropdown tree nodes are similar to TTreeView nodes.


TdxBarTreeViewCombo.ShowButtons

TdxBarTreeViewCombo            See Also

Specifies whether to display buttons to the left of tree nodes with children.

property ShowButtons: Boolean;

Description

If True, the ‘+’ and ‘-‘ buttons are drawn to the left of each node with children.  You can expand or collapse nodes by pressing these buttons.

	The ShowButtons property is set to True.
	The ShowButtons property is set to False.


TdxBarTreeViewCombo.ShowEditor

TdxBarTreeViewCombo

Specifies whether users can select a node by entering its text using the keyboard.

property ShowEditor: Boolean;

Description

If False, a node may only be selected using the dropdown tree view and the TdxBarTreeViewCombo will no respond to alphanumeric key press events. The default value of ShowEditor is False.

Note:	A False ShowEditor value does not equate to a True ReadOnly value since users can change combo box text by means of the dropdown window.


TdxBarTreeViewCombo.ShowImageInEdit

TdxBarTreeViewCombo

Specifies whether to display an image within a treeview editor.

property ShowImageInEdit: Boolean;

Description

Each dropdown treeview node has an appropriate image that is displayed when that node is selected.  Set the ShowImageInEdit property to True to display this image within an editor.  If this property is set to False, only text is displayed.  The default value for the ShowImageInEdit property is True.

	The ShowImageInEdit property is set to True.
	The ShowImageInEdit property is set to False.


TdxBarTreeViewCombo.ShowLines

TdxBarTreeViewCombo            See Also

Specifies whether to display lines between parent and child nodes.

property ShowLines: Boolean;

Description

If True, lines between parent and linked child nodes are displayed.  Set ShowLines to False to prevent the drawing of lines.

	The ShowLines property is set to True.
	The ShowLines property is set to False.


TdxBarTreeViewCombo.ShowRoot

TdxBarTreeViewCombo            See Also

Specifies whether to draw link lines between root nodes.

property ShowRoot: Boolean;

Description

ShowRoot is False by default and root nodes appear one under another without link lines between them.  Set ShowRoot to True to draw lines between root nodes.

	The ShowRoot property is set to True.
	The ShowRoot property is set to False.


TdxBarTreeViewCombo.SortType

TdxBarTreeViewCombo

Specifies whether tree nodes are sorted.

property SortType: TSortType;

Description

Use this property to set sorting behavior of dropdown tree nodes.  This property is similar to the TTreeView SortType property.


TdxBarTreeViewCombo.StateImages

TdxBarTreeViewCombo

Specifies the images that appears to the left of node text.

property StateImages: TImageList;

for Delphi 4™

property StateImages: TCustomImageList;

Description

Use this property to set or access an image list with images displayed to the left of node text.  The index associated with the image item is stored in the StateIndex property of a dropdown tree item.  The following code sets the state image for the selected node:

dxBarTreeViewCombo1.SelectedItem.StateIndex := 1;


TdxBarTreeViewCombo.DoSelectedNodeChanged

TdxBarTreeViewCombo            See Also

procedure DoSelectedNodeChanged; virtual;

Description

Called when changing the selected dropdown tree node.  The DoSelectedNodeChanged sets the combo box Text property to the text of the selected node.  Override this method to perform special actions when changing the selected node without writing an OnChange event handler.


TdxBarTreeViewCombo.DropDown

TdxBarTreeViewCombo            See Also

Activates the dropdown window.

procedure DropDown(X, Y: Integer); override;

Description

This method prepares the tree view and displays a dropdown window.  The X and Y parameters specify the position of the dropdown window’s left top corner.


TdxBarTreeViewCombo.Create

TdxBarTreeViewCombo            See Also

Creates a TdxBarTreeViewCombo instance.

constructor Create(AOwner: TComponent); override;

Description

This method is used to create and initialize a TdxBarTreeViewCombo type object. The Create method initializes the dropdown tree view after the inherited constructor has been called.  Override this method to perform additional actions on TdxBarTreeViewCombo creation; e.g. allocate additional memory.


TdxBarTreeViewCombo.Destroy

TdxBarTreeViewCombo          See Also

destructor Destroy; override;

Description

Destroys the TdxBarTreeViewCombo object and the dropdown tree.  Override this method to perform additional actions on TdxBarTreeViewCombo destroy; e.g. release memory allocated during TdxBarTreeViewCombo creation.


TdxBarTreeViewCombo.DoClick

TdxBarTreeViewCombo            See Also

Activates a dialog to navigate tree view nodes.

procedure DoClick; override;

Description

This method is called when the DockingStyle of the parent bar object is dsRight or dsLeft.  In this instance, the TdxBarTreeViewCombo appears as a toolbar button.  If the OnClick event handler is not assigned, clicking the button activates a dialog.


TdxBarTreeViewCombo.OnExpanded

TdxBarTreeViewCombo            See Also

property OnExpanded: TTVExpandedEvent;

Description

This event occurs after a dropdown tree node has been expanded.  This event is similar to the TTreeView OnExpanded event.


TdxBarTreeViewCombo.OnExpanding

TdxBarTreeViewCombo            See Also

property OnExpanding: TTVExpandingEvent;

Description

This event occurs before a dropdown tree node has been expanded.  This event is similar to the TTreeView OnExpanding event.


TdxBarTreeViewCombo.OnCanSelectNode

TdxBarTreeViewCombo

Generated before setting the selected node.

type

TdxBarTreeViewComboCanSelectNodeEvent = procedure(Sender: TdxBarTreeViewCombo; Node: TTreeNode; var CanSelect: Boolean) of object;

property OnCanSelectNode : TdxBarTreeViewComboCanSelectNodeEvent;

Description

This event occurs when the SelectedNode property is about to change.  Write an OnCanSelectNode event handler to check if a node can be selected.  The Node parameter specifies the dropdown tree node.  Set CanSelect to False to prevent nodes from being selected.  For example, the following code disables root node selection:

if Node.Level = 0 then CanSelect := False;


TdxBarTreeViewCombo.OnChanging

TdxBarTreeViewCombo

property OnChanging: TTVChangingEvent;

Description

This event occurs each time the selected node is changed.  This event is generated while navigating through the dropdown tree nodes.


TdxBarTreeViewCombo.OnCollapsed

TdxBarTreeViewCombo

property OnCollapsed: TTVExpandedEvent;

Description

This event occurs after a dropdown tree node collapses.  This event is similar to the TTreeView OnCollapse event.


TdxBarTreeViewCombo.OnCollapsing

TdxBarTreeViewCombo

property OnCollapsing: TTVCollapsingEvent;

Description

This event occurs before a dropdown tree node collapses.  This event is similar to the TTreeView OnCollapsing event.


TdxBarTreeViewCombo.OnCompare

TdxBarTreeViewCombo

property OnCompare: TTVCompareEvent;

Description

This event is similar to the TTreeView OnCompare event.  It occurs when two dropdown tree nodes are compared during node sort operations in a dropdown tree view.  Write an OnCompare event handler to customize node sort order.


TdxBarTreeViewCombo.OnGetImageIndex

TdxBarTreeViewCombo

property OnGetImageIndex: TTVExpandedEvent;

Description

Occurs when a tree view searches the node ImageIndex.  This event is similar to the TTreeView OnGetImageIndex event.  Write an OnGetImageIndex event handler to change the node ImageIndex before drawing the image.


TdxBarTreeViewCombo.OnGetSelectedIndex

TdxBarTreeViewCombo

property OnGetSelectedIndex: TTVExpandedEvent;

Description

Occurs when a tree view searches the node SelectedIndex.  This event is similar to the TTreeView OnGetSelectedIndex event.  Write an OnGetSelectedIndex event handler to change a node SelectedIndex before drawing the image.


TdxBarTreeViewCombo.OnTreeViewChange

TdxBarTreeViewCombo

Occurs when tree node selections change.

property OnTreeViewChange: TTVChangedEvent;

Description

This event occurs if a dropdown window is active.  If a selection has changed from one tree node to another, the OnTreeviewChange event is generated.  This event corresponds to the TTreeView OnChange event.  Unlike the TTreeView OnChange event, the TdxBarTreeViewCombo OnChange is generated after changes are made in the combo box editor.


TdxBarDateNavigator

Hierarchy

Provides date selection in a TdxBarDateCombo.

Unit

dxBarExtItems

TdxBarCustomCalendar = class(TCustomControl);

TdxBarDateNavigator = class(TdxBarCustomCalendar);

Description

This class represents a dropdown calendar.  The calendar appears in the dropdown window of the TdxBarDateCombo.  The TdxBarDateNavigator class is used internally.


Hierarchy

TCustomControl

     |


TdxBarTreeView

Hierarchy          Properties            See Also

Represents a tree view in the dropdown window.

Unit

dxBarExtItems

TdxBarTreeView = class(TCustomTreeView);

Description

This class is used to represent a tree view in the dropdown window of TdxBarTreeViewCombo.  TdxBarTreeView derives the TCustomTreeView methods and properties. It provides the proper tree view interface for the dropdown tree.


Hierarchy

TCustomTreeView

     |


TdxBarTreeView Properties

TdxBarTreeView

TdxBarTreeView

Combo

Items


TdxBarTreeView.Combo

TdxBarTreeView

Provides access to the tree view combo item that owns this tree view.

property Combo: TdxBarTreeViewCombo;

Description

Use the Combo property to access the tree view combo item whose TreeView property is represented by this TdxBarTreeView object.  This is useful if you obtain a reference to the tree view object (for instance, in an event handler) and need to access the owning item.

This property value is set automatically by the tree view combo item object when it initializes its tree view control.


TdxBarTreeView.Items

TdxBarTreeView

Specifies tree view items.

property Items: TTreeNodes;

Description

This property is similar to the Items property of the TTreeView.  The dropdown tree items are the same as those of the standard tree view, and thus the same methods are applicable.


TdxBarTreeViewComboControl

Hierarchy          Properties           Methods

Represents an item of the TdxBarTreeViewCombo type on the screen.

Unit

dxBarExtItems

TdxBarTreeViewComboControl = class(TCustomdxBarComboControl);

Description

This item control is used to represent an item of the TdxBarTreeViewCombo type on the screen.


Hierarchy

TObject

     |

TdxBarItemControl

     |

TdxBarWinControl

     |

TdxBarEditControl

     |

TCustomdxBarComboControl

     |


TdxBarTreeViewComboControl Properties

TdxBarTreeViewComboControl               Legend

TdxBarTreeViewComboControl

Item

Derived from TCustomdxBarComboControl

DropDownButtonRect

DropDownWindow

DroppedDown

Derived from TdxBarEditControl

 	CaptionWidth

 	MaxLength

 	ReadOnly

 	ShowCaption

Derived from TdxBarWinControl

Handle

Focused

Text

WindowRect

Derived from TdxBarItemControl

BarManager

 	Caption

 	Enabled

 	Glyph

HasWindow

 	Height

 	Hint

IsActive

IsSelected

 	ImageIndex

 	Images

ItemLink

Parent

 	Pressed

 	ShortCut

 	Width


TdxBarTreeViewComboControl Methods

TdxBarTreeViewComboControl               Legend

In TdxBarTreeViewComboControl

GetHeight

Derived from TCustomdxBarComboControl

ControlInactivate

Derived from TdxBarEditControl

WidthChanged

Derived from TdxBarWinControl

CanClicked

ControlClick

IsDestroyOnClick

WndProc

Derived from TdxBarItemControl

BeginGroupChanged

CaptionChanged

Click

ControlActivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged


TdxBarTreeViewComboControl.Item

TdxBarTreeViewComboControl            See Also

Specifies an underlying item.

property Item: TdxBarTreeViewCombo;

Description

This property returns the Item to which a given control is linked.  The link between the item and item controls is described by the TdxBarItemLink object.

ReadOnly Property


TdxBarTreeViewComboControl.GetHeight

TdxBarTreeViewComboControl

Returns the height of a TdxBarTreeViewComboControl.

function GetHeight: Integer; override;

Description

This function returns the height of the item control according to image size in the StateImages and Images properties.


TdxBarImageComboControl

Hierarchy           Properties          Methods

Represents the TdxBarImageCombo item on screen.

Unit

dxBarExtItems

TdxBarImageComboControl = class(TdxBarComboControl);

Description

This item control is used to represent the TdxBarImageCombo item on screen.


Hierarchy

TObject

     |

TdxBarItemControl

     |

TdxBarWinControl

     |

TdxBarEditControl

     |

TCustomdxBarComboControl

     |

TdxBarComboControl

     |


TdxBarImageComboControl Properties

TdxBarImageComboControl               Legend

Derived from TdxBarComboControl

 	ItemIndex

Item

 	Items

LocalItemIndex

 	Sorted

Derived from TCustomdxBarComboControl

DropDownButtonRect

DropDownWindow

DroppedDown

Derived from TdxBarEditControl

 	CaptionWidth

 	MaxLength

 	ReadOnly

 	ShowCaption

Derived from TdxBarWinControl

Handle

Focused

Text

WindowRect

Derived from TdxBarItemControl

BarManager

 	Caption

 	Enabled

 	Glyph

HasWindow

 	Height

 	Hint

IsActive

IsSelected

 	ImageIndex

 	Images

ItemLink

Parent

 	Pressed

 	ShortCut

 	Width


TdxBarImageComboControl Methods

TdxBarImageComboControl               Legend

TdxBarImageComboControl

GetHeight

ImagesChanged

Derived from TCustomdxBarComboControl

ControlInactivate

Derived from TdxBarEditControl

WidthChanged

Derived from TdxBarWinControl

CanClicked

ControlClick

IsDestroyOnClick

WndProc

Derived from TdxBarItemControl

BeginGroupChanged

CaptionChanged

Click

ControlActivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged


TdxBarImageComboControl.GetHeight

TdxBarImageComboControl

Returns the height of the item control.

function GetHeight: Integer; override;

Description

On calculating item control height, GetHeight takes into account the height of pictures, specified by the Images property, to calculate the correct value of the item control height.


TdxBarImageComboControl.ImagesChanged

TdxBarImageComboControl            See Also

procedure ImagesChanged; virtual;

Description

This method is called when the Images property of the underlying item is changed.  The ImagesChanged calls the RepaintBar method of the parent bar control to refresh images on the screen.


TdxBarStatic

Hierarchy           Properties          Methods              Events          Example

TdxBarStatic represents static text on toolbars.

Unit

dxBarExtItems

TdxBarStatic = class(TdxBarItem);

Description

TdxBarStatic type item’s intent is to enable users to place any static text on toolbars.  Such items can be used as captions for any toolbar object.  This item cannot be selected and has no accelerator key.


Hierarchy

TComponent

     |

TdxBarItem

     |


TdxBarStatic Properties

TdxBarStatic               Legend

In TdxBarStatic

Alignment

AllowClick

BorderStyle

Height

LeftIndent

RightIndent

ShowCaption

Width

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

UnclickingAfterDoing

Visible

VisibleForUser


TdxBarStatic Methods

TdxBarStatic               Legend

TdxBarStatic

CanClicked

HasAccel

Derived form TdxBarItem

ActionChange

BarManagerChanged

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarStatic Events

TdxBarStatic               Legend

Derived form TdxBarItem

OnClick

OnCreate

OnDestroy


TdxBarStatic.CanClicked

TdxBarStatic            See Also

Determines whether the TdxBarStatic item responds to mouse clicks.

function CanClicked: Boolean; override;

Description

This function always returns the value that specifies whether TdxBarStatic processes mouse click events: If True, an OnClick event is generated.  Use the AllowClick property to disable or enable mouse click processing.


TdxBarStatic.HasAccel

TdxBarStatic            See Also

Determines whether the TdxBarStatic item has an accelerator key.

function HasAccel(AItemLink: TdxBarItemLink): Boolean; override;

Description

This function always returns False for this class.  TdxBarStatic items do not include accelerator keys.


TdxBarStatic.AllowClick

TdxBarStatic            See Also

Specifies whether the static control processes mouse click events.

property AllowClick: Boolean;

Description

Use the AllowClick property to disable or enable mouse click processing.  Set this property value to True, if an OnClick event is necessary within your application.  The default value for this property is False.


TdxBarStatic.Alignment

TdxBarStatic

Specifies the manner in which text is aligned within a static control.

property Alignment: TAlignment;

Description

Use the Alignment property to specify the horizontal placement of a text string within a static conttrol.  Text can be aligned either to the right, left or centered.

Value	Description
taLeftJustify	Text is left justified: text line begins at the left edge of a control.
taCenter	Text is centered within a control.
taRightJustify	Text is right justified: text line ends at the right edge of a control.


TdxBarStatic.BorderStyle

TdxBarStatic

Determines the appearance style of static control borders.

type

  TdxBarStaticBorderStyle = (sbsNone, sbsLowered, sbsRaised, sbsEtched, sbsBump);

property BorderStyle: TdxBarStaticBorderStyle;

Description

The BorderStyle property is used to specify the border style of a static control within a toolbar.  Available border styles include:

Value	Description	Example
sbsNone	No border.
sbsLowered	Lowered border.
sbsRaised	Raised border.
sbsEtched	Groove border.
sbsBump	Raized bevel border.

The default value of the border style is sbsNone.


TdxBarStatic.Height

TdxBarStatic            See Also

Specifies the vertical size of a static control in pixels.

property Height: Integer;

Description

Use the Height property to read or change static control height within a toolbar.  A control is centered vertically within a toolbar.  If the Height property is set to 0, the height of a control is set automaticaly to fully place it within a tollbar row.  The default value for this property is 0.


TdxBarStatic.LeftIndent

TdxBarStatic            See Also

Determines left indentation in pixels.

property LeftIndent: Integer;

Description

Use the LeftIndent property to determine the indentation on the left side of a control.  When you set this property, the Width property value does not change, but the left side of the control moves to the right.  The default value for this property is 0.

	The LeftIndent property is set to 0.
	The LeftIndent property is set to 5.
	The LeftIndent property is set to 10.


TdxBarStatic.RightIndent

TdxBarStatic            See Also

Determines right indentation in pixels.

property RightIndent: Integer;

Description

Use the RightIndent property to determine the indentation on the right side of a control.  When you set this property, the Width property value does not change, but the right side of the control moves to the left.  The default value for this property is 0.

	The RightIndent property is set to 0.
	The RightIndent property is set to 5.
	The RightIndent property is set to 10.


TdxBarStatic.ShowCaption

TdxBarStatic            See Also

Specifies whether a static control caption is displayed.

property ShowCaption: Boolean;

Description

Set the ShowCaption property to False to hide the static control caption.  The default value for this property is True.

	The ShowCaption property is set to True.
	The ShowCaption property is set to False.


TdxBarStatic.Width

TdxBarStatic            See Also

Specifies the horizontal size of a static control in pixels.

property Width: Integer;

Description

Use the Width property to read or change the width of a static control within a toolbar.  If the Width property is set to 0, control width is set automaticaly to fully display the Caption property value.  The default value for this property is 0.


TdxBarStaticControl

Hierarchy          Properties           Methods            See Also

Unit

dxBarExtItems

TdxBarStaticControl = class(TdxBarItemControl);

Description

This control represents the TdxBarStatic type item on screen.


Hierarchy

TObject

     |

TdxBarItemControl

     |


TdxBarStaticControl Properties

TdxBarStaticControl

TdxBarStaticControl

Item

Derived form TdxBarItemControl

BarManager

 	Caption

 	Enabled

 	Glyph

HasWindow

 	Height

 	Hint

IsActive

IsSelected

 	ImageIndex

 	Images

ItemLink

Parent

 	Pressed

 	ShortCut

 	Width


TdxBarStaticControl Methods

TdxBarStaticControl               Legend

TdxBarStaticControl

CanClicked

GetHeight

GetWidth

IsDestroyOnClick

Derived form TdxBarItemControl

BeginGroupChanged

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged


TdxBarStaticControl.Item

TdxBarStaticControl            See Also

Determines the underlying item.

property Item: TdxBarStatic;

Description

This property specifies the TdxBarStatic item, which is represented on the screen by the item control of the TdxBarStaticControl type.  The link between the item and item control is described by the TdxBarItemLink object.  The item and item link properties are used to create the TdxBarStaticControl item control.

ReadOnly Property


TdxBarStaticControl.CanClicked

TdxBarStaticControl            See Also

Specifies whether an item control responds to mouse clicks.

function CanClicked: Boolean; override;

Description

For this class, CanClicked always returns False.  The control does not respond to mouse clicks.


TdxBarStaticControl.GetHeight

TdxBarStaticControl            See Also

Returns item control height.

function GetHeight: Integer; override;

Description

This method is used to get item control height.  TdxBarStaticControl height depends on DockingStyle property of the parent bar.


TdxBarStaticControl.GetWidth

TdxBarStaticControl            See Also

Returns item control width.

function GetWidth: Integer; override;

Description

This method is used to get item control width.  TdxBarStaticControl width depends on DockingStyle property of the parent bar.


TdxBarStaticControl.IsDestroyOnClick

TdxBarStaticControl            See Also

Determines whether the parent bar control loses focus when clicking a given item control.

function IsDestroyOnClick: Boolean; override;

Description

IsDestroyOnClick returns False for this class.  If the parent bar control has focus, it will not lose it after clicking the TdxBarStaticControl item control.


TdxBarLargeButton

Hierarchy          Properties           Methods            Events          See Also          Example

This class represents large toolbar buttons.

Unit

dxBarExtItems

TdxBarLargeButton = class(TdxBarButton);

Description

Items of the TdxBarLargeButton type provide an ‘advanced’ toolbar button interface.  Also TdxBarLargeButton provides some new capabilities in order to create interfaces introduced in MS Internet Explorer(tm).


Hierarchy

TComponent

     |

TdxBarItem

     |

TdxBarButton

     |


TdxBarLargeButton Properties

TdxBarLargeButton               Legend

TdxBarLargeButton

AutoGrayScale

GlyphLayout

Height

HotGlyph

HotImageIndex

LargeGlyph

LargeImageIndex

ShowCaption

SyncImageIndex

Width

Derived from TdxBarButton

AllowAllUp

ButtonStyle

CloseSubMenuOnClick

GroupIndex

Down

DropDownEnabled

DropDownMenu

Lowered

PaintStyle

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

UnclickingAfterDoing

Visible

VisibleForUser


TdxBarLargeButton Methods

TdxBarLargeButton               Legend

TdxBarLargeButton

GlyphLayoutChanged

HeightChanged

ShowCaptionChanged

WidthChanged

Derived from TdxBarButton

ButtonStyleChanged

CanChangePaintStyle

DownChanged

DoDropDown

DropDownEnabledChanged

PaintStyleChanged

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarLargeButton Events

TdxBarLargeButton               Legend

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TdxBarLargeButton.AutoGrayScale

TdxBarLargeButton            See Also

Allows you to generate a highlighting effect on button images.

property AutoGrayScale: Boolean;

Description

If AutoGrayScale is True, button images are initially displayed as a black-and-white image, but when the mouse points to the button, the black-and-white image is colored.


TdxBarLargeButton.GlyphLayout

TdxBarLargeButton

Determines the glyph layout on a button.

type

  TdxBarGlyphLayout = {glLeft, glRight, glTop, glBottom};

property GlyphLayout: TdxBarGlyphLayout;

Description

Use this property to set or get the glyph layout on a button.  There are four different layouts:

Value	Description	Example
glBottom	Glyph positioned under text.
glLeft	Glyph positioned to the left of the text.
glRight	Glyph positioned to the right of the text.
glTop	Glyph positioned above the text.

If the large button belongs to a sub menu or sub item, the image is always drawn to the left of the caption.


TdxBarLargeButton.Height

TdxBarLargeButton            See Also

Specifies button height.

property Height: Integer;

Description

Use this property to set or access the vertical size of TdxBarLargeButton.  The default Height value is 0.  In this instance, height of the linked item control will be calculated automatically.

Set the Height property to a value greater than 0 to specify precise height of a button.  In this instance, the caption or glyph will be clipped if the height is greater than the Height property value.  If the TdxBarLargeButton Height property changes, the HeightChanged method is called.


TdxBarLargeButton.HotGlyph

TdxBarLargeButton            See Also

Specifies the glyph that is drawn on the button when the button is selected.

property HotGlyph: TBitmap;

Description

The hot glyph is an image that appears on the button surface when the mouse pointer is over the button.  The large image on the button is replaced by the hot image when the mouse points to the button.  If the button doesn’t have an associated large image, the hot image is drawn on the button.

Note:	Neither the hot image nor large image is drawn in the customizing popup or when the button belongs to a sub menu control.  An image from the Image list is used instead.


TdxBarLargeButton.HotImageIndex

TdxBarLargeButton            See Also

Specifies the index of an associated image in the HotImages list.

property HotImageIndex: Integer;

Description

Set the HotImageIndex greater than  -1 to associate an image from the TdxBarManager HotImages list.  The hot image appears on the button surface when the mouse points to the button.  If the button doesn’t have an associated large image, the hot image is drawn on the button surface even when the mouse pointer is outside of the button area.


TdxBarLargeButton.LargeGlyph

TdxBarLargeButton            See Also

Specifies the glyph drawn on a button.

property LargeGlyph: TBitmap;

Description

Large glyph is an image that appears on a button’s surface.  The large image on the button is replaced by the hot image (if the button has an associated hot image) when the mouse points to the button.

Note:	Neither the hot image nor large image is drawn in the customizing popup or when the button is in a sub menu.  An image from the Image list is used instead.


TdxBarLargeButton.LargeImageIndex

TdxBarLargeButton            See Also

Specifies the image displayed within this item’s links that are located in toolbars.

property LargeImageIndex: Integer;

Description

Large button item links can display different images depending on whether they are displayed within toolbars or sub-menus.  The image displayed when the link is within a sub-menu is specified by the ImageIndex property.  The image displayed when the link is on a toolbar is specified by the LargeImageIndex property.  This property specifies the image by its index within the source images collection.  The source collection is specified by the bar manager’s LargeImages property.

If the LargeImageIndex property value is –1, the image displayed within the link is specified by the HotImageIndex property.  If the HotImageIndex property is also set to –1, no image is displayed within link that reside on toolbars.

The default value of the LargeImageIndex property is –1.


TdxBarLargeButton.ShowCaption

TdxBarLargeButton            See Also          Example

Specifies whether the button displays a caption.

property ShowCaption: Boolean;

Description

If ShowCaption is True, then a button caption is displayed.  The layout of the caption and the button glyph is specified in the GlyphLayout property of the TdxBarLargeButton item.  Set ShowCaption to False to hide button captions.

	The ShowCaption property is set to True.
	The ShowCaption property is set to False.
Note:	ShowCaption has effect only if a sub item is located on a toolbar.


TdxBarLargeButton.Width

TdxBarLargeButton            See Also

Specifies the width of a button.

property Width: Integer;

Description

Use this property to set or access the horizontal size of a button.  The default Width value is 0.  It specifies that the width of item controls are calculated automatically.

Set the Width property greater than 0 to specify the precise width of a button.  In this instance, the caption or glyph will be clipped if its length is greater than the Width property value.  If the Width property changes, the TdxBarLargeButton WidthChanged method is called.


TdxBarLargeButton.GlyphLayoutChanged

TdxBarLargeButton            See Also

procedure GlyphLayoutChanged; virtual;

Description

This method is called every time the glyph layout changes.  This procedure calls the GlyphLayoutChanged methods of the linked item controls.  Override the GlyphLayoutChanged to perform special actions on glyph changes.


TdxBarLargeButton.HeightChanged

TdxBarLargeButton            See Also

This procedure is called on changes to button height.

procedure HeightChanged; virtual;

Description

The HeightChanged method of the TdxBarLargeButton item calls the HeightChanged methods of corresponding item controls.  Override this method to perform special actions when button height is changed.


TdxBarLargeButton.ShowCaptionChanged

TdxBarLargeButton

procedure ShowCaptionChanged; virtual;

Description

This procedure is called every time the ShowCaption property of TdxBarLargeButton is changed.  This method calls the ShowCaptionChanged method of linked item controls.  Override ShowCaptionChanged to perform special actions when changing the ShowCaption property.


TdxBarLargeButton.SyncImageIndex

TdxBarLargeButton

Specifies whether the ImageIndex property value is synchronized with the LargeImageIndex property value.

procedure SyncImageIndex; virtual;

Description

If the SyncImageIndex property value is True, changing the LargeImageIndex property results in setting the ImageIndex property to the same value.  If the SyncImageIndex property is set to False, the properties mentioned can be changed independently of each other.

Assigning values to the ImageIndex property results in setting the SyncImageIndex property to False.  Thus, further modifications of the LargeImageIndex property will not affect the ImageIndex property.

The default value of the SyncImageIndex property is True.


TdxBarLargeButton.WidthChanged

TdxBarLargeButton            See Also

This procedure is called on button width changes.

procedure WidthChanged; virtual;

Description

This method calls the WidthChanged methods of linked item controls.


TdxBarLargeButtonControl

Hierarchy          Properties           Methods            See Also

Unit

dxBarExtItems

TdxBarLargeButtonControl = class(TdxBarButtonControl);

Description

The item control of TdxBarLargeButtonControl type represents a TdxBarLargeButton item on screen.  TdxBarLargeButtonControl is responsible for TdxBarLargeButton item drawing on toolbars and sub menus.


Hierarchy

TComponent

     |

TdxBarItemControl

     |

TdxBarButtonControl

     |


TdxBarLargeButtonControl Properties

TdxBarLargeButtonControl               Legend

TdxBarLargeButtonControl

 	HotGlyph

 	LargeGlyph

Item

Derived from TdxBarButtonControl

 	ButtonStyle

 	Down

 	DropDownEnabled

 	DroppedDown

 	GroupIndex

 	PaintStyle

Derived from TdxBarItemControl

BarManager

 	Caption

 	Enabled

 	Glyph

HasWindow

 	Height

 	Hint

IsActive

IsSelected

 	ImageIndex

 	Images

ItemLink

Parent

 	Pressed

 	ShortCut

 	Width


TdxBarLargeButtonControl Methods

TdxBarLargeButtonControl               Legend

TdxBarLargeButtonControl

GlyphLayoutChanged

HeightChanged

HotGlyphChanged

LargeGlyphChanged

ShowCaptionChanged

WidthChanged

Derived from TdxBarButtonControl

ArrowWidth

ButtonStyleChanged

DoCloseUp

DoDropDown

DownChanged

DropDownEnabledChanged

GetDefaultHeight

GetDefaultWidth

PaintStyleChanged

Derived from TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged


TdxBarLargeButtonControl.HotGlyph

TdxBarLargeButtonControl            See Also

property HotGlyph: TBitmap;

Description

This property returns the hot image associated with an item.  A hot mage is an image that appears on a button’s surface when the mouse points to the button.  A hot image can be associated with the button via the TdxBarLargeButton HotGlyph or TdxBarLargeButton HotImageIndex properties.

ReadOnly Property


TdxBarLargeButtonControl.LargeGlyph

TdxBarLargeButtonControl            See Also

Specifies the large image associated with a button.

property LargeGlyph: TBitmap;

Description

This property returns the large image associated with an item.  The large image is an image that appears on a button’s surface.  The image can be associated with the button via the TdxBarLargeButton LargeGlyph or TdxBarLargeButton LargeImageIndex properties.

ReadOnly Property


TdxBarLargeButtonControl.Item

TdxBarLargeButtonControl            See Also

property Item: TdxBarLargeButton;

Description

Returns the TdxBarLargeButton type item that is represented on the screen by a given item control.  The link between the TdxBarLargeButton item and the corresponding item control is described by the TdxBarItemLink object.

Read Only Property


TdxBarLargeButtonControl.GlyphLayoutChanged

TdxBarLargeButtonControl            See Also

Called when glyph layouts change.

procedure GlyphLayoutChanged; virtual;

Description

The GlyphLayoutChanged method is called when changing the GlyphLayout underlying item property.  GlyphLayoutChanged calls the RepaintBar method of the parent bar control, which leads to item control refresh on the screen.


TdxBarLargeButtonControl.HeightChanged

TdxBarLargeButtonControl

Called on changing button height.

procedure HeightChanged; virtual;

Description

The HeightChanged method calls the RepaintBar method of the parent bar control, which leads to item control refresh on screen.


TdxBarLargeButtonControl.HotGlyphChanged

TdxBarLargeButtonControl            See Also

Called on changing the HotGlyph item property.

procedure HotGlyphChanged; virtual;

Description

The HotGlyphChanged method calls the RepaintBar method of the parent bar control, which leads to item control refresh on screen.


TdxBarLargeButtonControl.LargeGlyphChanged

TdxBarLargeButtonControl            See Also

Called on changing the LargeGlyph underlying item property.

procedure LargeGlyphChanged; virtual;

Description

The LargeGlyphChanged method calls the RepaintBar method of the parent bar control, which leads to item control refresh on screen.


TdxBarLargeButtonControl.ShowCaptionChanged

TdxBarLargeButtonControl            See Also

Called on changing the ShowCaption property of an underlying item.

procedure ShowCaptionChanged; virtual;

Description

The ShowCaptionChanged method calls the RepaintBar parent bar control method, which leads to item control refresh on screen.


TdxBarLargeButtonControl.WidthChanged

TdxBarLargeButtonControl

Called on changing button width.

procedure WidthChanged; virtual;

Description

The WidthChanged method calls the RepaintBar method of the parent bar control, which leads to item control refresh on screen.


TdxBarColorCombo.CustomColorText

TdxBarColorCombo            See Also

Specifies the custom text to appear in a combo box.

property CustomColorText: string;

Description

If the color with the specified name in the Text property is not in the list, the value of the CustomColorText property appears in the combo box editor.  The same result occurs if the selected color does not match any predefined colors.


TdxBarToolbarsListItem

Hierarchy          Properties          Methods          Events

Unit

dxBarExtItems

TdxBarToolbarsListItem = class(TCustomdxBarSubItem);

Description

This item is presents as a sub menu which contains a list of existing toolbars.  Use it to allow users to display and hide toolbars from a menu without calling the toolbar popup list.


Hierarchy

TComponent

     |

TdxBarItem

     |

TCustomdxBarSubItem

     |


TdxBarToolbarsListItem Properties

TdxBarToolbarsListItem          Legend

Derived from TCustomdxBarSubItem

BarSize

Detachable

DetachingBar

ItemLinks

ShowCaption

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

UnclickingAfterDoing

Visible

VisibleForUser


TdxBarToolbarsListItem Methods

TdxBarToolbarsListItem          Legend

Derived from TCustomdxBarSubItem

CanContainItem

DoCloseUp

DoPopup

GetDetachingBar

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarToolbarsListItem Events

TdxBarToolbarsListItem          Legend

Derived from TCustomdxBarSubItem

OnCloseUp

OnDetaching

OnPaintBar

OnPopup

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TdxBarToolbarsListItemControl

Hierarchy          Properties          Methods

TdxBarToolbarsListItemControl = class(TdxBarSubItemControl);

Description

TdxBarToolbarsListItemControl is an item control which represents TdxBarToolbarsListItem on toolbars and in sub menus.  TdxBarToolbarsListItemControl contains a list of accessible toolbars and allows a user to hide/display a toolbar on screen.


Hierarchy

TObject

     |

TdxBarItemControl

     |

TdxBarSubItemControl

     |


TdxBarToolbarsListItemControl Properties

TdxBarToolbarsListItemControl          Legend

Derived from TdxBarSubItemControl

Item

SubMenuControl

Derived from TdxBarItemControl

BarManager

 	Caption

 	Enabled

 	Glyph

HasWindow

 	Height

 	Hint

IsActive

IsSelected

 	ImageIndex

 	Images

ItemLink

Parent

 	Pressed

 	ShortCut

 	Width


TdxBarToolbarsListItemControl Methods

TdxBarToolbarsListItemControl          Legend

Derived from TdxBarSubItemControl

GlyphChanged

CanClicked

ControlClick

CreateSubMenuControl

GetDefaultHeight

GetDefaultWidth

Derived from TdxBarItemControl

BeginGroupChanged

CaptionChanged

Click

ControlActivate

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

HasHint

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged


TdxBarSpinEdit

Hierarchy          Properties          Methods          Events          See Also          Example

Used to edit integer or float variables such as years, prices, percents, etc.

Unit

dxBarExtItems

TdxBarSpinEdit = class(TdxBarEdit);

Description

Use TdxBarSpinEdit to edit integer or float variables such as years, prices, percents, etc.


Hierarchy

TObject

|

TPersistent

|

TComponent

|

TdxBarItem

|

TdxBarWindowItem

|

TdxBarEdit

|


TdxBarSpinEdit Properties

TdxBarSpinEdit          Legend

TdxBarSpinEdit

CurValue

Increment

IntCurValue

IntValue

MinValue

MaxValue

Prefix

PrefixPlace

Value

ValueType

Derived from TdxBarEdit

MaxLength

ReadOnly

ShowCaption

Width

Derived form TdxBarWindowItem

CurText

EmptyWindow

FocusedItemLink

Text

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

UnclickingAfterDoing

Visible

VisibleForUser


TdxBarSpinEdit Methods

TdxBarSpinEdit          Legend

Derived from TdxBarEdit

WidthChanged

Derived from TdxBarWindowItem

Change

CurChange

DoEnter

DoExit

KeyDown

KeyPress

KeyUp

Derived form TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarSpinEdit Events

TdxBarSpinEdit          Legend

TdxSpinEdit

OnButtonClick

Derived from TdxBarWindowItem

OnChange

OnCurChange

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TdxBarSpinEdit.CurValue

TdxBarSpinEdit          See Also          Example

Specifies the current value of a spin edit.

property CurValue: Extended;

Description

Use this property to obtain and modify the current value.


TdxBarSpinEdit.IntCurValue

TdxBarSpinEdit          See Also

Returns the current integer portion of an edited value.

property IntCurValue: Integer;

Description

Use this property to obtain or modify the integer portion of a given spin edit value.


TdxBarSpinEdit.IntValue

TdxBarSpinEdit          See Also

Returns the integer portion of a value.

property IntValue: Integer;

Description

Returns the integer portion of a value.

Note:	This property changes upon completion of an edit operation; i.e Upon pressing ENTER or exiting the spin edit.


TdxBarSpinEdit.ValueType

TdxBarSpinEdit          See Also

Determines edited value type.

type

    TdxBarSpinEditValueType = (svtInteger, svtFloat);

property ValueType: TdxBarSpinEditValueType;

Description

Use this property to specify the type of object edited in a spin editor:

svtInteger	An integer value.  Users can edit only integer values.
svtFloat	A float value.  Users can edit both integer and float values.
Note:	Changing this property from svtFloat to svtInteger truncates values of Increment, Value, MaxValue and MinValue properties to integer.


TdxBarSpinEdit.Increment

TdxBarSpinEdit          See Also          Example

Specifies the incrementing value for a spin edit.

property Increment: Extended;

Description

Use this property to set the incrementing value for a spin edit.  When a user presses the up and down edit buttons to the right of TdxBarSpinEdit, the edited value increases/decreases by the value specified for this property.


TdxBarSpinEdit.MaxValue

TdxBarSpinEdit          See Also

Specifies the maximum value that can be edited in a spin editor.

property MaxValue: Extended;

Description

Use this property to specify the maximum value that can be edited in a spin editor.


TdxBarSpinEdit.MinValue

TdxBarSpinEdit          See Also

Specifies the minimum value that can be edited in a spin editor.

property MinValue: Extended;

Description

Use this property to specify the minimum value that can be edited in a spin editor.


TdxBarSpinEdit.Value

TdxBarSpinEdit          See Also

Specifies a value displayed in a spin editor.

property Value: Extended;

Description

Use this property to get or set a value displayed in a spin editor.

Note:	This property changes when pressing ENTER or exiting a spin editor.


TdxBarSpinEdit.OnButtonClick

TdxBarSpinEdit

Occurs when a user presses edit buttons or up and down keyboard arrows to perform changes.

type

  TdxBarSpinEditButton = (sbNone, sbUp, sbDown);

  TdxBarSpinEditButtonClickEvent = procedure(Sender: TdxBarSpinEdit; Button: TdxBarSpinEditButton) of object;

property OnButtonClick: TdxBarSpinEditButtonClickEvent;

Description

Write an OnButtonClick event handler to process edit button press events based on your specific needs.  The Sender parameter specifies the TdxBarSpinEdit item whose button was pressed.  The Button parameter specifies the pressed button:

Value	Meaning
sbUp	Either the up edit button or the up arrow key is pressed.
sbDown	Either the down edit button or the down arrow key is pressed.
sbNone	The Button parameter never accepts this value.  It is for internal use only.


TdxBarSpinEdit.Prefix

TdxBarSpinEdit          See Also

Specifies text to be displayed in a spin editor.

property Prefix: string;

Description

Use this property to inform a user about measurement units for an edited value.  Use the PrefixPlace property to set text position relative to the edited value.


TdxBarSpinEdit.PrefixPlace

TdxBarSpinEdit          See Also

Defines the prefix relative to a spin editor’s value.

type

  TdxBarSpinEditPrefixPlace = (ppStart, ppEnd);

property PrefixPlace: TdxBarSpinEditPrefixPlace;

Description

Use the PrefixPlace property to define the position of text specified by the Prefix property within a spin editor.  The following values are available:

Value	Meaning
ppStart	Prefix is located before the edited value, "$ 2.5".
ppEnd	Prefix is located after the edited value, "25.5 %".


TdxBarSpinEdit Example

This example demonstrates how you can change the incremental step against the range of an edited value.

// The ValueType property should be set to svtFloat.

// The OnCurChange event handler.

procedure TForm1.dxBarSpinEdit1CurChange(Sender: TObject);

begin

  with Sender as TdxBarSpinEdit do

    if (CurValue > 3) and (CurValue < 5 ) then

      Increment := 0.01

    else

      Increment := 0.1;

end;


TdxBarSpinEditControl

Hierarchy          Properties          Methods

TdxBarSpinEditControl = class(TdxBarSpinEdit);

Description

The TdxBarSpinEditControl item control represents the TdxBarSpinEdit item on toolbars and sub menus.  TdxBarSpinEditControl contains both an edit field and edit buttons for the spin edit control.


Hierarchy

TObject

|

TdxBarItemControl

|

TdxBarWinControl

|

TdxBarEditControl


TdxBarSpinEditControl Properties

TdxBarSpinEditControl          Legend

TdxBarSpinEditControl

ActiveButton

ButtonPressed

 	ButtonsRect

Item

Derived from TdxBarEditControl

 	CaptionWidth

Item

 	MaxLength

 	ReadOnly

 	ShowCaption

Derived from TdxBarWinControl

Handle

Focused

Text

WindowRect

Derived from TdxBarItemControl

BarManager

 	Caption

 	Enabled

 	Glyph

HasWindow

 	Height

 	Hint

IsActive

IsSelected

 	ImageIndex

 	Images

ItemLink

Parent

 	Pressed

 	ShortCut

 	Width


TdxBarSpinEditControl Methods

TdxBarSpinEditControl          Legend

Derived from TdxBarEditControl

WidthChanged

Derived from TdxBarWinControl

CanClicked

ControlClick

IsDestroyOnClick

WndProc

Derived from TdxBarItemControl

BeginGroupChanged

CaptionChanged

Click

ControlActivate

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged


TdxBarSpinEditControl.ActiveButton

TdxBarSpinEditControl          See Also

type

    TdxBarSpinEditButton = (sbNone, sbUp, sbDown);

property ActiveButton: TdxBarSpinEditButton;

Description

Used internally.  Specifies the active edit button for a spin editor.  This property can assume the following values:

Value	Meaning
sbUp	The up edit button is active.
sbDown	The down edit button is active.
sbNone	No active button exists.


TdxBarSpinEditControl.ButtonPressed

TdxBarSpinEditControl          See Also

Specifies whether the edit button of a spin editor is pressed.

property ButtonPressed: Boolean;

Description

Used internally.  Specifies whether the edit button of a spin editor is pressed.


TdxBarSpinEditControl.ButtonsRect

TdxBarSpinEditControl

Returns a rectangle, in parent control coordinates, occupied by spin editor’s buttons.

property ButtonsRect: TRect;

Description

This property is used internally.  It returns a rectangle, in parent control coordinates, occupied by spin editor’s buttons.

ReadOnly Property


TdxBarSpinEditControl.Item

TdxBarSpinEditControl          See Also

Specifies an underlying item.

property Item: TdxBarSpinEdit;

Description

This property returns a TdxBarSpinEdit item to which a given item control is linked.  The link between items and item controls is defined by TdxBarItemLink.

ReadOnly Property


Unit dxBarDBNav
dxBarDBNav Unit

Components

TdxBarDBNavigator

Objects

TdxBarDBCheckLinks

TdxBarDBCheckLink

TdxBarDBNavButton

TdxBarDBNavigatorList

Variables

dxBarDBNavigatorList

Types

TdxBarDBEnableType

TdxBarDBNavButtonType


TdxBarDBNavigator

Hierarchy          Properties           Methods            See Also                Example

TdxBarDBNavigator is used to navigate data in a dataset and perform operations on data including events like insert and post via toolbar buttons.

Unit

dxBarDBNav

TdxBarDBNavigator = class(TComponent);

Description

TdxBarDBNavigator is similar to the Delphi TDBNavigator object.  TdxBarDBNavigator button type, placement, and look are determined by an application.  In addition, you may create links between TdxBarManager items and a dataset’s state using specific conditions.

Note:	TdxBarManager can work with only one TdxBarDBNavigator object.


Hierarchy

TComponent

|


TdxBarDBNavigator Properties

TdxBarDBNavigator               Legend

TdxBarDBNavigator

BarManager

Buttons

CategoryName

ConfirmDelete

DataSource

DBCheckLinks

VisibleButtons


TdxBarDBNavigator Methods

TdxBarDBNavigator               Legend

TxBarDBNavigator

Create

Destroy


TdxBarDBNavigator.Buttons

TdxBarDBNavigator            See Also

Contains a list of available buttons.

property Buttons: array[TdxBarDBNavButtonType] of TdxBarDBNavButton;

Description

This property determines the available TdxBarDBNavigator buttons, that is, the buttons that appear in the item list in the customization form.


TdxBarDBNavigator.BarManager

TdxBarDBNavigator            See Also

property BarManager: TdxBarManager;

Description

Specifies the TdxBarManager to which a given TdxBarDBNavigator belongs.  TdxBarManager supports one TdxBarDBNavigator object only.


TdxBarDBNavigator.CategoryName

TdxBarDBNavigator            See Also

Defines the TdxBarManager category to which TdxBarDBNavigator buttons belong.

property CategoryName: string;

Description

The CategoryName specifies the name of the default TdxBarManager category for TdxBarDBNavigator buttons.


TdxBarDBNavigator.ConfirmDelete

TdxBarDBNavigator

Determines whether to warn users before record deletion.

property ConfirmDelete: Boolean;

Description

If ConfirmDelete equals True, pressing the TdxBarDBNavigator Delete button activates a confirmation message box; Else the record is deleted without any user notification.


TdxBarDBNavigator.DataSource

TdxBarDBNavigator

Refers to a TDataSource object accessed by TdxBarDBNavigator.

property DataSource: TDataSource;

Description

DataSource connects TdxBarDBNavigator to a dataset.  Once set, TdxBarDBNavigator buttons can work directly with dataset records.


TdxBarDBNavigator.DBCheckLinks

TdxBarDBNavigator            See Also

Contains the list of item links between items and a dataset’s state.

property DBCheckLinks: TdxBarDBCheckLinks;

Description

If there is a link between an item and a dataset’s state, the item Enabled property is changed to the dataset state accordingly.  One link is defined by the TdxBarDBCheckLink object; the TdxBarDBCheckLinks object contains a list of these links.


TdxBarDBNavigator.VisibleButtons

TdxBarDBNavigator            See Also                Example

Defines the button collection shown in the item list of the customization form.

type

  TdxBarDBNavButtonTypes = set of TdxBarDBNavButtonType;

property VisibleButtons : TdxBarDBNavButtonTypes;

Description

This property contains a set of button types created in a TdxBarManager category.  The visible button items can be placed on any TdxBarManager toolbar or TdxBarPopupMenu.  You can move the button to any TdxBarManager category.  Use the TdxBarManager CategoryItemsVisible to set the visibility of different buttons to restrict user actions on data.  You would make use of this when, for instance, some users can add, delete, and edit records; while others can only read data.


TdxBarDBNavigator.Create

TdxBarDBNavigator            See Also

Creates a TdxBarDBNavigator object.

constructor Create(AOwner: TComponent); override;

Description

This method creates and initializes an instance of the TdxBarDBNavigator type.  AOwner specifies the form that owns a given TdxBarDBNavigator.  The Create method sets the BarManager property to the TdxBarManager of a form, loads the default value for the CategoryName from resources and adds the given TdxBarDBNavigator object to the TdxBarDBNavigator list.


TdxBarDBNavigator.Destroy

TdxBarDBNavigator            See Also

Destroys a TdxBarDBNavigator instance.

destructor Destroy; override;

Description

Before calling the inherited method, the Destroy method frees the VisibleButtons list and deletes a given TdxBarDBNavigator object from the TdxBarDBNavigator list.


TdxBarDBCheckLink

Hierarchy          Properties

Defines the link between the item Enabled property and a dataset’s state.

Unit

dxBarDBNav

TdxBarDBCheckLink = class(TCollectionItem);

Description

Use this object to establish a link between a dataset’s state and the Enable property of the control on the screen.  For example, some controls can be disabled on changes to a dataset from dsEdit to dsBrowse.  The TdxBarDBCheckLink object provides just this link.

Note:	You may never need to use objects of this class directly.


Hierarchy

TCollectionItem

|


TdxBarDBCheckLink Properties

TdxBarDBCheckLink               Legend

TdxBarDBCheckLink

Item

EnableTypes


TdxBarDBCheckLink.Item

TdxBarDBCheckLink

Specifies the item whose Enabled property is changed in accordance with changes to a dataset’s state.

property Item: TdxBarItem;

Description

Use this property to refer to the item whose Enable property changes according to a dataset’s state.  The Enabled property of all item controls corresponding to this item change when a specified dataset’s state changes.  For example, your program can make a font combo box disabled when a dataset’s state changes from dsEdit to dsBrowse.


TdxBarDBCheckLink.EnableTypes

TdxBarDBCheckLink

Determines the conditions that affect the item Enabled property.

property EnableTypes: TdxBarDBEnableTypes;

Description

EnabledTypes defines the type of link between an item and a dataset’s state.  The item Enabled property is equal to True if a dataset is active and all corresponding EnableTypes conditions are equal to True, otherwise it is False.


TdxBarDBCheckLinks

Hierarchy          Properties           Methods            See Also

The TdxBarDBCheckLinks object contains the TdxBarDBCheckLinks list managed by TdxBarDBNavigator.

Unit

dxBarDBNav

TdxBarDBCheckLinks = class(TCollection);

Description

This list stores information about all links between items and a dataset’s state.

Note:	You may never need to use this class.


Hierarchy

TCollection

|


TdxBarDBCheckLinks Properties

TdxBarDBCheckLinks               Legend

TdxBarDBCheckLinks

Items


TdxBarDBCheckLinks Methods

TdxBarDBCheckLinks               Legend

TdxBarDBCheckLinks

Add

GetOwner

RemoveItem


TdxBarDBCheckLinks.Items

TdxBarDBCheckLinks            See Also

Determines an array of links between items and dataset state.

property Items[Index: Integer]: TdxBarDBCheckLink;

Description

This property returns the link of a TdxBarDBCheckLink type stored in a given object by Index.  The index of the first TdxBarDBCheckLink is 0.

ReadOnly Property


TdxBarDBCheckLinks.GetOwner

TdxBarDBCheckLinks

function GetOwner: TPersistent; override;

Description

Returns the TdxBarDBNavigator object that owns a TdxBarDBCheckLink instance.  This method is only available in Delphi 3™ or higher.


TdxBarDBCheckLinks.RemoveItem

TdxBarDBCheckLinks

Removes a link between an item and dataset state from the list.

procedure RemoveItem(Item: TdxBarItem);

Description

This method removes the link between an item and dataset state from the TdxBarDBCheckLinks list. The Item parameter specifies the item.


TdxBarDBCheckLinks.Add

TdxBarDBCheckLinks            See Also

This method adds a new link to the TdxBarDBCheckLink links list.

function Add: TdxBarDBCheckLink;

Description

The TdxBarDBCheckLink object describes one link between dataset state and the item Enabled property.  The function adds a new blank link to the list and returns it.  The new link is placed at the end of the links list.


TdxBarDBNavButton

Hierarchy          Properties           Methods          Events

This class represents a TdxBarDBNavigator button.

Unit

dxBarDBNav

TdxBarDBNavButton = class(TdxBarButton);

Description

TdxBarDBNavButton is derived from the TdxBarButton.  The TdxBarDBNavigator button provides several properties specific to data-aware components.  An item of the TdxBarDBNavButton type performs specific actions on datasets such as navigating through the dataset records, editing records, data refresh, etc.


Hierarchy

TComponent

|

TdxBarItem

|

TdxBarButton

|


TdxBarDBNavButton Properties

TdxBarDBNavButton               Legend

TdxBarDBNavButton

BarDBNavigator

NavButton

Derived from TdxBarButton

AllowAllUp

ButtonStyle

CloseSubMenuOnClick

GroupIndex

Down

DropDownEnabled

DropDownMenu

Lowered

PaintStyle

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

UnclickingAfterDoing

Visible

VisibleForUser


TdxBarDBNavButton Event
TdxBarDBNavButton Events

TdxBarDBNavButton               Legend

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TdxBarDBNavButton Methods

TdxBarDBNavButton               Legend

TdxBarDBNavButton

Destroy

DoClick

Derived from TdxBarButton

ButtonStyleChanged

CanChangePaintStyle

DownChanged

DoDropDown

DropDownEnabledChanged

PaintStyleChanged

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarDBNavButton.BarDBNavigator

TdxBarDBNavButton            See Also

Specifies the TdxBarDBNavigator to which a given button item belongs.

property BarDBNavigator: TdxBarDBNavigator;

Description

BarDBNavigator specifies the TdxBarDBNavigator managing a given button.

ReadOnly Property


TdxBarDBNavButton.NavButton

TdxBarDBNavButton            See Also

Determines button type.

property NavButton: TdxBarDBNavButtonType;

Description

This property specifies button type.  The type of a button defines the action performed on the TdxBarDBNavigator DataSource DataSet.


TdxBarDBNavButton.Destroy

TdxBarDBNavButton            See Also

Destroys an instance of the TdxBarDBNavButton type.

destructor Destroy; override;

Description

Before calling the inherited method, Destroy removes reference to itself from the TdxBarDBNavigator Buttons and VisibleButtons properties.


TdxBarDBNavButton.DoClick

TdxBarDBNavButton            See Also

Processes mouse click events.

procedure DoClick; override;

Description

After calling the inherited method, DoClick generates the OnClick event and then performs specific actions on a dataset.  Button type determines the action performed on the dataset.


TdxBarDBNavigatorList

Hierarchy          Properties           Methods            See Also

Contains a list of all TdxBarDBNavigator application objects.

Unit

dxBarDBNav

TdxBarDBNavigatorList = class (TObject);

Description

This object with the list of all TdxBarDBNavigator application objects is similar to the TdxBarManagerList containing the list of all TdxBarManager application objects.

There is a global object of the TdxBarDBNavigatorList type named dxBarDBNavigatorList.


Hierarchy

TObject


TdxBarDBNavigatorList Properties

TdxBarDBNavigatorList               Legend

TdxBarDBNavigatorList

Count

Items


TdxBarDBNavigatorList Methods

TdxBarDBNavigatorList

TdxBarDBNavigatorList

GetDBNavigatorByBarManager

GetFirstFreeBarManager


TdxBarDBNavigatorList.Count

TdxBarDBNavigatorList

Returns the total number of the TdxBarDBNavigator objects in a list.

property Count: Integer;

Description

Use this property to get a TdxBarDBNavigator number in the list.  This is a ReadOnly property.  The index of the first TdxBarDBNavigator in the list is 0, the index of the last TdxBarDBNavigator in the list is one less than the number returned by the Count property.


TdxBarDBNavigatorList.Items

TdxBarDBNavigatorList            See Also

Contains a TdxBarDBNavigator object list.

property Items[Index: Integer]: TdxBarDBNavigator;

Description

Use this property to get a particular TdxBarDBNavigator object from the list by index.  The index numeration begins with zero.

ReadOnly Property


TdxBarDBNavigatorList.GetDBNavigatorByBarManager

TdxBarDBNavigatorList            See Also

Returns a TdxBarDBNavigator object which belongs to the TdxBarManager specified by the ABarManager parameter.

function GetDBNavigatorByBarManager(ABarManager: TdxBarManager): TdxBarDBNavigator;

Description

Searches for a TdxBarDBNavigator with the BarManager property equal to the ABarManager parameter and returns (if it exists) the TdxBarDBNavigator.  If matches are not found, the function returns nil.


TdxBarDBNavigatorList.GetFirstFreeBarManager

TdxBarDBNavigatorList            See Also

Returns the first ’free’ TdxBarManager.

function GetFirstFreeBarManager: TdxBarManager;

Description

The ‘free’ TdxBarManager is a TdxBarManager object that does not have a TdxBarDBNavigator connected to it.  If there is no such TdxBarManager, the function returns nil.


TdxBarDBNavButtonType

This class defines TdxBarDBNavigator button types.

Unit

dxBarDBNav

type

TdxBarDBNavButtonType = (dxbnFirst, dxbnPrior, dxbnNext, dxbnLast, dxbnInsert, dxbnDelete, dxbnEdit, dxbnPost, dxbnCancel, dxbnRefresh);

TdxBarDBNavButtonTypes = set of TdxBarDBNavButtonType;

Description

You can customize a set of the TdxBarDBNavigator buttons to arrive at a collection appropriate to your applications.  TdxBarDBNavigator objects provide buttons similar to those of TDBNavigator.  TdxBarDBNavButtonTypes includes the following:

Value	Meaning
dxbnFirst	Corresponds to the ‘First’ button.  Pressing this button moves the cursor to the beginning of a dataset.
dxbnPrior	Corresponds to the ‘Prior’ button.  Pressing this button moves the cursor to the previous record.
dxbnNext	Corresponds to the ‘Next’ button.  Pressing this button moves the cursor to the next record.
dxbnLast	Corresponds to the ‘Last’ button.  Pressing this button moves the cursor to the end of a dataset.
dxbnInsert	Corresponds to the ‘Insert’ button.  Pressing this button inserts a record into the dataset.
dxbnDelete	Corresponds to the ‘Delete’ button.  Pressing this button deletes a record from the dataset.
dxbnEdit	Corresponds to the ‘Edit’ button.  Pressing this button allows editing within a dataset.
dxbnPost	Corresponds to the ‘Post’ button.  Pressing this button posts changes to a dataset.
dxbnCancel	Corresponds to the ‘Cancel’ button.  Pressing this button discards changes made to a dataset.
dxbnRefresh	Corresponds to the ‘Refresh’ button.  Pressing this button refreshes a dataset’s view of data.


TdxBarDBEnableType

See Also

Unit

dxBarDBNav

type

  TdxBarDBEnableType = (dxdbtCanModify, dxdbtNotEOF, dxdbtNotBOF, dxdbtHasRecords, dxdbtIsModified, dxdbtIsNotModified);

TdxBarDBEnableTypes = set of TdxBarDBEnableType;

Description

The TdxBarDBEnableType defines the types of changes to a dataset’s state that affect the items Enabled property via the TdxBarDBCheckLink object.  The item is enabled, while all specified types correspond to dataset state.  The following values are available:

Value	Meaning
dxdbtCanModify	If set, the Enabled property is True when the application can modify data in a dataset.
dxdbtNotEOF	If set, the Enabled property is True when the cursor has not reached the end of the table.
dxdbtNotBOF	If set, the Enabled property is True when the cursor has not reached the beginning of the table.
dxdbtHasRecords	If set, the Enabled property is True if the dataset is not empty.
dxdbtIsModified	If set, the Enabled property is True when a dataset’s state is dsEdit.
dxdbtIsNotModified	If set, the Enabled property is True when a dataset’s state is dsBrowse.


dxBarDBNavigatorList

See Also

Unit

dxBarDBNav

Description

This is a global variable of the TdxBarDBNavigatorList type.  It contains the list of all TdxBarDBNavigator application objects.  Such a list is useful when it is necessary to work with several TdxBarDBNavigator objects.


Unit dxBarExtDBItems

Items

TdxBarLookupCombo

Item Controls

TdxBarLookupComboControl

Objects

TdxBarLookupLink

TdxBarPopupLookupControl


TdxBarLookupCombo

Hierarchy          Properties           Methods           Events              Example

The TdxBarLookupCombo maintains a list of lookup values associated with a set of key field values.

Unit

dxBarExtDBItems

TdxBarLookupCombo = class(TCustomdxBarCombo);

Description

The item of the TdxBarLookupCombo class represents a lookup combo on a toolbar.  Each lookup value is associated with a set of key fields values.  The KeyField values correspond to the key field values of a dataset.  The KeyValue property of the TdxBarLookupCombo object changes when an end-user selects a new row from the dropdown list.  You can use the changed KeyValue in further work with datasets.


Hierarchy

TComponent

     |

TdxBarItem

     |

TdxBarWindowItem

     |

TdxBarEdit

     |

TCustomdxBarCombo

     |


TdxBarLookupCombo Properties

TdxBarLookupCombo               Legend

In TdxBarLookupCombo

AllowResizing

Color

EditText

ImmediateDropDown

KeyField

KeyValue

ListField

 	ListFields

ListFieldIndex

 	ListLink

ListSource

RowCount

PopupWidth

Derived from TCustomdxBarCombo

DroppedDown

DropDownWindow

ShowEditor

Derived from TdxBarEdit

MaxLength

ReadOnly

ShowCaption

Width

Derived form TdxBarWindowItem

CurText

EmptyWindow

FocusedItemLink

Text

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

UnclickingAfterDoing

Visible

VisibleForUser


TdxBarLookupCombo Methods

TdxBarLookupCombo               Legend

In TdxBarLookupCombo

DoClick

CheckKeyForDropDownWindow

KeyDown

KeyPress

Derived from TCustomdxBarCombo

AfterDropDown

CloseUp

DropDown

GetDropDownWindow

Derived from TdxBarEdit

WidthChanged

Derived from TdxBarWindowItem

Change

CurChange

DoEnter

DoExit

KeyUp

Derived form TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarLookupCombo Events

TdxBarLookupCombo               Legend

In TdxBarLookupCombo

OnKeyValueChange

Derived from TCustomdxBarCombo

OnCheckKeyForDropDownWindow

OnCloseUp

OnDropDown

OnGetDropDownWindow

Derived from TdxBarWindowItem

OnChange

OnCurChange

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TdxBarLookupCombo.EditText

TdxBarLookupCombo            See Also

Contains text from the current row of a list box.

property EditText: string;

Description

This property is used internally to capture text currently edited in a combo box.


TdxBarLookupCombo.ListFields

TdxBarLookupCombo            See Also

Contains field names whose values are displayed as rows in a dropdown list.

property ListFields: TList;

Description

Use the ListFields property to specify one or more fields to be displayed in a dropdown list.  ListFields is an object of the TList type that stores the field names.  Lookup combos refer to these fields by index.  The field, whose value is displayed in the editor of the combo box, is specified by the ListFieldIndex property.

ReadOnly Property


TdxBarLookupCombo.ListLink

TdxBarLookupCombo            See Also

Specifies the link to data associated with a lookup combo.

property ListLink: TdxBarLookupLink;

Description

Data is linked to a lookup combo via the TdxBarLookupLink object.  The link defines the behavior of the lookup combo when the state of a dataset changes.

ReadOnly Property


TdxBarLookupCombo.KeyValue

TdxBarLookupCombo            See Also              Example

Contains the actual value of a key field.

property KeyValue: Variant;

Description

This property contains the key field value of a selected row.  Use this value to filter or locate records in a dataset.  After selecting a new item from the dropdown list, the KeyValue property changes to store the key field value of the appropriate record.


TdxBarLookupCombo.Color

TdxBarLookupCombo

Specifies the background color of a dropdown window.

property Color: TColor;

Description

By default, the color of a dropdown window’s background is equal to clWindow (COLOR_WINDOW).  Use the Color property to set any other color for the background.


TdxBarLookupCombo.ImmediateDropDown

TdxBarLookupCombo

Specifies how a dropdown window appears to users.

property ImmediateDropDown: Boolean;

Description

If the ImmediateDropDown property is set to True, the dropdown window activates every time an end-user enters text in the editor of a combo box.  If the ImmediateDropDown is set to False, the dropdown window activates only when the list does not contain matches to the entered text.


TdxBarLookupCombo.KeyField

TdxBarLookupCombo            See Also              Example

Specifies a dataset’s key field.

property KeyField: string;

Description

Use this property to set or get the name of a dataset’s key field.  The key field value is used for further dataset processing.  Each row in a dropdown list has a corresponding key field value.  The key field value corresponding to the selected value in the current lookup combo is stored in the KeyValue property.


TdxBarLookupCombo.ListField

TdxBarLookupCombo            See Also

Specifies the field whose value is displayed in the dropdown window.

property ListField: string;

Description

This property specifies the field or list of fields whose values are displayed in the dropdown list.  To display several fields in the list, their field names must be separated by semicolons.  If a field name is not specified, a lookup combo displays the KeyField value in the dropdown list.  The field whose value is displayed in the editor of the combo box is specified by the ListFieldIndex property.


TdxBarLookupCombo.ListFieldIndex

TdxBarLookupCombo            See Also

Specifies the field index whose value is displayed in the combo box editor.

property ListFieldIndex: Integer;

Description

A dropdown list can display values from several fields.  The ListFieldIndex property specifies the field index in a field list.  The value of field specified by the ListFieldIndex property is displayed in the combo box editor.


TdxBarLookupCombo.ListSource

TdxBarLookupCombo

Identifies the data source for the data displayed in a lookup control.

property ListSource: TDataSource;

Description

Set the ListSource property to specify the data source that contains the KeyField and ListField values.


TdxBarLookupCombo.RowCount

TdxBarLookupCombo

Determines the number of rows in a dropdown window.

property RowCount: Integer;

Description

Use this property to set or get the number of dropdown rows displayed to a user.  If the number of items in a list is greater than the RowCount value, a vertical scroll bar appears to the right side of a dropdown window.


TdxBarLookupCombo.PopupWidth

TdxBarLookupCombo

Specifies the width of a dropdown window.

property PopupWidth: Integer;

Description

Use the PopupWidth property to adjust the width of a dropdown window.  If the value of this property is less than the width of a lookup combo, its value is automatically increased to match the width of the lookup combo.


TdxBarLookupCombo.CheckKeyForDropDownWindow

TdxBarLookupCombo

Determines whether key press events are processed by a dropdown window.

function CheckKeyForDropDownWindow(Key: Word; Shift: TShiftState): Boolean; override;

Description

This function returns True if a dropdown window processes key press events.  The Key parameter is a virtual key code.  The AShift parameter determines the state of the Alt, Ctrl, and Shift keys and the state of the mouse buttons.  The dropdown window only processes the Arrow, Home, End, PgUp, and PgDn keys.


TdxBarLookupCombo.KeyDown

TdxBarLookupCombo

Called after a key has been pressed within a combo box.

procedure KeyDown(var Key: Word; Shift: TShiftState); override;

Description

This method processes key press events within the combo box.  The Key parameter is a virtual key code.  The AShift parameter determines the state of the Alt, Ctrl, and Shift keys and the state of the mouse buttons.  When the Esc key is pressed, the KeyDown method clears text in the combo box editor.  Override this procedure to perform special actions on key press events without writing the OnKeyDown event handler.


TdxBarLookupCombo.KeyPress

TdxBarLookupCombo

Called when pressing alphanumeric keys.

procedure KeyPress(var Key: Char); override;

Description

When an end-user presses alphanumeric keys within a combo box, the KeyPress procedure attempts to locate a corresponding item from the dropdown list.  The Key parameter is the character which represents the key pressed, not a virtual key code.


TdxBarLookupCombo.DoClick

TdxBarLookupCombo            See Also

Opens a list box dialog.

procedure DoClick; override;

Description

This procedure is called if the DockingStyle of a parent bar control is dsRight or dsLeft.  In this case, the lookup combo is displayed as a toolbar button and this method is called every time an end-user clicks the button.  If the OnClick event handler is defined, the DoClick procedure also executes it and exits.  Otherwise, the DoClick procedure creates and activates the dialog which is used to select values from the data source.  The data selected within the dialog is stored in the Text property.


TdxBarLookupCombo.OnKeyValueChange

TdxBarLookupCombo

Occurs when the value of the KeyValue property changes.

property OnKeyValueChange: TNotifyEvent;

Description

The KeyValue property changes every time an end-user selects a new row in a dropdown list.  Unlike the OnKeyValueChange, the OnChange event occurs when the contents of the combo box editor change.  If the old and new items in the list have the same field values (their ListFieldIndex values are equal), the OnChange event is not fired.


TdxBarLookupCombo.AllowResizing

TdxBarLookupCombo

Specifies whether dropdown window resizing is available.

property AllowResizing: Boolean;

Description

If the AllowResizing property is set to True, the dropdown window allows runtime resizing using the window grip.


TdxBarLookupComboControl

Hierarchy          Properties          Methods

TdxBarLookupCombo maintains a list of lookup values associated with a set of key field values.

Unit

dxBarExtDBItems

TdxBarLookupComboControl = class(TCustomdxBarComboControl);

Description

This item control represents the TdxBarLookupCombo item on the screen.


Hierarchy

TComponent

     |

TdxBarItemControl

     |

TdxBarWinControl

     |

TdxBarEditControl

     |

TCustomdxBarComboControl

     |


TdxBarLookupComboControl Properties

TdxBarLookupComboContro          Legend

Derived from TCustomdxBarComboControl

DropDownButtonRect

DropDownWindow

DroppedDown

Item

Derived from TdxBarEditControl

 	CaptionWidth

 	MaxLength

 	ReadOnly

 	ShowCaption

Derived from TdxBarWinControl

Handle

Focused

Text

WindowRect

Derived from TdxBarItemControl

BarManager

 	Caption

 	Enabled

 	Glyph

HasWindow

 	Height

 	Hint

IsActive

IsSelected

 	ImageIndex

 	Images

ItemLink

Parent

 	Pressed

 	ShortCut

 	Width


TdxBarLookupComboControl Methods

TdxBarLookupComboContro          Legend

Derived from TCustomdxBarComboControl

ControlInactivate

Derived from TdxBarEditControl

WidthChanged

Derived from TdxBarWinControl

CanClicked

ControlClick

IsDestroyOnClick

WndProc

Derived from TdxBarItemControl

BeginGroupChanged

CaptionChanged

Click

ControlActivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged


TdxBarLookupLink

Hierarchy

Unit

dxBarExtDBItems

TdxBarLookupLink = class(TDataLink);

Description

The TdxBarLookupCombo uses the TdxBarLookupLink to coordinate TDataSource and TDataSet actions and to respond to data events.

This class is for internal purposes only.


Hierarchy

TDataLink

     |


TdxBarPopupLookupControl

Hierarchy          See Also

Unit

dxBarExtDBItems

TdxBarPopupLookupControl = class(TCustomControl);

Description

Represents a dropdown window of the TdxBarLookupCombo item. Use the lookup combo’s ListField property to specify the fields whose values are displayed in a dropdown list.  The number of visible rows in the dropdown list is specified by the lookup combo’s RowCount property.

This class is for internal purposes only.


Hierarchy

TCustomControl

     |


Unit dxBarConverter
dxBarConverter Unit

Controls

TdxBarConverter


TdxBarConverter

Hierarchy          Properties           Methods          See Also

This class is intended for the conversion of TMenu and TMenuItems into TdxBarManager items.

Unit

dxBarConverter

TdxBarConverter = class(TComponent);

Description

Use the TdxBarConverter to convert your existing menus into ExpressBars menus.  The TdxBarConverter converts either TMainMenu or TPopupMenu into TdxBarManager items.


Hierarchy

TComponent

     |


TdxBarConverter Properties

TdxBarConverter               Legend

In TdxBarConverter

BarManager

Menu

Execute


TdxBarConverter Methods

TdxBarConverter               Legend

In TdxBarConverter

Convert


TdxBarConverter.BarManager

TdxBarConverter

Specifies the bar manager to which the converted menu items belong.

property BarManager: TdxBarManager;

Description

Specifies the bar manager of the TdxBarManager type to which the converted menu items belong.


TdxBarConverter.Menu

TdxBarConverter            See Also

Specifies the menu to be converted.

property Menu: TMenu;

Description

Menus to be converted may be either of the TMenu or TPopupMenu type.  TMenu items are converted into TdxBarManager items and assigned to a category called ‘MainMenu’.  TPopupMenu items are placed into a category with the name of the popup menu.


TdxBarConverter.Execute

TdxBarConverter          See Also          Example

Starts the menu conversion process.

property Execute: Boolean;

Description

Click this item within the Object Inspector at design time to convert menus into ExpressBars items.


TdxBarConverter.Convert

TdxBarConverter          See Also

Performs the menu conversions.

procedure Convert;

Description

Call the Convert procedure to perform menu conversions.  TMenu and TPopupMenu items are converted into TdxBarManager items.

Note:	If the bar manager specified by the BarManager property does not have a toolbar with the IsMainMenu property set to True, it is automatically created.


Version History

The following features were implemented in the ExpressBars Suite v. 4:

1.	Four new Items have been added:

TdxBarControlContainerItem - Allows you to embed any component supported by Delphi or C++ Builder into your toolbars.

TdxBarProgressItem - Allows you to incorporate a progress meter into the ExpressBars to display the status of lengthy application

TdxBarMRUListItem - Allows you to include a list of most recently used (MRU) items within your application.

TdxBarInPlaceSubItem - Allows you to introduce a new sub-menu system, similar to that found in ICQ.

2. ExpressBars v4 introduces a new object, TdxBarGroup - designed to help you and your end-users manage Item groups (enable/disable or hide them).

3. A new external dock control - TdxBarDockControl is available.  With it, you can embed a toolbar on any form or panel.

4. A new Visual Display Style has been introduced. Bring the look and feel of MS Office 10 to your applications, today!

5. Toolbar Wrapping is now available and allows you to display toolbars across multiple lines when docked.

6. In the same way as you already can use a toolbar as an enhanced menu, you can now use a toolbar as an enhanced status bar.

7. Detachable Sub-menus can now be incorporated into your applications. With this new feature, your user can "pull-off" any sub-menu - then dock them as their needs dictate.

The following features were implemented in the ExpressBars Suite v3.1:

1. ExpressBars offers two new items: TdxBarSpinEdit and TdxBarToolbarsListItem.

TdxBarSpinEdit allows you to use all the power provided by the standard up-down control on your toolbars.  TdxBarSpinEdit can edit both integer and float values.

TdxBarToolbarsListItem allows you to store a list of toolbars.  With this new item, you can easily generate a list of toolbars for a menu.

2. TdxBarColorCombo provides the ability to apply an automatic color item in a dropdown list:

The ShowAutoColor property specifies whether the automatic color item will be displayed.

The AutoColor and AutoColorText properties specify the colors and text of the automatic color item.

Additionally, TdxBarColorCombo can display a custom color button.  Pressing this button activates the color dialog.

3. The following TdxBarSubItem properties are now available:

AllowCustomizing	Determines whether a user is allowed to customize a sub item (add, delete, and move item links).
ShowCaption	Determines whether a sub item’s caption is displayed.

4. The following new TdxBarManager properties and events are added:

AlwaysSaveText	Text entries are automatically saved after existing an editor.
PopupMenuLinks	Allows a user to associate TdxBarPopupMenu with controls on a form.
UseFullReset	If active, after resetting a toolbar, both the layouts of its items and its position are reset.
OnBarBeforeReset	Generated before a Reset method call.
OnBarAfterReset	Generated after a Reset method call.

5. Buttons can stay pressed during execution of the OnClick event (Microsoft Office® style).

6. Now you can create your own custom hint window.  Just make use of the dxBarHintWindowClass variable.

7. Additional Features

The AllowClose property of TdxBar determines whether a toolbar can be hidden.

All strings for internalization have been moved to the string table resource.

The VisibleForUser property of TdxBarItem determines whether an item is currently visible for a user.

The OnMenuMerge event of TdxBarManager allows to add menu items of an MDI child form to the main menu of a parent form in a specific manner.


What's New In the ExpressBars Suite v5
What's New In the ExpressBars Suite v. 5

Major Items

•	Docking Library

•	XP themes support

•	Office11 and .Net styles

•	LookAndFeel support (now uses cxLibrary)

•	Layout persistence

•	Background images

•	New cxStatusBar component

•	New component editors for BarManager & Toolbars (much easier design time creation of items)

•	DisabledImages & HotImages support (requested by many)

•	AlphaBlending of floating toolbars (from invisible to fully opaque)

Minor Items

•	TdxBarDateCombo new properties

o	MaxDate, MinDate

o	It can start empty or contain the current date

o	You can add/remove day name from the text

•	TdxBarProgressItem - Color property added

•	Support for loading images

•	All-directions cursor (as Office2000)

•	BarSubItem - DropDown method added

•	Localization improvement - uses cxLibrary's GetResourceString

•	"\Software" removed from RegistryPath

•	600 pixels limit for an item's width is removed

Fixes

•	TdxBarLookupCombo

o	List width was incorrect if ShowCaption = True

o	Autosearch did not work

•	An invisible group did not hide items linked with actions

•	Hot track now works for mdi buttons in Flat style

•	Shortcuts did not work for bar items on MDI child forms

•	LargeButton.LargeImageIndex now linked to its action's ImageIndex

•	String globalization

•	Application Hint properties now supported

•	Various SideBar bug fixes

If you have any questions on the new ExpressBars Suite, write to us at info@devexpress.com or visit us on the web at: www.devexpress.com.


How To Get Support

The goal of our support team is to answer and alleviate any problems you might encounter when using our component.  Feel free to contact us at: support@devexpress.com

You can address any suggestions, comments, complaints or good thoughts to:

suggest@devexpress.com

Please, visit the ExpressSupport Forum at http://www.devexpress.com/dxforum to find articles on our components, tips and tricks, and a myriad of working samples with full source code.


How To Add Existing Buttons to a Toolbar

C++Builder code

If the menu and toolbar customization form is active, you can add existing items to toolbars at design time by dragging the desired items from the customization form onto a toolbar.

If the customization form is inactive, you should create an item link which will link a toolbar with an item.  The following code demonstrates how you can place existing items onto a toolbar.  It adds three buttons to a toolbar: "Cut", "Copy" and "Font Name".

// Delphi

procedure TMainForm.Button1Click(Sender: TObject);

begin

  with dxBarManager.Bars[1] do

  begin

    LockUpdate := True;

    with ItemLinks do

    begin

      Add.Item := btnCut;

      with Add do

      begin

        Item := btnCopy;

        UserPaintStyle := psCaptionGlyph;

      end;

      with Add do

      begin

        BeginGroup := True;

        Item := cbFontName;

        UserWidth := 150;

      end;

    end;

    LockUpdate := False;

  end;

end;


How to Export a Toolbar From a Child Form to a Main Form

This topic explains how to copy toolbars from any bar manager located on child forms to the bar manager placed within the main form.

There is no simple way to merge two bar managers without limitations (i.e. with full customization, item placement, etc.).  If you'd like to create toolbars on a child form, but then place them onto the main form, you should assign a specific toolbar.  Here is the code to "attach" toolbars:

// Delphi

  for I := 0 to ChilddxBarManager.Bars.Count - 1 do

    MaindxBarManager.Bars.Add.Assign(ChilddxBarManager.Bars[I]);

// C++Builder

  for (int i = 0; i < ChilddxBarManager->Bars->Count; i++)

    MaindxBarManager->Bars->Add()->Assign(ChilddxBarManager->Bars->Items[i]);

Here is the code to "detach" toolbars:

// Delphi

  for I := 0 to ChilddxBarManager.Bars.Count - 1 do

    MaindxBarManager.Bars.Delete(MaindxBarManager.Bars.Count - 1);

// C++Builder

  for (int i = 0; i < ChilddxBarManager->Bars->Count; i++)

    MaindxBarManager->Bars->Delete(MaindxBarManager->Bars->Count - 1);

We advise you to use a bar manager on the main form.  In this instance, you can dynamically change, display, hide toolbars and menu items when a specific application window is displayed.


How To Create Items at Runtime and Place them on a Toolbar or a Sub Menu

C++Builder code

This example illustrates how to create new items at runtime and then add them to a toolbar or sub menu.  The code presented below creates items of type TdxBarColorCombo and TdxBarButton and places them onto a toolbar or in a sub menu.

// Delphi

procedure TMainForm.btnCustomColorClick(Sender: TObject);

var

  cbColor: TdxBarColorCombo;

begin

  cbColor := TdxBarColorCombo(TdxBarButton(Sender).Tag);

  with TColorDialog.Create(Self) do

  begin

    Color := cbColor.Color;

    if Execute then

      cbColor.Color := Color;

    Free;

  end;

end;

procedure TMainForm.FormCreate(Sender: TObject);

var

  cbColor: TdxBarColorCombo;

  btnCustomColor: TdxBarButton;

begin

  cbColor := TdxBarColorCombo.Create(Self);

  with cbColor do

  begin

    Caption := 'Color:';

    Color := clAqua;

  end;

  btnCustomColor := TdxBarButton.Create(Self);

  with btnCustomColor do

  begin

    Caption := '...';

    Hint := 'Click to select custom color';

    PaintStyle := psCaption;

    Tag := Integer(cbColor);

    OnClick := btnCustomColorClick;

  end;

  // Adds an item to a sub menu

  siFormat.ItemLinks.Add.Item := cbColor;

  // Adds an item to a toolbar

  with dxBarManager.Bars[2], ItemLinks do

  begin

    LockUpdate := True;

    with Add do

    begin

      Item := cbColor;

      Index := 0;

      BringToTopInRecentList;

    end;

    with Add do

    begin

      Item := btnCustomColor;

      Index := 1;

      BringToTopInRecentList;

    end;

    LockUpdate := False;

  end;

end;


How to Create a Popup Menu at Runtime

C++Builder code

In this example, we demonstrate how to create a popup menu from scratch at runtime.  This sample requires a form with a TMemo control placed on it.  The popup menu is created when a user right-clicks the memo control.  The popup menu includes five items: "Cut", "Copy", "Paste", "Clear", and "Select All".  The PopupMenuButtonClick procedure processes a user’s selection of a given menu item.

// Delphi

procedure TMainForm.PopupMenuButtonClick(Sender: TObject);

begin

  with Memo1 do

    case TdxBarButton(Sender).Tag of

      1: CutToClipboard;

      2: CopyToClipboard;

      3: PasteFromClipboard;

      4: ClearSelection;

      5: SelectAll;

    end;

end;

procedure TMainForm.Memo1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

const

  ButtonCount = 5;

  Captions: array[1..ButtonCount] of string = ('Cu&t', '&Copy', '&Paste', 'Cle&ar', '&Select All');

var

  PopupMenu: TdxBarPopupMenu;

  I: Integer;

  Buttons: array[1..ButtonCount] of TdxBarButton;

begin

  if Button = mbRight then

  begin

    PopupMenu := TdxBarPopupMenu.Create(Self);

    for I := 1 to ButtonCount do

    begin

      Buttons[I] := TdxBarButton.Create(Self);

      with Buttons[I] do

      begin

        Caption := Captions[I];

        if I < ButtonCount then ImageIndex := I;

        Tag := I;

        OnClick := PopupMenuButtonClick;

      end;

      with PopupMenu.ItemLinks.Add do

      begin

        BeginGroup := I = ButtonCount;

        Item := Buttons[I];

      end;

    end;

    PopupMenu.PopupFromCursorPos;

    for I := 1 to ButtonCount do

      Buttons[I].Free;

    PopupMenu.Free;

  end;

end;


How To Create a Toolbar and Position it on Screen

C++Builder code

The following function creates a new toolbar and sets it to a desired position on screen.  The parameters used are as follows:

ABarManager	Specifies the bar manager which manages the toolbar.
ACaption	Specifies the caption of the new toolbar.
ADockingStyle	Specifies the dock control onto which the toolbar is placed.
ARow and ACol	Specifies toolbar position on a dock control.  It is used if ADockingStyle does not equal dsNone.
AInsert	If True, a new toolbar will occupy the entire row in a dock control.
AIsVisible	Determines, whether a new toolbar will be visible.

// Delphi

function CreateBar(ABarManager: TdxBarManager; ACaption: string; ADockingStyle: TdxBarDockingStyle; ARow, ACol: Integer; AInsert: Boolean; AVisible: Boolean): TdxBar;

var

  AIsVertical: Boolean;

  ADockRow: TdxDockRow;

begin

  Result := ABarManager.Bars.Add;

  with Result do

  begin

    Caption := ACaption;

    DockingStyle := ADockingStyle;

    if ARow < 0 then ARow := 0;

    Row := ARow;

    OneOnRow := AInsert;

    if (ACol <> -1) and (DockingStyle <> dsNone) then

    begin

      DockControl := TdxBarDockControl(BarManager.Bars.DockControls[DockingStyle]);

      if Row < DockControl.RowList.Count then

      begin

        AIsVertical := DockingStyle in [dsLeft, dsRight];

        ADockRow := TdxDockRow(DockControl.RowList[Row]);

        if ACol < 0 then ACol := 0;

        if ACol >= ADockRow.ColList.Count then

          with TdxDockCol(ADockRow.ColList.Last) do

            if AIsVertical then

              Result.DockedTop := DockedTop + BarControl.Height

            else

              Result.DockedLeft := DockedLeft + BarControl.Width

        else

          with TdxDockCol(ADockRow.ColList[ACol]).Pos do

            if AIsVertical then DockedTop := Y

            else DockedLeft := X;

      end;

    end;

    Visible := AVisible;

  end;

end;


How to Arrange Toolbars

C++Builder code

When a user moves toolbars at runtime, separations between individual toolbars may be created based on the placement of these toolbars.  The following code demonstrates how you can arrange toolbars so that this free space is eliminated.

// Delphi

procedure TMainForm.ArrangeBarsButtonClick(Sender: TObject);

var

  I, J, Offset: Integer;

  DockRow: TdxDockRow;

begin

  with dxBarManager do

  begin

    LockUpdate := True;

    for J := 0 to Bars.DockControls[dsTop].RowList.Count - 1 do

    begin

      DockRow := TdxDockRow(Bars.DockControls[dsTop].RowList[J]);

      Offset := 0;

      for I := 0 to DockRow.ColList.Count - 1 do

        with TdxDockCol(DockRow.ColList[I]) do

        begin

          Pos := Point(Offset, Pos.Y);

          Inc(Offset, BarControl.Width);

        end;

    end;

    LockUpdate := False;

  end;

end;


How to Convert Standard Menus to ExpressBars Menus

Use the TdxBarConverter component to convert standard TMainMenu or TPopupMenu to ExpressBar menus.  TdxBarConverter converts standard menu items to ExpressBar items and then deletes the standard menu from your form.  Follow these steps to convert your standard menus:

- Place a TdxBarConverter onto a form which includes a TMainMenu (or TPopupMenu).

- Specify the standard menu to be converted in the Menu property of TdxBarConverter.

- In BarManager, specify a TdxBarManager object which will manage items created based on the standard menu.

After you complete the steps listed above, double-click the Execute property (or press the ellipse button).


How To Dock a Floating Toolbar to its Previous Position Upon Closing

To implement this feature, you must use the OnBarClose event of a bar manager.  The following procedure is the event handler for this event.  It is called every time a user tries to hide a toolbar.

// Delphi

procedure TMainForm.dxBarManagerBarClose(Sender: TdxBarManager; ABar: TdxBar);

begin

  if ABar.DockingStyle = dsNone then

  begin

    ABar.DockingStyle := ABar.DockedDockingStyle;

    ABar.Visible := True;

  end;

end;

// C++Builder

void __fastcall TForm1::dxBarManager1BarClose(TdxBarManager *Sender, TdxBar *ABar)

{

  if( ABar->DockingStyle == dsNone )

  {

    ABar->DockingStyle = ABar->DockedDockingStyle;

    ABar.Visible = true;

  }

}


How to Disable Moving, Docking and Customizing of Toolbars

In order to disable runtime changes to a toolbar, set the AllowCustomizing and AllowQuickCustomizing properties of the toolbar to False.

To disable toolbar docking to a dock control, use the NotDocking property of the toolbar.  If NotDocking includes dsNone, the floating toolbar cannot be moved.

The following code disables moving, changing, and docking of a toolbar:

// Delphi

with dxBarManager.Bars[1] do

begin

  AllowCustomizing := False;

  AllowQuickCustomizing := False;

  NotDocking := [dsNone,dsLeft,dsTop,dsRight,dsBottom];

end;

// C++Builder

TdxBar * Bar;

Bar = dxBarManager1->Bars->Items[1];

Bar->AllowCustomizing = false;

Bar->AllowQuickCustomizing = false;

Bar->NotDocking = Bar->NotDocking << dsNone << dsLeft << dsTop << dsRight << dsBottom;


How to Emulate Coolbar Behavior

When you wish to emulate the behavior of the standard Delphi Coolbar, you must set the UseRestSpace property to True for all toolbars of the dock control.  You should also assign all possible values, except for ones that correspond to your selected dock control, to the NotDocking property.  For the upper dock control it will look as follows:

// Delphi

procedure TMainForm.MakeCoolBarButtonClick(Sender: TObject);

var

  I: Integer;

begin

  if dxBarManager do

    for I := 0 to Bars.Count - 1 do

      with Bars[I] do

        if DockingStyle = dsTop then

        begin

          NotDocking := [dsNone, dsLeft, dsRight, dsBottom];

          UseRestSpace := True;

        end;

end;

// C++Builder

void __fastcall TMainForm::MakeCollBarButtonClick(TObject * Sender)

{

 for(int I=0;I<dxBarManager1->Bars->Count;I++)

   if (dxBarManager1->Bars->Items[I]->DockingStyle == dsTop)

   {

     dxBarManager1->Bars->Items[I]->NotDocking.Clear();

     dxBarManager1->Bars->Items[I]->NotDocking << dsNone << dsLeft << dsRight << dsBottom;

     dxBarManager1->Bars->Items[I]->UseRestSpace = true;

   }

}


How to Prohibit Deletion or Modification of any Item

To prevent deletion or modification of items, you should place the items into a unique category and make this category invisible via its CategoryVisible property.  Set the AllowCustomizing property to False for all toolbars that contain items of this category.


How to Prevent Control Rotation when Docking a Toolbar

You can easily accomplish this objective by setting the TdxBar.RotateWhenVertical property to False.  Consequently, when docking a toolbar to the left or right edge of a form, its contents will not rotate; In other words, all items will be displayed horizontally.


How to Add Custom Items to a Toolbar's Popup Menu

C++Builder code

This example demonstrates how you can add your own items to a toolbar’s popup menu.

Let’s add Show Captions:

To add a new item or modify an existing one on a toolbar’s popup menu, it is necessary to use the OnShowToolbarsPopup event.  Let’s add a new button within this event handler.

// Delphi

btnShowCaptions: TdxBarButton;

...

// The OnClick event handler of the ShowCaptions button.

procedure TMainForm.btnShowCaptionsClick(Sender: TObject);

var

  I: Integer;

begin

  with dxBarManager do

  begin

    LockUpdate := True;

    for I := 0 to ItemCount - 1 do

      if Items[I] is TdxBarLargeButton then

        with TdxBarLargeButton(Items[I]) do

        begin

          ShowCaption := btnShowCaptions.Down;

          if ShowCaption then

            Width := 50

          else

            Width := 0;

        end;

    LockUpdate := False;

  end;

end;

// The OnShowToolbarsPopup event handler.

procedure TMainForm.dxBarManagerShowToolbarsPopup(Sender: TdxBarManager; PopupItemLinks: TdxBarItemLinks);

begin

  if btnShowCaptions = nil then

  begin

    btnShowCaptions := TdxBarButton.Create(Self);

    with btnShowCaptions do

    begin

      ButtonStyle := bsChecked;

      Caption := 'Show Captions';

      Down := True;

      OnClick := btnShowCaptionsClick;

    end;

  end;

  with PopupItemLinks.Add do

  begin

    BeginGroup := True;

    Item := btnShowCaptions;

  end;

end;


How To Show/Hide All Items within a Category

With the help of this example you’ll learn how to hide/display all items of a category.  Use the CategoryItemVisible property of a bar manager.  The code below also hides empty toolbar via the AutoHideEmptyToolbars property (the ShowOrHideCategoryItems procedure).

// Delphi

with dxBarManager do

  begin

    // Hides empty toolbars

    AutoHideEmptyBars := True;

    // Shows/hides items

    if CategoryItemsVisible[1] = ivAlways then

      CategoryItemsVisible[1] := ivNever

    else

      CategoryItemsVisible[1] := ivAlways;

  end;

// C++Builder

  // Hides empty toolbars

  dxBarManager1->AutoHideEmptyBars = true;

  // Shows/hides items

  if (dxBarManager1->CategoryItemsVisible->Items[1] == ivAlways)

      dxBarManager1->CategoryItemsVisible->Items[1] = ivNever;

  else

    dxBarManager1->CategoryItemsVisible->Items[1] = ivAlways;


How To Create Several Item Controls for the Same Underlying Item

C++Builder code

This example illustrates how you can create several item controls based on a single item.  This procedure creates a toolbar and several item controls.  Fifteen item controls determine standard colors for a form; the sixteenth control activates the Color Selection dialog, which allows you to select a non-standard color.  The dxBarManagerBarDockingStyleChange procedure is the OnBarDockingStyleChange event handler.  It changes the paint style of a new item when changing the docking style of a new toolbar.

// Delphi

unit Unit1;

interface

uses

  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, dxBar, StdCtrls;

// form declaration

type

  TMainForm = class(TForm)

    dxBarManager: TdxBarManager;

    CreateColorBarButton: TButton;

    procedure CreateColorBarButtonClick(Sender: TObject);

    procedure dxBarManagerBarDockingStyleChange(Sender: TdxBarManager; ABar: TdxBar);

  private

    { Private declarations }

    barColor: TdxBar;

    procedure btnColorClick(Sender: TObject);

  public

    { Public declarations }

  end;

var

  MainForm: TMainForm;

implementation

{$R *.DFM}

// The OnClick event handler of a new item

procedure TMainForm.btnColorClick(Sender: TObject);

begin

  with TdxBarButton(Sender).ClickItemLink do

    if Data = -1 then

      with TColorDialog.Create(nil) do

      begin

        Color := Self.Color;

        if Execute then

          Self.Color := Color;

        Free;

      end

    else

      Color := Data;

end;

procedure TMainForm.CreateColorBarButtonClick(Sender: TObject);

const

  Captions: array[1..16] of string = ('Black', 'Maroon', 'Green', 'Olive', 'Navy', 'Purple', 'Teal', 'Gray', 'Silver', 'Red', 'Lime', 'Yellow', 'Blue', 'Fuchsia', 'Aqua', 'White');

  Colors: array[1..16] of TColor = (clBlack, clMaroon, clGreen, clOlive, clNavy, clPurple, clTeal, clGray, clSilver, clRed, clLime, clYellow, clBlue, clFuchsia, clAqua, clWhite);

var

  btnColor: TdxBarButton;

  B: TBitmap;

  I: Integer;

begin

  with dxBarManager do

  begin

    // creates a new item

    btnColor := TdxBarButton.Create(Self);

    with btnColor do

    begin

      PaintStyle := psCaptionGlyph;

      OnClick := btnColorClick;

    end;

    // Creates a new toolbar for new item controls

    barColor := Bars.Add;

    with barColor do

    begin

      AllowCustomizing := False;

      Caption := 'Color';

    end;

    // Creates a bitmap drawn on an item control’s surface

    B := TBitmap.Create;

    with B do

    begin

      Width := 18;

      Height := 16;

      with Canvas do

      begin

        // For transparent color

        Brush.Color := clBtnFace;

        FillRect(Rect(0, 0, Width, Height));

        // Draws frame

        Brush.Color := clBtnShadow;

        FrameRect(Rect(1, 0, Width - 1, Height));

      end;

    end;

    // Creates item controls on a new toolbar

    for I := 1 to 16 do

      with barColor.ItemLinks.Add do

      begin

        Data := Colors[I];

        Item := btnColor;

        UserCaption := Captions[I];

        with B, Canvas do

        begin

          Brush.Color := Colors[I];

          FillRect(Rect(2, 1, Width - 2, Height - 1));

        end;

        UserGlyph := B;

      end;

    // Creates the 16th item control

    // that calls the color selection dialog

    with barColor.ItemLinks.Add do

    begin

      BeginGroup := True;

      Data := -1;

      Item := btnColor;

      UserCaption := 'Custom...';

      UserPaintStyle := psCaption;

    end;

    B.Free;

    // Specifies position and displays a new toolbar on screen

    barColor.FloatLeft := Left - 80;

    barColor.FloatTop := Top;

    barColor.Visible := True;

  end;

end;

// The OnDockingStyleChange event handler of a bar manager

procedure TMainForm.dxBarManagerBarDockingStyleChange(Sender: TdxBarManager; ABar: TdxBar);

begin

  if ABar = barColor then

    with ABar do

    begin

      LockUpdate := True;

      with TdxBarButton(ItemLinks[0].Item) do

        if DockingStyle = dsNone then

          PaintStyle := psCaptionGlyph

        else

          PaintStyle := psStandard;

      LockUpdate := False;

    end;

end;

end.


How to Create a List of MDI Child Windows

C++Builder code

This example illustrates how you can create a list of MDI child windows with the help of TdxBarListItem.  When creating a child window, its caption is added to the item list.  Upon selecting a window from the list, the dxBarListWindowsClick procedure (the OnClick event handler) is called.  The OnGetData event handler is used to mark the current active child window within the list.

unit Unit1;

interface

uses

  Classes, Forms, dxBar;

type

  TMainForm = class(TForm)

    BarManager: TdxBarManager;

    dxBarButtonNewWindow: TdxBarButton;

    dxBarButtonArrangeAll: TdxBarButton;

    dxBarButtonNextWindow: TdxBarButton;

    dxBarButtonPreviousWindow: TdxBarButton;

    dxBarListWindows: TdxBarListItem;

    dxBarSubItemWindow: TdxBarSubItem;

    procedure dxBarButtonNewWindowClick(Sender: TObject);

    procedure dxBarButtonArrangeAllClick(Sender: TObject);

    procedure dxBarButtonNextWindowClick(Sender: TObject);

    procedure dxBarButtonPreviousWindowClick(Sender: TObject);

    procedure dxBarListWindowsGetData(Sender: TObject);

    procedure dxBarListWindowsClick(Sender: TObject);

  public

    CreatedMDICount: Integer;

  end;

var

  MainForm: TMainForm;

implementation

{$R *.DFM}

uses

  Unit2;

// Creates a new child form

procedure TMainForm.dxBarButtonNewWindowClick(Sender: TObject);

begin

  TChildForm.Create(Application);

end;

procedure TMainForm.dxBarButtonArrangeAllClick(Sender: TObject);

begin

  Tile;

end;

procedure TMainForm.dxBarButtonNextWindowClick(Sender: TObject);

begin

  Next;

end;

procedure TMainForm.dxBarButtonPreviousWindowClick(Sender: TObject);

begin

  Previous;

end;

// The OnGetData event handler of TdxBarListItem

procedure TMainForm.dxBarListWindowsGetData(Sender: TObject);

begin

  with dxBarListWindows do

    ItemIndex := Items.IndexOfObject(ActiveMDIChild);

end;

// The OnClick event handler of TdxBarListItem

procedure TMainForm.dxBarListWindowsClick(Sender: TObject);

begin

  with dxBarListWindows do

    TCustomForm(Items.Objects[ItemIndex]).Show;

end;

end.

// The child form unit

unit Unit2;

interface

uses

  Classes, Forms;

type

  TChildForm = class(TForm)

    procedure FormCreate(Sender: TObject);

    procedure FormDestroy(Sender: TObject);

    procedure FormClose(Sender: TObject; var Action: TCloseAction);

  end;

implementation

{$R *.DFM}

uses

  SysUtils, Unit1;

// Adds a child window to the child window list

procedure TChildForm.FormCreate(Sender: TObject);

begin

  Inc(MainForm.CreatedMDICount);

  Caption := 'Document' + IntToStr(MainForm.CreatedMDICount);

  MainForm.dxBarListWindows.Items.AddObject(Caption, Self);

end;

// Removes a child window from the child window list

procedure TChildForm.FormDestroy(Sender: TObject);

begin

  with MainForm.dxBarListWindows.Items do

    Delete(IndexOfObject(Self));

end;

procedure TChildForm.FormClose(Sender: TObject; var Action: TCloseAction);

begin

  Action := caFree;

end;

end.


How to Implement Help for the Customization Form

To include your own custom help for the Toolbar Customization dialog, you should use the help button placed at the bottom of the customization form.  By default, the help button is hidden.  To make it visible, set the ShowHelpButton property of the bar manager to True.  The HelpButtonGlyph property is used to specify the picture drawn on the help button.

Additionally, you should write an OnHelpButtonClick event handler which responds to the help button press event.

// Delphi

procedure TForm1.dxBarManager1HelpButtonClick(Sender: TObject);

begin

  WinHelp(0, 'MyHelp.hlp', HELP_CONTENTS, 0);

end;

// C++Builder

void __fastcall TForm1::dxBarManager1HelpButtonClick(TObject *Sender)

{

  WinHelp(NULL,"MyHelp.hlp",HELP_CONTENTS, 0);

}


Customization Form

The customization form is intended to manage item layouts on toolbars, to customize properties of items and categories, to determine toolbar behavior, etc.  The customization form consists of four pages.  The first page includes a list of existing toolbars.

Click a page or the corresponding link below to learn more about it.

Commands Page

Options Page

All Commands Page

Groups Page

The first page is visible at runtime.

Click the check box to the left of the toolbar to hide/display it on screen.  If its IsMainMenu property is set to True, this check box is disabled; A main menu cannot be hidden.

The following buttons are available on this page:

New …

Creates a new toolbar (by default, its docking style is float).

Rename…

Renames the selected toolbar.

Delete

Deletes the selected toolbar.  If the IsMainMenu property of this toolbar is set to True, this button is disabled; the main menu cannot be deleted.

To customize properties of a specific toolbar, select it from the toolbar list and then switch to the Object Inspector.


Customization Form - Commands Page

The Commands page is visible at runtime.

The Commands page contains two panels: One represents a list of existing categories and the other, a list of items from these categories.

Click a page or the corresponding link below to learn more about it.

Toolbars Page

Options Page

All Commands Page

Groups Page

To place an item onto a toolbar, drag it from the list to the toolbar.  To remove an item from one category and place it onto another, drag it from the rightmost list to the desired leftmost list category.

To customize properties of a certain category or item, select this category (item) from the list and switch to the Object Inspector.  The properties edited in the Object Inspector are item properties.  They will impact all item controls of the item on toolbars.  To customize properties of a specific item control, use the customizing popup menu (right-click above this item control to activate it).

The two "…modify" buttons are available at design-time:

Category Modify is used for category lists

Item Modify is used for item lists.

With these buttons, you can call popup menus which are used to customize categories and items.  They appear after right-clicking a category or an item.


Customization Form - Category Modify

The category "…modify" button activates the following popup menu:

The popup menu includes the following items:

Add…

Adds a new category to the end of the list.

Insert…

Inserts a new category.

Rename…

Renames a selected category.

Visible

Determines whether the category is visible in the customization form at runtime.

Item Visible

Determines the Visible property of items that belong to a category.

Delete

Deletes a selected category.

IMPORTANT:	When deleting a category, all items of the category are deleted as well.


Customization Form - Item Modify

The item "… modify" button activates the following popup menu:

The popup menu includes the following items:

Add…

Creates a new item in the selected category.

Delete

Deletes the selected item.

Clear

Clears all items that belong to the current category.

Move Up

Moves an item up within the item list.

Move Down

Moves an item down within the item list.

SubMenu Editor

Activates the submenu editor.  To add an item to a submenu, just drag it from the submenu editor list.


Customization Form - Options Page

The Options page allows you to customize the behavior of all toolbars on a form.  The Options page is visible at runtime.

Click a page or the corresponding link below to learn more about it.

Toolbars Page

Commands Page

All Commands Page

Groups Page

The Options page contains the following controls:

Menus show recently used commands first

If this check box is active, the most frequently used menu items are "promoted"; the least frequently used items are hidden.

Show full menus after a short delay

This option is used only if Menus show recently used commands first is checked.  If Show full menus after a short delay is active, after a short delay, menus will display both the most frequently used and the least frequently used items.

Reset my usage data

Resets all toolbar settings, made by a user (layout of item controls, the list of the most frequently used items, etc.).  Toolbar properties are set to the values specified by a programmer.  This button is available at runtime.

Large Icons

If active, large toolbar images are displayed.  This check box has the same impact as the LargeIcons property of the bar manager.

Show ToolTips on toolbars

If active, hints for toolbar items are displayed.  This check box has the same impact as the ShowHint property of the bar manager.

Show shortcut keys in ToolTips

If active, hints contain the shortcuts used to activate an item.  This check box has the same impact as the ShowShortCutInHint property of the bar manager.  It is used only if Show ToolTips on toolbars is active.

Menu animations

Specifies the style by which a menu activates.  It is similar to the MenuAnimations property of the bar manager.


Customization Form - All Commands Page

The All Commands page contains a list of all existing items for a form.

Click a page or the corresponding link below to learn more about it.

Toolbars Page

Commands Page

Options Page

Groups Page

This page is invisible at runtime.  At design time, It visually represents all existing items on screen and displays the shortcuts used to activate these items.  You can use this page to quickly isolate items with identical shortcuts.

If the Show commands that may have a shortcut check box is active; the list is organized by item names and contains only those items for which you can specify shortcuts.


Customization Form - Groups Page

The Groups page contains two panels: One represents a list of existing groups and the other - a list of items from these groups.

Click a page or use the corresponding link below to learn more about it.

Toolbars Page

Commands Page

Options Page

All Commands Page

This page is invisible at runtime.  At design time, you can use this page to quickly enable/disable (or make visible/invisible) items of a particular group.

The following buttons are available on this page:

Add (Groups)

Creates a new group.

Delete (Groups)

Deletes the selected group.

Add (Items)

Adds a new item (or items) to a group.

Delete (Items)

Deletes the selected item from a group.

 Moves the selected group up.

 Moves the selected group down.

To customize properties of a specific group, select it from the toolbar list and then switch to the Object Inspector.


List of Existed Toobars
List of Existing Toolbars


The Help Button


List of Categories


List of Items


List of Groups


List of Grouped Items


How to Add Existing Buttons to a Toolbar (C++Builder)

// C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)

{

 TdxBarItemLink * NewItemLink;

 dxBarManager->Bars->Items[1]->LockUpdate = true;

 dxBarManager->Bars->Items[1]->ItemLinks->Add()->Item = btnCut;

 NewItemLink = dxBarManager->Bars->Items[1]->ItemLinks->Add();

 NewItemLink->Item = btnCopy;

 NewItemLink->UserPaintStyle = psCaptionGlyph;

 NewItemLink = dxBarManager->Bars->Items[1]->ItemLinks->Add();

 NewItemLink->BeginGroup = true;

 NewItemLink->Item = cbFontName;

 NewItemLink->UserWidth = 150;

 dxBarManager->Bars->Items[1]->LockUpdate = false;

}


How to Create Items at Runtime and Place them onto a Toolbar or a Sub Menu (C++Builder)

// C++ Builder

void __fastcall TMainForm::btnCustomColorClick(TObject * Sender)

{

  TdxBarColorCombo * cbColor;

  TColorDialog * ColorDialog;

  cbColor = (TdxBarColorCombo *)((TdxBarButton *)Sender)->Tag;

  ColorDialog = new TColorDialog(this);

  ColorDialog->Color = cbColor->Color;

  if (ColorDialog->Execute() )

    cbColor->Color = ColorDialog->Color;

  delete ColorDialog;

}

void __fastcall TForm1::FormCreate(TObject *Sender)

{

  TdxBarColorCombo * cbColor;

  TdxBarButton * btnCustomColor;

  TdxBarItemLink * NewItemLink;

  cbColor = new TdxBarColorCombo(this);

  cbColor->Caption = "Color";

  cbColor->Color = clAqua;

  btnCustomColor = new TdxBarButton(this);

  btnCustomColor->Caption = "...";

  btnCustomColor->Hint = "Click to select custom color";

  btnCustomColor->PaintStyle = psCaption;

  btnCustomColor->Tag = (int) cbColor;

  btnCustomColor->OnClick = btnCustomColorClick;

  // Adds an item to a sub menu

  siFormat->ItemLinks->Add()->Item = cbColor;

  // Adds an item to a toolbar

  dxBarManager->Bars->Items[2]->LockUpdate = true;

  NewItemLink = dxBarManager->Bars->Items[2]->ItemLinks->Add();

  NewItemLink->Item = cbColor;

  NewItemLink->Index = 0;

  NewItemLink->BringToTopInRecentList(false);

  NewItemLink = dxBarManager->Bars->Items[2]->ItemLinks->Add();

  NewItemLink->Item = btnCustomColor;

  NewItemLink->Index = 1;

  NewItemLink->BringToTopInRecentList(false);

  dxBarManager->Bars->Items[2]->LockUpdate = false;

}


How to Create a Popup Menu at Runtime (C++Builder)

// C++ Builder

const int ButtonCount = 5;

const AnsiString Captions[ButtonCount] = {"Cu&t", "&Copy", "&Paste", "Cle&ar", "&Select All"};

void __fastcall TMainForm1::PopupMenuButtonClick(TObject * Sender)

{

 switch( ((TdxBarButton *)Sender)->Tag )

 {

  case 1: Memo1->CutToClipboard(); break;

  case 2: Memo1->CopyToClipboard(); break;

  case 3: Memo1->PasteFromClipboard(); break;

  case 4: Memo1->ClearSelection(); break;

  case 5: Memo1->SelectAll(); break;

 }

}

void __fastcall TMainForm1::Memo1MouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y)

{

  TdxBarPopupMenu * PopupMenu;

  int I;

  TdxBarButton * Buttons[ButtonCount];

  TdxBarItemLink * NewItemLink;

  if (Button == mbRight)

  {

    PopupMenu = new TdxBarPopupMenu(this);

    for(I=0;I<ButtonCount;I++)

    {

      Buttons[I] = new TdxBarButton(this);

      Buttons[I]->Caption = Captions[I];

      if (I < ButtonCount-1)

        Buttons[I]->ImageIndex = I;

      Buttons[I]->Tag = I+1;

      Buttons[I]->OnClick = PopupMenuButtonClick;

      NewItemLink = PopupMenu->ItemLinks->Add();

      NewItemLink->BeginGroup = (I == ButtonCount);

      NewItemLink->Item = Buttons[I];

     }

    PopupMenu->PopupFromCursorPos();

    for(I=0;I<ButtonCount;I++)

      delete Buttons[I];

    delete PopupMenu;

  }

}


How to Create a Toolbar and Position it on Screen (C++Builder)

// C++ Builder

TdxBar * CreateBar(TdxBarManager * ABarManager, AnsiString ACaption, TdxBarDockingStyle ADockingStyle, int ARow, int ACol, bool AInsert, bool AVisible)

{

  bool AIsVertical;

  TdxDockRow * ADockRow;

  TdxBar * ANewBar;

  TdxDockCol * ADockCol;

  ANewBar = ABarManager->Bars->Add();

  ANewBar->Caption = ACaption;

  ANewBar->DockingStyle = ADockingStyle;

  if (ARow < 0) ARow = 0;

  ANewBar->Row = ARow;

  ANewBar->OneOnRow = AInsert;

  if (ACol != -1 && ANewBar->DockingStyle != dsNone)

  {

    ANewBar->DockControl = (TdxBarDockControl *)(ABarManager->Bars->DockControls[ANewBar->DockingStyle]);

    if (ANewBar->Row < ANewBar->DockControl->RowList->Count)

    {

      AIsVertical = ((ANewBar->DockingStyle == dsLeft) || (ANewBar->DockingStyle == dsRight));

      ADockRow = (TdxDockRow *)(ANewBar->DockControl->RowList->Items[ANewBar->Row]);

      if (ACol < 0) ACol = 0;

      if (ACol >= ADockRow->ColList->Count)

      {

        ADockCol = (TdxDockCol *) ADockRow->ColList->Last();

        if (AIsVertical)

           ANewBar->DockedTop = ANewBar->DockedTop + ADockCol->BarControl->Height;

        else

           ANewBar->DockedLeft = ANewBar->DockedLeft + ADockCol->BarControl->Width;

      }

      else

      {

         ADockCol = (TdxDockCol*) ADockRow->ColList->Items[ACol];

         if (AIsVertical)

            ANewBar->DockedTop = ADockCol->Pos.y;

         else

            ANewBar->DockedLeft = ADockCol->Pos.x;

       }

    }

  }

    ANewBar->Visible = AVisible;

  return ANewBar;

}


How to Arrange Toolbars (C++Builder)

// C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)

{

  int I, J, Offset;

  TdxDockRow * DockRow;

  TdxDockCol * DockCol;

  dxBarManager1->LockUpdate = true;

  for(J=0;J<dxBarManager1->Bars->DockControls[dsTop]->RowList->Count;J++)

  {

    DockRow = (TdxDockRow *)(dxBarManager1->Bars->DockControls[dsTop]->RowList->Items[J]);

    Offset = 0;

    for(I=0;I<DockRow->ColList->Count;I++)

    DockCol = (TdxDockCol *) DockRow->ColList->Items[I];

    DockCol->Pos = Point(Offset, DockCol->Pos.y);

    Offset += DockCol->BarControl->Width;

  }

  dxBarManager1->LockUpdate = false;

}


How to Add Custom Items to a Toolbar's Popup Menu (C++Builder)

// C++ Builder

TdxBarButton * btnShowCaptions;

void __fastcall TForm1::btnShowCaptionsClick(TObject * Sender)

{

  dxBarManager1->LockUpdate = true;

  for(int I = 0;I<dxBarManager1->ItemCount;I++)

    if (String(dxBarManager1->Items[I]->ClassName()) == "TdxBarLargeButton")

    {

      ((TdxBarLargeButton *)(dxBarManager1->Items[I]))->ShowCaption =

        btnShowCaptions->Down;

      if (((TdxBarLargeButton *)(dxBarManager1->Items[I]))->ShowCaption)

        ((TdxBarLargeButton *)(dxBarManager1->Items[I]))->Width = 50;

      else

        ((TdxBarLargeButton *)(dxBarManager1->Items[I]))->Width = 0;

    }

 dxBarManager1->LockUpdate = false;

};

void __fastcall TForm1::dxBarManager1ShowToolbarsPopup( TdxBarManager *Sender, TdxBarItemLinks *PopupItemLinks)

{

  TdxBarItemLink * NewItemLink;

  if (btnShowCaptions == NULL)

  {

    btnShowCaptions = new TdxBarButton(this);

    btnShowCaptions->ButtonStyle = bsChecked;

    btnShowCaptions->Caption = "Show Captions";

    btnShowCaptions->Down = true;

    btnShowCaptions->OnClick = btnShowCaptionsClick;

  }

    NewItemLink = PopupItemLinks->Add();

    NewItemLink->BeginGroup = true;

    NewItemLink->Item = btnShowCaptions;

}


How to Create Several Item Controls for the Same Underlying Item (C++Builder)

// C++ Builder

Unit1.h

#ifndef Unit1H

#define Unit1H

#include <Classes.hpp>

#include <Controls.hpp>

#include <StdCtrls.hpp>

#include <Forms.hpp>

#include "dxBar.hpp"

#include "dxBarExtItems.hpp"

class TForm1 : public TForm

{

__published:	// IDE-managed Components

    TdxBarManager *dxBarManager;

    TButton * CreateColorBarButton;

    void __fastcall CreateColorBarButtonClick(TObject *Sender);

    void __fastcall dxBarManagerBarDockingStyleChange( TdxBarManager *Sender, TdxBar *ABar);

private:	// User declarations

    TdxBar * barColor;

    void __fastcall btnColorClick(TObject * Sender);

public:	// User declarations

    __fastcall TForm1(TComponent* Owner);

};

extern PACKAGE TMainForm MainForm;

#endif

// C++ Builder

Unit1.cpp

#include <vcl.h>

#pragma hdrstop

#include "Unit1.h"

//-------------------------------------------------------------

#pragma package(smart_init)

#pragma link "dxBar"

#pragma link "dxBarExtItems"

#pragma resource "*.dfm"

TForm1 *Form1;

//-------------------------------------------------------------

__fastcall TMainForm::TMainForm(TComponent* Owner) : TForm(Owner)

{

}

const AnsiString Captions[] = {"Black", "Maroon", "Green", "Olive", "Navy", "Purple", "Teal", "Gray", "Silver", "Red", "Lime", "Yellow", "Blue", "Fuchsia", "Aqua", "White"};

const TColor Colors[] = {clBlack, clMaroon, clGreen, clOlive, clNavy, clPurple, clTeal, clGray, clSilver, clRed, clLime, clYellow, clBlue, clFuchsia, clAqua, clWhite};

void __fastcall TMainForm::Button1Click(TObject *Sender)

{

  TdxBarButton * btnColor;

  Graphics::TBitmap * B;

  int I;

  TdxBarItemLink * NewItemLink;

  // Creates a new item

  btnColor = new TdxBarButton(this);

  btnColor->PaintStyle = psCaptionGlyph;

  btnColor->OnClick = btnColorClick;

  // Creates a new toolbar for new item controls

  barColor = dxBarManager1->Bars->Add();

  barColor->AllowCustomizing = false;

  barColor->Caption = "Color";

  // Creates a bitmap drawn on an item control surface

  B = new Graphics::TBitmap;

  B->Width = 18;

  B->Height = 16;

  // For transparent color

  B->Canvas->Brush->Color = clBtnFace;

  B->Canvas->FillRect(Rect(0, 0, B->Width, B->Height));

  // Draws a frame

  B->Canvas->Brush->Color = clBtnShadow;

  B->Canvas->FrameRect(Rect(1, 0, B->Width - 1, B->Height));

  // Creates item controls on a new toolbar

  for(I=0;I<16;I++)

  {

    NewItemLink = barColor->ItemLinks->Add();

    NewItemLink->Data = Colors[I];

    NewItemLink->Item = btnColor;

    NewItemLink->UserCaption = Captions[I];

    B->Canvas->Brush->Color = Colors[I];

    B->Canvas->FillRect(Rect(2, 1, B->Width - 2, B->Height - 1));

    NewItemLink->UserGlyph = B;

  }

  // Creats the 16th item control

  // that calls the color selection dialog

  NewItemLink = barColor->ItemLinks->Add();

  NewItemLink->BeginGroup = true;

  NewItemLink->Data = -1;

  NewItemLink->Item = btnColor;

  NewItemLink->UserCaption = "Custom...";

  NewItemLink->UserPaintStyle = psCaption;

  delete B;

  // Specifies the position and displays a new toolbar on screen

  barColor->FloatLeft = Left - 80;

  barColor->FloatTop = Top;

  barColor->Visible = true;

}

void __fastcall TMainForm::btnColorClick(TObject * Sender)

{

  TColorDialog * ColorDialog;

  if( ((TdxBarButton *)Sender)->ClickItemLink->Data == -1)

  {

    ColorDialog = new TColorDialog(NULL);

    ColorDialog->Color = this->Color;

    if (ColorDialog->Execute())

          this->Color = Color;

    delete ColorDialog;

   }

   else

     Color = (TColor)(((TdxBarButton *)Sender)->ClickItemLink->Data);

}

void __fastcall TMainForm::dxBarManager1BarDockingStyleChange( TdxBarManager *Sender, TdxBar *ABar)

{

  TdxBarButton * Button;

  if (ABar == barColor)

  ABar->LockUpdate = true;

  Button = (TdxBarButton *)(ABar->ItemLinks->Items[0]->Item);

  if (ABar->DockingStyle == dsNone)

    Button->PaintStyle = psCaptionGlyph;

  else

    Button->PaintStyle = psStandard;

  ABar->LockUpdate = false;

}


How to Create a List of MDI Child Windows (C++Builder)

// C++ Builder

Unit1.h

#ifndef Unit1H

#define Unit1H

//-------------------------------------------------------

#include <Classes.hpp>

#include <Controls.hpp>

#include <StdCtrls.hpp>

#include <Forms.hpp>

#include "dxBar.hpp"

#include "dxBarExtItems.hpp"

#include "Unit2.h"

//-------------------------------------------------------

class TMainForm : public TForm

{

__published:	// IDE-managed Components

    TdxBarManager *dxBarManager1;

    TButton *Button1;

    TdxBarListItem *dxBarListWindows;

    void __fastcall dxBarListWindowsClick(TObject *Sender);

    void __fastcall dxBarListWindowsGetData(TObject *Sender);

    void __fastcall Button1Click(TObject *Sender);

private:	// User declarations

    TdxBar * barColor;

public:	// User declarations

    int CreatedMDICount;

    __fastcall TMainForm(TComponent* Owner);

};

//-------------------------------------------------------

extern PACKAGE TMainForm *MainForm;

//-------------------------------------------------------

#endif

// C++ Builder

Unit1.cpp

#include <vcl.h>

#pragma hdrstop

#include "Unit1.h"

//-------------------------------------------------------

#pragma package(smart_init)

#pragma link "dxBar"

#pragma link "dxBarExtItems"

#pragma resource "*.dfm"

TMainForm *MainForm;

//-------------------------------------------------------

__fastcall TMainForm::TMainForm(TComponent* Owner)

    : TForm(Owner)

{

}

//-------------------------------------------------------

void __fastcall TMainForm::dxBarListWindowsClick(TObject *Sender)

{

  ((TCustomForm *) dxBarListWindows->Items->Objects[dxBarListWindows->ItemIndex])->Show();

}

//-------------------------------------------------------

void __fastcall TMainForm::dxBarListWindowsGetData(TObject *Sender)

{

  dxBarListWindows->ItemIndex = dxBarListWindows->Items->IndexOfObject(ActiveMDIChild);

}

//-------------------------------------------------------

void __fastcall TMainForm::Button1Click(TObject *Sender)

{

  new TChildForm(Application);

}

// C++ Builder

Unit2.h

#ifndef Unit2H

#define Unit2H

//---------------------------------------------------------------------------

#include <Classes.hpp>

#include <Controls.hpp>

#include <StdCtrls.hpp>

#include <Forms.hpp>

#include "Unit1.h"

//------------------------------------------------------

class TChildForm : public TForm

{

__published:	// IDE-managed Components

    void __fastcall FormCreate(TObject *Sender);

    void __fastcall FormClose(TObject *Sender, TCloseAction &Action);

    void __fastcall FormDestroy(TObject *Sender);

private:	// User declarations

public:	// User declarations

    __fastcall TChildForm(TComponent* Owner);

};

//-------------------------------------------------------

extern PACKAGE TChildForm *ChildForm;

//-------------------------------------------------------

#endif

// C++ Builder

Unit 2.cpp

#include <vcl.h>

#pragma hdrstop

#include "Unit2.h"

//-------------------------------------------------------

#pragma package(smart_init)

#pragma resource "*.dfm"

TChildForm *ChildForm;

//-------------------------------------------------------

__fastcall TChildForm::TChildForm(TComponent* Owner) : TForm(Owner)

{

}

//-------------------------------------------------------

void __fastcall TChildForm::FormCreate(TObject *Sender)

{

  MainForm->CreatedMDICount ++;

  Caption = "Document" + IntToStr(MainForm->CreatedMDICount);

  MainForm->dxBarListWindows->Items->AddObject(Caption, this);

}

//--------------------------------------------------------

void __fastcall TChildForm::FormClose(TObject *Sender, TCloseAction &Action)

{

 Action = caFree;

}

//--------------------------------------------------------

void __fastcall TChildForm::FormDestroy(TObject *Sender)

{

  MainForm->dxBarListWindows->Items->Delete(

    MainForm->dxBarListWindows->Items->IndexOfObject(this));

}


How to Associate TdxBarPopupMenu with Controls

Now you can associate a TdxBarPopupMenu with any control on a form.  TdxBarPopupMenu will be displayed by right-clicking the appropriate control.

You should use the PopupMenuLinks property of a TdxBarManager object in order to tie a control and a TdxBarPopupMenu.

Follow these steps to associate a control with a TdxBarPopupMenu at design-time:

1.	Select this property in the Object Inspector.

2.	Press the ellipsis button (‘...’) in the PopupMenuLinks edit field to display a dialog window with a list all existing menu links.

3.	Press the Add button to add a new popup menu link or choose a popup menu link for editing.  Switch to the Object Inspector and specify which control will be associated with TdxBarPopupMenu.

Note:	If a control is associated with several TdxBarPopupMenu objects, it only uses the top menu from the links menu.  All the rest are ignored.

The code below demonstrates how you can associate a control with a TdxBarPopupMenu programmatically:

// Delphi

var

  NewMenuLink : TdxBarPopupMenuLink;

begin

  NewMenuLink := dxBarManager1.PopupMenuLinks.Add;

  NewMenuLink.Control := Edit1;

  NewMenuLink.PopupMenu := dxBarPopupMenu1;

end;

// C++Builder

TdxBarPopupMenuLink * NewMenuLink;

NewMenuLink = dxBarManager1->PopupMenuLinks->Add();

NewMenuLink->Control = Edit1;

NewMenuLink->PopupMenu = dxBarPopupMenu1;


TdxBarControlContainerItem

Hierarchy          Properties          Methods          Events

TdxBarControlContainerItem is used to incorporate external controls onto toolbars.

Unit

dxBarExtItems

TdxBarControlContainerItem = class(TdxBarItem);

Description

TdxBarControlContainerItem items are used to represent different external controls on toolbars.  This object acts as a container for any component supported by Delphi or C++ Builder.  You can place it onto a form and assign it via the Control property.

	Assigning the PageControl1 object to the dxBarControlContainerItem1 at design-time.
	The dxBarControlContainerItem1 represents the PageControl1 object at runtime.

Note that only basic controls are eligible to be put into the submenus.  In other words, those controls should not have window handles.

Only one instance of an external control should be visible when running an application, therefore set the Visible property of the external control to False in order to provide faultless functionality.


Hierarchy

TComponent

     |

TdxBarItem

     |


TdxBarControlContainerItem Properties

TdxBarControlContainerItem          Legend

In TdxBarControlContainerItem

Control

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

UnclickingAfterDoing

Visible

VisibleForUser


TdxBarControlContainerItem Methods

TdxBarControlContainerItem          Legend

Derived form TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarControlContainerItem Events

TdxBarControlContainerItem          Legend

Derived form TdxBarItem

OnClick

OnCreate

OnDestroy


TdxBarControlContainerItem.Control

TdxBarControlContainerItem

Determines the external control to display within a toolbar.

property Control: TControl;

Description

Use the Control property to specify a visual control to display within your toolbar.  First, place the desired control onto a form and assign it to the appropriate TdxBarControlContainerItem object.  Next, set the Visible property of the external control to False. The desired control will now be displayed as an element of the toolbar.


TdxBarControlContainerControl

Hierarchy          Properties          Methods

Represents a toolbar container control.

Unit

dxBarExtItems

TdxBarControlContainerControl = class(TdxBarItemControl);

Description

TdxBarControlContainerControl represents TdxBarControlContainerItem items on toolbars.  It is responsible for the display of external controls.


Hierarchy

TObject

     |

TdxBarItemControl

     |


TdxBarControlContainerControl Properties

TdxBarControlContainerControl          Legend

In TdxBarControlContainerControl

Item

Derived from TdxBarItemControl

BarManager

 	Caption

 	Enabled

 	Glyph

HasWindow

 	Height

 	Hint

IsActive

IsSelected

 	ImageIndex

 	Images

ItemLink

Parent

 	Pressed

 	ShortCut

 	Width


TdxBarControlContainerControl Methods

TdxBarControlContainerControl          Legend

Derived form TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged


TdxBarControlContainerControl.Item

TdxBarControlContainerControl

Specifies an item linked to an item control.

property Item: TdxBarControlContainerItem;

Description

The TdxBarItemLink object defines the link between an item and the item control.  The Item property returns the item of the appropriateTdxBarItemLink object.

ReadOnly Property


TdxBarProgressItem

Hierarchy          Properties          Methods          Events

TdxBarProgressItem is used to represent a progress bar within toolbars.

Unit

dxBarExtItems

TdxBarProgressItem = class(TdxBarStatic);

Description

TdxBarProgressItem allows you to incorporate a progress meter for lengthy application processes.  You can set the possible range and current position.  Range represents the duration of the actual operation.

Current position represents the progress towards the completion of this operation.  You can write code to change the progress bar position in response to certain events at runtime.

For instance, if your application performs file loading operations, you can adjust the progress bar position to visualize file loading process.

File loading has started:

File loading is about to finish:


Hierarchy

TComponent

     |

TdxBarItem

     |

TdxBarStatic

     |


TdxBarProgressItem Properties

TdxBarProgressItem           Legend

In TdxBarProgressItem

Color

Max

Min

Position

Smooth

Step

Derived from TdxBarStatic

Alignment

AllowClick

BorderStyle

Height

LeftIndent

RightIndent

ShowCaption

Width

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

UnclickingAfterDoing

Visible

VisibleForUser


TdxBarProgressItem Methods

TdxBarProgressItem           Legend

In TdxBarProgressItem

SetParams

StepBy

StepIt

Derived from TdxBarStatic

CanClicked

HasAccel

Derived from TdxBarItem

ActionChange

BarManagerChanged

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarProgressItem Events

TdxBarProgressItem           Legend

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TdxBarProgressItem.Color

TdxBarProgressItem

Specifies the color of the progress bar.

property Color: TColor;

Description

Use the Color property to modify the color of the progress bar.  Note that if the currently applied XP theme is used to paint bars, the Color property value is ignored.  The color of the progress bar is determined by the theme in this instance.  Please refer to the Style property of the bar manager for details on changing the painting style of bars.

The default value of the Color property is clDefault.


TdxBarProgressItem.Max

TdxBarProgressItem          See Also

Determines the maximum position of a progress bar item.

property Max: Integer;

Description

Use the Max property to determine the completion point of a specific operation. The default value is 100.


TdxBarProgressItem.Min

TdxBarProgressItem          See Also

Determines the minimum position of a progress bar.

property Min: Integer;

Description

Use the Min property to determine the initial point of a specific operation. The default value is 0.


TdxBarProgressItem.Position

TdxBarProgressItem          See Also

Determines the current position of a progress bar.

property Position: Integer;

Description

Use the Position property to determine the current progress of the actual operation.  The default value is 0.

Note: The Position property must be greater than or equal to the Min property, and less than or equal to the Max property.


TdxBarProgressItem.Smooth

TdxBarProgressItem

Specifies the bar drawing style of a progress indicator.

property Smooth: Boolean;

Description

Set the Smooth property to True to draw a progress indicator as a rectangle filled with a solid color.  Set the Smooth property to False to draw a progress indicator as a rectangle filled with a solid color and divided by sections (small rectangles).  The default value is False.

	The Smooth property is set to False.
	The Smooth property is set to True.


TdxBarProgressItem.Step

TdxBarProgressItem          See Also

Determines the step increment for a progress bar.

property Step: Integer;

Description

Use the Step property to specify the granularity of the progress bar.  This property should reflect the size of each step in the process tracked by the progress bar in the logical units used by the Max and Min properties. The step increment is the value by which a progress bar increases its current position whenever the StepIt method is called.  By default, the step increment is set to 10.


TdxBarProgressItem.SetParams

TdxBarProgressItem

Sets the initial parameters for a progress bar item.

procedure SetParams(AMin, AMax: Integer);

Description

Call the SetParams method to set a new range for a progress bar.  The AMin parameter determines the initial value. The AMax parameter determines the maximum value.  If the Position property value is greater than the AMax parameter, its value is set to the maximum value.  If the Position property value is less than the AMin parameter, its value is set to the minimum value.


TdxBarProgressItem.StepBy

TdxBarProgressItem           See Also

Expands bar indicator position.

procedure StepBy(Delta: Integer);

Description

Call the StepBy method to expand the current position of a progress bar by the value specified by the Delta parameter.  Unlike the StepIt method, which expands the progress bar indicator by the value predefined via the Step property, this method can expand the bar indicator position by any value.


TdxBarProgressItem.StepIt

TdxBarProgressItem           See Also

This method adjusts the progress indicator's position.

procedure StepIt;

Description

Call the StepIt method to expand the current position of a progress bar by the step increment’s value and redraw the bar to reflect this new position.  If step increment represents the size of one logical step in the process tracked by the progress bar, call the StepIt after each logical step.  Use the Step property to set the step increment.


TdxBarProgressControl

Hierarchy          Properties          Methods

Represents a toolbar progress bar control.

Unit

dxBarExtItems

TdxBarProgressControl = class(TdxBarStaticControl);

Description

TdxBarProgressControl represents TdxBarProgressItem items on toolbars.  It is responsible for the display and maintenance of progress bar items within a toolbar.


Hierarchy

TObject

     |

TdxBarItemControl

     |

TdxBarStaticControl

     |


TdxBarProgressControl Properties

TdxBarProgressControl           Legend

In TdxBarProgressControl

Item

Derived form TdxBarItemControl

BarManager

 	Caption

 	Enabled

 	Glyph

HasWindow

 	Height

 	Hint

IsActive

IsSelected

 	ImageIndex

 	Images

ItemLink

Parent

 	Pressed

 	ShortCut

 	Width


TdxBarProgressControl Methods

TdxBarProgressControl           Legend

Derived form TdxBarStaticControl

CanClicked

GetHeight

GetWidth

IsDestroyOnClick

Derived form TdxBarItemControl

BeginGroupChanged

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged


TdxBarProgressControl.Item

TdxBarProgressControl

Specifies an item linked to a progress bar item control.

property Item: TdxBarProgressItem;

Description

The TdxBarItemLink object defines the link between the item and the progress bar item control. The Item property returns the progress bar item of the appropriateTdxBarItemLink object.

ReadOnly Property


TdxBarMRUListItem

Hierarchy          Properties          Methods          Events

TdxBarMRUListItem is used to represent a list of most recently used (MRU) items within toolbars.

Unit

dxBarExtItems

TdxBarMRUListItem = class(TdxBarListItem);

Description

TdxBarMRUListItem allows you to implement a list of most recently used (MRU) items into your application.  This feature can dramatically extend the functionality of your application.  For instance, you can use this item to display the list of recently used files in a submenu.

This list changes when you close file:

The following procedure adds the closed file to the MRU file list:

procedure TChildForm.FormClose(Sender: TObject; var Action: TCloseAction);

begin

  if MainForm.FileName <> '' then

    MainForm.dxBarMRUFiles.AddItem(MainForm.FileName, nil);

  Action := caFree;

end;

The following procedure uses the MRU list to open one of the recently used files:

procedure TMainForm.dxBarMRUFilesClick(Sender: TObject);

var

  AFileName: String;

begin

  AFileName := dxBarMRUFiles.Items[dxBarMRUFiles.ItemIndex];

  if FileExists(AFileName) then

    with TChildForm.Create(Application) do

    begin

      FileName := AFileName;

      Editor.Lines.LoadFromFile(FileName);

      SetModified(False);

    end

  else

    Application.MessageBox(PChar(AFileName+#10#13+'File not found.'),'Open',MB_OK or MB_ICONERROR)

end;


Hierarchy

TComponent

     |

TdxBarItem

     |

TCustomdxBarSubItem

     |

TCustomdxBarContainerItem

     |

TdxBarListItem

     |


TdxBarMRUListItem Properties

TdxBarMRUListItem           Legend

In TdxBarMRUListItem

MaxItemCount

RemoveItemOnClick

Derived from TdxBarListItem

DataIndex

ItemIndex

Items

ShowCheck

ShowNumbers

Derived from TCustomdxBarSubItem

BarSize

Detachable

DetachingBar

ItemLinks

ShowCaption

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

UnclickingAfterDoing

Visible

VisibleForUser


TdxBarMRUListItem Methods

TdxBarMRUListItem           Legend

In TdxBarMRUListItem

AddItem

RemoveItem

Derived form TCustomdxBarContainerItem

AddListedItemLinks

DeleteListedItemLinks

ClearItemList

Derived from TCustomdxBarSubItem

CanContainItem

DoCloseUp

DoPopup

GetDetachingBar

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarMRUListItem Events

TdxBarMRUListItem           Legend

Derived from TCustomdxBarContainerItem

OnGetData

Derived from TCustomdxBarSubItem

OnCloseUp

OnDetaching

OnPaintBar

OnPopup

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TdxBarMRUListItem.MaxItemCount

TdxBarMRUListItem

Determines the maximum number of most recently used items to display.

property MaxItemCount: Integer;

Description

If there is no need to display all recently used items, use the MaxItemCount property to limit the number of displayed items. The default value is 5.


TdxBarMRUListItem.RemoveItemOnClick

TdxBarMRUListItem

Specifies whether to delete an item from the list of displayed items when clicked.

property RemoveItemOnClick: Boolean;

Description

Set the RemoveItemOnClick property to True to remove the clicked item from the list of the most recently used (MRU) items.  The default value is False.


TdxBarMRUListItem.AddItem

TdxBarMRUListItem

Adds a new item to the list of most recently used (MRU) items.

procedure AddItem(const S: string; AObject: TObject);

Description

Call the AddItem method to add one more item to the MRU items list.  The S parameter determines text displayed within the list for this item (file name, for instance).  The AObject parameter contains associated data for this item.


TdxBarMRUListItem.RemoveItem

TdxBarMRUListItem

Deletes an item from the list of most recently used (MRU) items.

procedure RemoveItem(const S: string; AObject: TObject);

Description

Call the RemoveItem method to delete an item from the MRU items list.  The S parameter determines text displayed within the list for this item (file name, for instance).  The AObject parameter contains associated data for this item.


TdxBarInPlaceSubItem

Hierarchy          Properties          Methods          Events

TdxBarInPlaceSubItem is used to represent subitems on toolbars.

Unit

dxBarExtItems

TdxBarInPlaceSubItem = class(TdxBarContainerItem);

Description

TdxBarInPlaceSubItem is a further control expansion and collapse of your menus - Your Sub-Menus can now behave more like trees.  TdxBarInPlaceSubItem items can be used to represent subitems on toolbars.  Subitems are items that contain other items, specified in the TdxBarManager list.  A TdxBarInPlaceSubItem item can be embedded into another submenu and when clicking this item, its own submenu will be inserted into the parent submenu - unlike an item of the TdxBarSubItem type whose submenu will be displayed as an independent menu.

	SubItems are not expanded.
	SubItems are expanded.


Hierarchy

TComponent

|

TdxBarItem

|

TCustomdxBarSubItem

|

TCustomdxBarContainerItem

|

TdxBarContainerItem


TdxBarInPlaceSubItem Properties

TdxBarInPlaceSubItem          Legend

In TdxBarInPlaceSubItem

Expanded

KeepBeginGroupWhileExpanded

Derived from TCustomdxBarSubItem

BarSize

Detachable

DetachingBar

ItemLinks

ShowCaption

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

BarManager

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Enabled

Glyph

HelpContext

Hint

ImageIndex

Index

LinkCount

Links

ShortCut

UnclickingAfterDoing

Visible

VisibleForUser


TdxBarInPlaceSubItem Methods

TdxBarInPlaceSubItem          Legend

Derived form TdxBarContainerItem

AddListedItemLinks

DeleteListedItemLinks

Derived form TCustomdxBarContainerItem

ClearItemList

Derived from TCustomdxBarSubItem

CanContainItem

DoCloseUp

DoPopup

GetDetachingBar

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarInPlaceSubItem Events

TdxBarInPlaceSubItem          Legend

In TdxBarInPlaceSubItem

OnAfterExpand

OnBeforeCollapse

Derived from TCustomdxBarContainerItem

OnGetData

Derived from TCustomdxBarSubItem

OnCloseUp

OnDetaching

OnPaintBar

OnPopup

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TdxBarInPlaceSubItem.Expanded

TdxBarInPlaceSubItem

Specifies whether the submenu of a specific in-place subitem is expanded.

property Expanded: Boolean;

Description

Set the Expanded property to True to display the submenu of a specific subitem.  The default value is False.


TdxBarInPlaceSubItem.KeepBeginGroupWhileExpanded

TdxBarInPlaceSubItem

Specifies whether to display a group separator.

property KeepBeginGroupWhileExpanded: Boolean;

Description

Set the KeepBeginGroupWhileExpanded property to True to display a group separator after the last item in an item's submenu when expanded.


TdxBarInPlaceSubItem.OnAfterExpand

TdxBarInPlaceSubItem

Occurs when a specific in-place subitem has expanded.

type

  TdxBarInPlaceSubItemEvent = procedure(Sender: TdxBarInPlaceSubItem; Link: TdxBarItemLink) of object;

property OnAfterExpand: TdxBarInPlaceSubItemEvent;

Description

Write an OnAfterExpand event handler to perform specific actions when a submenu has expanded.  The Sender parameter determines the expanded in-place subitem.  The Link parameter contains the item link to the expanded subitem control.


TdxBarInPlaceSubItem.OnBeforeCollapse

TdxBarInPlaceSubItem

Occurs when a specific in-place subitem is about to collapse.

type

  TdxBarInPlaceSubItemEvent = procedure(Sender: TdxBarInPlaceSubItem; Link: TdxBarItemLink) of object;

property OnBeforeCollapse: TdxBarInPlaceSubItemEvent;

Description

Write an OnBeforeCollapse event handler to perform specific actions when the submenu is about to collapse.  The Sender parameter determines the in-place subitem to collapse.  The Link parameter contains the item link to the collapsed subitem control.


TdxBarInPlaceSubItemControl

Hierarchy          Properties          Methods

Represents a toolbar in-place subitem control.

Unit

dxBarExtItems

TdxBarInPlaceSubItemControl = class(TdxBarContainerItemControl);

Description

TdxBarInPlaceSubItemControl represents TdxBarInPlaceSubItem items on toolbars.  Said differently, it is responsible for the display and maintenance of in-place subitems on screen.


Hierarchy

TObject

     |

TdxBarItemControl

     |

TdxBarSubItemControl

     |

TdxBarContainerItemControl

     |


TdxBarInPlaceSubItemControl Properties

TdxBarInPlaceSubItemControl          Legend

In TdxBarInPlaceSubItemControl

Item

Derived from TdxBarSubItemControl

SubMenuControl

Derived from TdxBarItemControl

BarManager

 	Caption

 	Enabled

 	Glyph

HasWindow

 	Height

 	Hint

IsActive

IsSelected

 	ImageIndex

 	Images

ItemLink

Parent

 	Pressed

 	ShortCut

 	Width


TdxBarInPlaceSubItemControl Methods

TdxBarInPlaceSubItemControl          Legend

Derived from TdxBarContainerItemControl

CreateSubMenuControl

Derived from TdxBarSubItemControl

GlyphChanged

CanClicked

ControlClick

GetDefaultHeight

GetDefaultWidth

Derived from TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

HasHint

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged


TdxBarInPlaceSubItemControl.Item

TdxBarInPlaceSubItemControl

Specifies an item linked to an in-place subitem control.

property Item: TdxBarInPlaceSubItem;

Description

The TdxBarItemLink object defines the link between an in-place subitem and the in-place subitem control.  The TdxBarInPlaceSubItem property returns the in-place subitem of the appropriateTdxBarItemLink object.

.

ReadOnly Property


TdxBarColorComboControl

Hierarchy          Properties          Methods

Represents a toolbar color combo control.

Unit

dxBarExtItems

TdxBarColorComboControl = class(TdxBarComboControl);

Description

TdxBarColorComboControl represents TdxBarColorCombo items on toolbars.  Said differently, it is responsible for the display and maintenance of color combo items on screen and allows users to select colors from a combo box.


Hierarchy

TObject

     |

TdxBarItemControl

     |

TdxBarWinControl

     |

TdxBarEditControl

     |

TCustomdxBarComboControl

     |

TdxBarComboControl

     |


TdxBarColorComboControl Properties

TdxBarColorComboControl           Legend

In TdxBarColorComboControl

Item

Derived from TdxBarComboControl

 	ItemIndex

 	Items

LocalItemIndex

 	Sorted

Derived from TCustomdxBarComboControl

DropDownButtonRect

DropDownWindow

DroppedDown

Derived from TdxBarEditControl

 	CaptionWidth

 	MaxLength

 	ReadOnly

 	ShowCaption

Derived from TdxBarWinControl

Handle

Focused

Text

WindowRect

Derived from TdxBarItemControl

BarManager

 	Caption

 	Enabled

 	Glyph

HasWindow

 	Height

 	Hint

IsActive

IsSelected

 	ImageIndex

 	Images

ItemLink

Parent

 	Pressed

 	ShortCut

 	Width


TdxBarColorComboControl Methods

TdxBarColorComboControl           Legend

Derived from TCustomdxBarComboControl

ControlInactivate

Derived from TdxBarEditControl

WidthChanged

Derived from TdxBarWinControl

CanClicked

ControlClick

IsDestroyOnClick

WndProc

Derived from TdxBarItemControl

BeginGroupChanged

CaptionChanged

Click

ControlActivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged


TdxBarColorComboControl.Item

TdxBarColorComboControl

Specifies an item linked to a color combo control.

property Item: TdxBarColorCombo;

Description

The TdxBarItemLink object defines the link between a color combo item and the color combo item control. The Item property returns the color combo item of the appropriate TdxBarItemLink object.

ReadOnly Property


TdxBarDateComboControl

Hierarchy          Properties          Methods

Represents a toolbar date combo control.

Unit

dxBarExtItems

TdxBarDateComboControl = class(TCustomdxBarComboControl);

Description

TdxBarDateComboControl represents TdxBarDateCombo items on toolbars.  Said differently, it is responsible for the display and maintenance of date combo items on screen and provides users with quick and easy date selection.


Hierarchy

TObject

     |

TdxBarItemControl

     |

TdxBarWinControl

     |

TdxBarEditControl

     |

TCustomdxBarComboControl

     |


TdxBarDateComboControl Properties

TdxBarDateComboControl           Legend

In TdxBarDateComboControl

Date

Item

Derived from TCustomdxBarComboControl

DropDownButtonRect

DropDownWindow

DroppedDown

Derived from TdxBarEditControl

 	CaptionWidth

 	MaxLength

 	ReadOnly

 	ShowCaption

Derived from TdxBarWinControl

Handle

Focused

Text

WindowRect

Derived from TdxBarItemControl

BarManager

 	Caption

 	Enabled

 	Glyph

HasWindow

 	Height

 	Hint

IsActive

IsSelected

 	ImageIndex

 	Images

ItemLink

Parent

 	Pressed

 	ShortCut

 	Width


TdxBarDateComboControl Methods

TdxBarDateComboControl           Legend

Derived from TCustomdxBarComboControl

ControlInactivate

Derived from TdxBarEditControl

WidthChanged

Derived from TdxBarWinControl

CanClicked

ControlClick

IsDestroyOnClick

WndProc

Derived from TdxBarItemControl

BeginGroupChanged

CaptionChanged

Click

ControlActivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged


TdxBarDateComboControl.Date

TdxBarDateComboControl

Contains the date to display within a control.

property Date: TDateTime;

Description

This property is used internally to provide the date to display within a date combo control.


TdxBarDateComboControl.Item

TdxBarDateComboControl

Specifies an item linked to a date combo control.

property Item: TdxBarDateCombo;

Description

The TdxBarItemLink object defines the link between a date combo item and the date combo item control. The Item property returns the date combo item of the appropriateTdxBarItemLink object.

ReadOnly Property


dxBarColorDialog

Unit

dxBarExtItems

function dxBarColorDialog: TColorDialog;

Description

The dxBarColorDialog function returns the color dialog object that is used by a color combo item to pick an appropriate color.


dxBarFontDialog

Unit

dxBarExtItems

function dxBarFontDialog: TFontDialog;

Description

The dxBarFontDialog function returns the font dialog object that is used by a font name combo item to pick an appropriate font.


TdxBarGroup

Hierarchy          Properties          Methods

TdxBarGroup is an object that represents grouped items and/or other groups.

Unit

dxBar

TdxBarGroup = class(TComponent);

Description

A group can contain both items and other groups.  This feature allows you to create logical groups and manage the visibility and accessibility of multiple items simultaneously.  The TdxBarGroup object contains a list of items and/or groups.  You can access any grouped item or group using its position within a given group’s zero-based indexed collection which is accessible via the Items property.  The first item has an index of 0.  The number of items in a group is stored in the Count property.


Hierarchy

TComponent

     |


TdxBarGroup Properties

TdxBarGroup           Legend

In TdxBarGroup

BarManager

Count

Enabled

Index

Items

Visible


TdxBarGroup Methods

TdxBarGroup           Legend

In TdxBarGroup

Add

Delete

IndexOf

Move

Remove


TdxBarGroup.BarManager

TdxBarGroup

Provides access to the bar manager to which the current group belongs.

property BarManager: TdxBarManager;

Description

Use the BarManager property to access the bar manager to which the current group belongs.

ReadOnly Property


TdxBarGroup.Count

TdxBarGroup

Returns the number of items in a group.

property Count: Integer;

Description

The Count property contains the number of grouped items in a group.  Since the item array is zero-based, the Count value is always one greater than the index of the last member of the item array.

ReadOnly Property


TdxBarGroup.Index

TdxBarGroup

Specifies group index in the TdxBarManager.Groups list.

property Index: Integer;

Description

The Index property returns the index of a given group in the list represented by the Groups property of the TdxBarManager.  The first item index is 0.


TdxBarGroup.Items

TdxBarGroup

Contains a list of grouped items.

property Items[Index: Integer]: TComponent;

Description

Items are the elements to display within a toolbar(s).  You can arrange these items in groups.  This property returns the grouped item specified by the Index parameter.  The first item index is 0.  The number of items is stored in the Count property.

ReadOnly Property


TdxBarGroup.Enabled

TdxBarGroup

Specifies whether grouped items respond to mouse, keyboard, and timer events.

property Enabled: Boolean;

Description

Use the Enabled property to change grouped item controls available to the end users.  To disable controls, set the Enabled property to False.  All item controls that correspond to a given group will be disabled.  If False, grouped item controls ignore mouse and keyboard events.


TdxBarGroup.Visible

TdxBarGroup

Determines whether group items are displayed on screen.

type

  TdxBarItemVisible = (ivNever, ivInCustomizing, ivAlways);

property Visible: TdxBarItemVisible;

Description

All the items that belong to the current group are non-visual objects, therefore, the Visible property affects appearance style:

Value	Meaning
ivAlways	Grouped item controls are visible at design and runtime.
ivNever	Grouped item controls are not visible at runtime.
ivInCustomizing	Grouped item controls are visible only during toolbar customization.

The default value is ivAlways.


TdxBarGroup.Add

TdxBarGroup

Adds a new item to the group item list.

procedure Add(AItem: TComponent);

Description

Use the Add method to create a new item (or a new group) within the current group.  When adding a new group to the current group, all added group items become current group members.


TdxBarGroup.Delete

TdxBarGroup

Deletes an item from the group item list.

procedure Delete(Index: Integer);

Description

Use the Delete method to delete an item from the current group.  This method deletes the item specified by the Index parameter from the group item list.


TdxBarGroup.IndexOf

TdxBarGroup

Returns the grouped item index.

function IndexOf(AItem: TComponent): Integer;

Description

Returns the index within the Items array of the item specified by the AItem parameter.  The first item index in a group is 0.


TdxBarGroup.Move

TdxBarGroup

Moves a group item to a new position.

procedure Move(FromIndex, ToIndex: Integer);

Description

Moves an item inside the current group item list from its current position specified by the FromIndex parameter to a new position specified by the ToIndex parameter.  This method is called when you press the arrow buttons within the Groups page of the customization form.


TdxBarGroup.Remove

TdxBarGroup

Deletes an item from the grouped items list.

procedure Remove(AItem: TComponent);

Description

Call the RemoveItem method to delete an item from the grouped items list.  The AItem parameter represents the object to delete.


TdxBarDockControl

Hierarchy          Properties          Methods

TdxBarDockControl is an object that represents an external dock control on a form.

Unit

dxBar

TdxBarDockControl = class(TdxDockControl);

Description

The ExpressBars allows you to use external dock controls. An external dock control is an addition to internal default dock controls of a bar manager.  You can place an external dock control to any position on a form and then embed a toolbar in it.  Visually this control appears as a rectangle on the top/bottom/right/left side of the form or floats over it.  Each dock control can hold several toolbars within it.  TdxBarDockControl is a direct descendant of TdxDockControl and inherits all its functionality.


Hierarchy

TCustomControl

|

TdxDockControl


TdxBarDockControl Properties

TdxBarDockControl           Legend

In TdxBarDockControl

Align

AllowDocking

AllowZeroSizeInDesignTime

Color

ParentColor

SunkenBorder

UseOwnColor

UseOwnSunkenBorder

Derived from TdxDockControl

BackgroundBitmap

 	BarManager

Bars

DockingStyle

RowCount

RowList

Rows


TdxBarDockControl Methods

TdxBarDockControl           Legend

Derived from TdxDockControl

CreateEx


TdxBarDockControl.Align

TdxBarDockControl

Specifies the layout of a specific external dock control.

type

  TdxBarDockAlign = (dalNone, dalTop, dalBottom, dalLeft, dalRight);

property Align: TdxBarDockAlign;

Description

Specifies the side of a form to which an external dock control is docked.  If the daNone setting is enabled, the dock control floats over the form.  Possible values include.

Value	Meaning
dalNone	External dock control is not docked and floats over the form.
dalTop	External dock control is docked to the top of the form.
dalBottom	External dock control is docked to the bottom of the form.
dalLeft	External dock control is docked to left side of the form.
dalRight	External dock control is docked to the right side of the form.


TdxBarDockControl.AllowZeroSizeInDesignTime

TdxBarDockControl

Specifies whether to display an empty external dock control at design time.

property AllowZeroSizeInDesignTime: Boolean;

Description

If the AllowZeroSizeInDesignTime property is set to True and there are no toolbars within it, its Height property is set to 0 and it is invisible.  If the AllowZeroSizeInDesignTime property is set to False, its Height property is equal to 3 pixels, despite the fact it does not contain any toolbar.

The default value is False.


TdxBarDockControl.Color

TdxBarDockControl

Determines the background color within the TdxBarDockControl object area.

property Color;

Description

Use the Color property to read or change the background color within an external dock control.  If the TdxBarDockControl’s ParentColor property is True, then changing the Color property of the TdxBarDockControl’s parent automatically changes the TdxBarDockControl’s Color property.  When the value of the Color property changes, the TdxBarDockControl’s ParentColor property is automatically set to False.


TdxBarDockControl.ParentColor

TdxBarDockControl

Specifies where an external dock control obtains its color information.

property ParentColor: Boolean;

Description

Set the ParentColor property to True to use the same color as its parent control.  If the ParentColor property is False, TdxBarDockControl uses its own Color property value.  When the value of the TdxBarDockControl Color property changes, the ParentColor property is automatically set to False.


TdxBarDockControl.SunkenBorder

TdxBarDockControl

Specifies whether the TdxBarDockControl object has a sunken border.

property SunkenBorder: Boolean;

Description

If the SunkenBorder property is set to True, the TdxBarDockControl object border is drawn using sunken borders.  Otherwise, no border is drawn around the TdxBarDockControl object.


TdxBarDockControl.UseOwnColor

TdxBarDockControl

Specifies whether a TdxBarDockControl uses its own color.

property UseOwnColor: Boolean;

Description

If the UseOwnColor property is set to True, the TdxBarDockControl object uses its own color specified by the Color property.  If the UseOwnColor property is set to False, the TdxBarDockControl object color depends upon the DockColor property of the current TdxBarManager or on the parent control color (if the ParentColor is set to True).

The default value is False.


TdxBarDockControl.UseOwnSunkenBorder

TdxBarDockControl          See Also

Specifies whether a TdxBarDockControl uses its own value to display a border.

property UseOwnSunkenBorder: Boolean;

Description

If the UseOwnSunkenBorder property is set to True, the TdxBarDockControl object uses its own border setting specified by the SunkenBorder property.  If the UseOwnSunkenBorder property is set to False, the TdxBarDockControl border style depends upon the SunkenBorder property of the current TdxBarManager.

The default value is False.


dxStatusBar Unit Overview
dxStatusBar Unit

Classes

TdxCustomStatusBar

TdxStatusBar

TdxStatusBarContainerPanelStyle

TdxStatusBarKeyboardStatePanelStyle

TdxStatusBarKeyStateAppearance

TdxStatusBarPanel

TdxStatusBarPanels

TdxStatusBarPanelStyle

TdxStatusBarStateIndicatorItem

TdxStatusBarStateIndicatorPanelStyle

TdxStatusBarStateIndicators

TdxStatusBarTextPanelStyle

Other Types

TdxStatusBarKeyboardState

TdxStatusBarKeyboardStates

Routines

GetRegisteredStatusBarPanelStyles


TdxStatusBarContainerPanelStyle
TdxStatusBarContainerPanelStyle Object

Hierarchy          Properties          Methods

Represents the object that defines the visual style for the status bar container panels.

Unit

dxStatusBar

TdxStatusBarContainerPanelStyle = class(TdxStatusBarPanelStyle)

Description

The TdxStatusBarContainerPanelStyle class defines the options of style and behavior that are applied to the status bar container panels. Such panels are used for displaying other objects inside the status bar. For example, by using the container panel you may insert images, progress bars, edit controls and other elements into the status bar area.

Below is a sample of the status bar container panel with a progress bar inserted:

Below is an example containing an edit control:


TdxStatusBarContainerPanelStyle Hierarchy
Hierarchy

TPersistent

     |

TdxStatusBarPanelStyle

     |


Properties for TdxStatusBarContainerPanelStyle
TdxStatusBarContainerPanelStyle Properties

TdxStatusBarContainerPanelStyle          Legend

In TdxStatusBarContainerPanelStyle

AlignControl

Derived from TdxStatusBarPanelStyle

Alignment

Color

Font

Owner

ParentFont

StatusBarControl


Methods for TdxStatusBarContainerPanelStyle
TdxStatusBarContainerPanelStyle Methods

TdxStatusBarContainerPanelStyle          Legend

Derived from TdxStatusBarPanelStyle

Assign

BeginUpdate

Create

EndUpdate


TdxStatusBarContainerPanelStyle.AlignControl

TdxStatusBarContainerPanelStyle

Manages the alignment of elements inside the container panel.

property AlignControl: Boolean;

Description

Use the AlignControl property to force objects within a container panel to fill the whole area of the panel. If you have, for example, a progress bar placed inside the container panel, it will be automatically resized to the size of the panel when AlignControl is True. When the AlignControl property is False, the alignment rules of the objects inside the container panel are not overridden.

Value	Design Time	Run Time
True
False

The default value of the AlignControl property is True.


TdxCustomStatusBar
TdxCustomStatusBar Object

Hierarchy          Properties          Events

Serves as the base for advanced status bar controls.

Unit

dxStatusBar

TdxCustomStatusBar = class(TcxControl)

Description

The advanced status bar control allows you to use highly customizable status bars in your applications, thus providing rich functionality and nice visualization features. The advanced status bar control is based on the TdxCustomStatusBar class and it greatly extends the functionality of the standard Win32 status bar. With advanced status bar objects based on the TdxCustomStatusBar class you can:

•	customize the appearance and style of the labels displayed in the status bar

•	insert components into the status bar, by using it as a container

•	automatically track the state of the keyboard special keys, such as CAPS LOCK, NUM LOCK, SCROLL LOCK and INSERT

•	use visual "light" indicators to represent the state of various devices such as modems, network controllers and others

•	and much more.

Do not create instances of the TdxCustomStatusBar class. Use it as the base for your custom classes only. Normally, you will use the TdxStatusBar control, which inherits the features of TdxCustomStatusBar.

Below are the examples of the TdxStatusBar component:


TdxCustomStatusBar Hierarchy
Hierarchy

TcxControl

     |


Properties for TdxCustomStatusBar
TdxCustomStatusBar Properties

TdxCustomStatusBar          Legend

In TdxCustomStatusBar

BorderWidth

Images

LookAndFeel

PaintStyle

Panels

SizeGrip


Events for TdxCustomStatusBar
TdxCustomStatusBar Events

TdxCustomStatusBar          Legend

In TdxCustomStatusBar

OnHint


TdxCustomStatusBar.BorderWidth

TdxCustomStatusBar

Specifies the width of the control’s border.

property BorderWidth: Integer;

Description

The BorderWidth property defines the width of the border drawn around the status bar. This border separates the status bar control area from another controls. By default, BorderWidth is set to 0, which means that there is no extra space between the status bar area and its container. You may assign other values to the BorderWidth property in order to:

•	separate the status bar from its container and other controls (including the main window)

•	have a visible border drawn around the status bar area

The default value of the BorderWidth property is 0.


TdxCustomStatusBar.Images

TdxCustomStatusBar

Specifies the TImageList collection containing bitmaps that you can add to the status bar.

property Images: TCustomImageList;

Description

Use the Images property if you wish to associate a TImageList collection with a status bar text panel. That is useful when you wish to have custom bitmap(s) on your status bar. For example, you may wish to display icons to represent the connection state or a warning sign to inform the user about an abnormal state. You can do that in the following way:

•	add a TImageList collection on your form and load it with bitmaps

•	assign the TImageList object to the Images property of your status bar

•	add a panel to the status bar

•	set TextPanel as its PanelStyle property

•	assign the relevant index to the ImageIndex property of your text panel

As a result, the [image] image is shown in the leftmost section of the sample status bar below:


TdxCustomStatusBar.LookAndFeel

TdxCustomStatusBar          See Also

Specifies the look and feel of the status bar control.

property LookAndFeel: TcxLookAndFeel;

Description

LookAndFeel property settings are only used when the PaintStyle property value is stpsUseLookAndFeel.  Specifying the control paint style via the LookAndFeel property enables you to provide a common look and feel to controls within any application since most Developer Express controls use this technology.  To specify a common paint style for your controls, you need to use the TcxLookAndFeelController component.

The TcxLookAndFeel object returned by the LookAndFeel property provides two properties affecting the control’s appearance.  If the NativeStyle property value is True, the control tries to use the currently applied XP theme.  This is equivalent to setting the PaintStyle property to stpsXP.  If the NativeStyle property value is False or XP themes are not available, the paint style is specified by the Kind property of the TcxLookAndFeel object.  This property has lfStandard, lfFlat and lfUltraFlat options.  Assigning lfStandard or lfFlat has the same result as assigning stpsStandard to the PaintStyle property.  Using the lfUltraFlat value is the same as setting the PaintStyle property to stpsFlat.


TdxCustomStatusBar.PaintStyle

TdxCustomStatusBar          See Also

Specifies status bar paint style.

type

  TdxStatusBarPaintStyle = (stpsStandard, stpsFlat, stpsXP, stpsOffice11, stpsUseLookAndFeel);

property PaintStyle: TdxStatusBarPaintStyle;

Description

Use the PaintStyle property to change the paint style of the status bar.  The table below lists values available for this property.

Value	Description/Example
stpsStandard	Standard paint style is used:
stpsFlat	Flat paint style is used:
stpsXP	XP theme is used.  If the operating system is not Windows XP or the currently applied theme is Windows Classic, stpsStandard is used.
stpsOffice11	Office 11 paint style is used.
stpsUseLookAndFeel	Paint style settings are specified by the LookAndFeel property.


TdxCustomStatusBar.Panels

TdxCustomStatusBar

The collection of status bar panels.

property Panels: TdxStatusBarPanels;

Description

The Panels property holds the collection of the status bar panels (each panel is an instance of the TdxStatusBarPanel class). You may use the Panels property to access the status bar panels at run-time. This allows you to change the properties of the panels themselves and access the objects that are placed within the container-style panels. Use the zero-based index to access particular panels of the status bar.

The example below demonstrates how to change the label displayed on the first (the leftmost) panel of the status bar:

// Delphi

dxStatusBar1.Panels[0].Text := 'Connected';

Before the above code is executed the status bar looked like the following:

After:

In the same way you may access other panels and modify their properties.


TdxCustomStatusBar.SizeGrip

TdxCustomStatusBar

Shows or hides the triangular grip on the status bar.

property SizeGrip: Boolean;

Description

The triangular grip on a status bar prompts the user that the window can be resized by dragging its bottom-right corner.  The SizeGrip property controls whether this grip is visible. However, this property controls the visibility of the grip only. It does not disable or enable resizing of the window.

Below are screenshots of the status bar with and without the grip:

Value	Example
True
False

The default value of the SizeGrip property is True.


TdxCustomStatusBar.OnHint

TdxCustomStatusBar          See Also

Fires when the mouse pointer enters or leaves a control with a hint assigned.

type

  TNotifyEvent = procedure(Sender: TObject) of object;

property OnHint: TNotifyEvent;

Description

To display hints within the status bar, set the AutoHint property of a text panel to True.  By doing so, the panel will display the hint text of the control currently located under the mouse pointer.

The functionality provided by the AutoHint property may not suit your needs.  For instance, you may need to display hint text only for specific controls.  In this instance, you need to handle the OnHint event of the status bar.  This event fires each time the mouse pointer enters or leaves the area of a control that has a hint assigned.  Thus, you can obtain the control and construct any text needed.  Also, it is up to you to assign the constructed text to the Text property of the panel where you want to display it.

Note: if a handler is assigned to the OnHint event, the AutoHint property of panels is ignored.  Panels that have this property set to True simply display the text assigned to their Text property.

The sample code below handles the OnHint event to display control hints within the first panel of the status bar.  Hints are displayed only for controls that have the ShowHint property set to False.  (If using the AutoHint property, control hints are displayed regardless of the hot-tracked control’s ShowHint property value.)

// Delphi

procedure TForm1.dxStatusBar1Hint(Sender: TObject);

var

  Control: TControl;

begin

  Control := Self.ControlAtPos(Self.ScreenToClient(Mouse.CursorPos), True, True);

  if Control = nil then

    dxStatusBar1.Panels[0].Text := ''

  else if not Control.ShowHint then

    dxStatusBar1.Panels[0].Text := Control.Hint;

end;


TdxStatusBarKeyboardStatePanelStyle
TdxStatusBarKeyboardStatePanelStyle Object

Hierarchy          Properties          Methods

This defines the display style and behavior of the keyboard state panels.

Unit

dxStatusBar

TdxStatusBarKeyboardStatePanelStyle = class(TdxStatusBarPanelStyle)

Description

The TdxStatusBarKeyboardStatePanelStyle class defines the options of style and behavior that are applied to the status bar panels that track the state of keyboard modifiers, namely CAPS LOCK, NUM LOCK, SCROLL LOCK and INSERT. Status bars with various kinds of keyboard state panels are widely used in text processing applications.

By editing the properties of the TcxKeyboardPanelStyle object, you may select which keyboard modifiers to track, enable or disable the boxes around each indicator, change the indicators’ text and more.

Below are several samples of keyboard state panels:

The keyboard state properties are available both at design and at run-time. For example, if you wish to remove the INSERT/OVERWRITE indicator from the standard keyboard panel at design-time, follow the instructions below:

•	Select the status bar object

•	Find its Panels property in the Object Inspector and click the ellipsis button

•	In the Panels editor that opens, locate and select the relevant container panel

•	In the Object Inspector, find and expand the PanelStyle property

•	Find and expand the KeyboardStates property

•	Assign False to the cxksInsert field.

To perform the same operation at run-time, implement and execute the following code:

// Delphi

if (dxStatusBar1.Panels[2].PanelStyle is TdxStatusBarKeyboardStatePanelStyle) then

  TdxStatusBarKeyboardStatePanelStyle(dxStatusBar1.Panels[2].PanelStyle).KeyboardStates := [cxksCapsLock, cxksScrollLock];

Before the above code is executed, the status bar may look like the following:

After:


TdxStatusBarKeyboardStatePanelStyle Hierarchy
Hierarchy

TPersistent

     |

TdxStatusBarPanelStyle

     |


Properties for TdxStatusBarKeyboardStatePanelStyle
TdxStatusBarKeyboardStatePanelStyle Properties

TdxStatusBarKeyboardStatePanelStyle          Legend

In TdxStatusBarKeyboardStatePanelStyle

CapsLockKeyAppearance

FullRect

InsertKeyAppearance

KeyboardStates

NumLockKeyAppearance

ScrollLockKeyAppearance

Derived from TdxStatusBarPanelStyle

Alignment

Color

Font

Owner

ParentFont

StatusBarControl


Methods for TdxStatusBarKeyboardStatePanelStyle
TdxStatusBarKeyboardStatePanelStyle Methods

TdxStatusBarKeyboardStatePanelStyle          Legend

Derived from TdxStatusBarPanelStyle

Assign

BeginUpdate

Create

EndUpdate


TdxStatusBarKeyboardStatePanelStyle.CapsLockKeyAppearance

TdxStatusBarKeyboardStatePanelStyle

Specifies the appearance of the CAPS LOCK key indicator.

property CapsLockKeyAppearance: TdxStatusBarKeyStateAppearance;

Description

The CapsLockKeyAppearance property defines the appearance of the CAPS LOCK key indicator, which may be displayed on the keyboard state panel of the status bar. Usually when the CAPS LOCK indicator is on, all text entered by the user is automatically CAPITALIZED.

This property provides you with the following options:

Option	Meaning
ActiveCaption	The text that is displayed when the CAPS LOCK is on.
ActiveFontColor	The font color that is used to display ActiveCaption when the CAPS LOCK is on.
InactiveCaption	The text that is displayed when the CAPS LOCK is off.
InactiveFontColor	The font color that is used to display InActiveCaption when the CAPS LOCK is off.

Please refer to the TdxStatusBarKeyStateAppearance class reference for more detailed information about the available options.

Below are the status bar samples with various style of the CAPS LOCK indicator:

Sample	Meaning
	CAPS LOCK is not pressed (default style).
	CAPS LOCK is pressed (default style).
	CAPS LOCK is pressed and the ActiveFontColor property is red.
	CAPS LOCK is pressed, the ActiveFontColor property is red and the ActiveCaption property changed to ‘CPS’.


TdxStatusBarKeyboardStatePanelStyle.InsertKeyAppearance

TdxStatusBarKeyboardStatePanelStyle

Specifies the appearance of the Insert key indicator.

property InsertKeyAppearance: TdxStatusBarKeyStateAppearance;

Description

The InsertKeyAppearance property defines the appearance of the Insert key indicator, which may be displayed on the keyboard state panel of the status bar. This indicator has two states:

•	INS - the character typed by the user is inserted at the current caret position

•	OVR - the character typed by the user is placed over the character at the current caret position

This property provides you with the following options:

Option	Meaning
ActiveCaption	The text that is displayed when Insert mode is on.
ActiveFontColor	The font color that is used to display ActiveCaption when Insert mode is on.
InactiveCaption	The text that is displayed when Insert mode is off.
InactiveFontColor	The font color that is used to display InActiveCaption when Insert mode is off.

Please refer to the TdxStatusBarKeyStateAppearance class reference for more detailed information about the available options.

Below are status bar samples with various styles of the Insert mode indicator:

Sample	Meaning
	Insert mode is activated (default style).
	Overwrite mode is activated (default style).
	Insert mode is activated and the ActiveFontColor property changed to red.
	Overwrite mode is activated and the InactiveFontColor property changed to red.


TdxStatusBarKeyboardStatePanelStyle.KeyboardStates

TdxStatusBarKeyboardStatePanelStyle

Defines which keyboard indicators are visible on the status bar.

type

  TdxStatusBarKeyboardState = (cxksCapsLock, cxksNumLock, cxksScrollLock, cxksInsert);

  TdxStatusBarKeyboardStates = set of TdxStatusBarKeyboardState;

property KeyboardStates: TdxStatusBarKeyboardStates;

Description

Use the KeyboardStates property to specify which indicators will be visible on the status bar panel. Four indicators are available: INSERT, CAPS LOCK, SCROLL LOCK and NUM LOCK. By modifying KeyboardStates, you can specify which you wish to display. For example, it may be appropriate to hide the SCROLL LOCK indicator in the text processing applications, as the scroll lock functionality is rarely used now.

As an example, to hide the SCROLL LOCK indicator, follow the instructions below:

•	Select the status bar object

•	Find its Panels property in the Object Inspector and click the ellipsis button

•	In the Panels editor that opens, locate and select the relevant container panel

•	In the Object Inspector, find and expand the PanelStyle property

•	Find and expand the KeyboardStates property

•	Assign False to the cxksScrollLock field.

After these operations, the status bar may look like the following (the SCROLL LOCK indicator is hidden):

You may also change the appearance of the indicators at run-time by accessing the KeyboardStates property in your code.

The default value of the KeyboardStates property is [cxksCapsLock,cxksNumLock,cxksScrollLock,cxksInsert].


TdxStatusBarKeyboardStatePanelStyle.FullRect

TdxStatusBarKeyboardStatePanelStyle

Specifies whether key indicators are displayed in separate panel sections.

property FullRect: Boolean;

Description

If the FullRect property is set to False, key indicators are displayed within separate panel sections.  If you don’t want indicators to be separated in this manner, set the property to True.

The image below shows the same keyboard state panel when the FullRect property is set to False and True respectively.

Note that the FullRect property is not in effect when using XP themes to paint the status bar.  In this case, key indicators cannot be separated from each other.  Please refer to the PaintStyle property of the status bar control for details on how to change the paint style.

The default value of the FullRect property is False.


TdxStatusBarKeyboardStatePanelStyle.NumLockKeyAppearance

TdxStatusBarKeyboardStatePanelStyle

Specifies the appearance of the NUM LOCK key indicator.

property NumLockKeyAppearance: TdxStatusBarKeyStateAppearance;

Description

The NumLockKeyAppearance property defines the appearance of the NUM LOCK key indicator, which may be displayed on the keyboard state panel of the status bar. When NUM LOCK is activated, the user may use the numeric keys of the keyboard.

This property provides you with the following options:

Option	Meaning
ActiveCaption	The text that is displayed when NUM LOCK is on.
ActiveFontColor	The font color that is used to display ActiveCaption when NUM LOCK is on.
InactiveCaption	The text that is displayed when NUM LOCK is off.
InactiveFontColor	The font color that is used to display InActiveCaption when NUM LOCK is off.

Please refer to the TdxStatusBarKeyStateAppearance class reference for more detailed information about the available options.

Below are status bar samples showing the various styles of the NUM LOCK indicator:

Sample	Meaning
	NUM LOCK is not pressed (default style).
	NUM LOCK is pressed (default style).
	NUM LOCK is pressed and ActiveFontColor changed to red.
	NUM LOCK is not pressed and InactiveCaption changed to ‘NumL’.


TdxStatusBarKeyboardStatePanelStyle.ScrollLockKeyAppearance

TdxStatusBarKeyboardStatePanelStyle

Specifies the appearance of the SCROLL LOCK key indicator.

property ScrollLockKeyAppearance: TdxStatusBarKeyStateAppearance;

Description

The ScrollLockKeyAppearance property defines the appearance of the SCROLL LOCK key indicator that may be displayed on the keyboard state panel of the status bar.

This property provides you with the following options:

Option	Meaning
ActiveCaption	The text that is displayed when SCROLL LOCK is on.
ActiveFontColor	The font color that is used to display ActiveCaption when SCROLL LOCK is on.
InactiveCaption	The text that is displayed when SCROLL LOCK is off.
InactiveFontColor	The font color that is used to display InActiveCaption when SCROLL LOCK is off.

Please refer to the TdxStatusBarKeyStateAppearance class reference for more detailed information about the available options.

Below are status bar samples showing various styles of the SCROLL LOCK indicator:

Sample	Meaning
	SCROLL LOCK is not pressed (default style).
	SCROLL LOCK is pressed (default style).
	SCROLL LOCK is pressed and ActiveFontColor changed to red.
	SCROLL LOCK is not pressed and InactiveCaption changed to ‘Scrl’.


TdxStatusBarKeyStateAppearance
TdxStatusBarKeyStateAppearance Object

Hierarchy          Properties          Methods

Controls the appearance of the keyboard indicators on the status bar.

Unit

dxStatusBar

TdxStatusBarKeyStateAppearance = class(TPersistent)

Description

The TdxStatusBarKeyStateAppearance class controls the display of the keyboard indicator that tracks the state of a keyboard modifier key (e.g. CAPS LOCK, NUM LOCK) on the status bar. It specifies the text labels that are displayed on the status bar when the key is locked and released, defines the individual colors for the these states and controls other options.

In real life, each key indicator object controls an instance of the TdxStatusBarKeyStateAppearance class. It enables you to customize the appearance of each indicator individually. It means that you may setup different labels, fonts and colors for the CAPS LOCK, NUM LOCK, SCROLL LOCK and Insert/Overwrite indicators.

At design-time, you may access the options provided by the TdxStatusBarKeyStateAppearance object through the Object Inspector. If you wish, for example, to change the appearance of the CAPS LOCK indicator, follow the instruction below:

•	Select the status bar object

•	Find its Panels property in the Object Inspector and click the ellipsis button

•	In the Panels editor that opens, locate and select the relevant container panel

•	In the Object Inspector, find and expand the PanelStyle property

•	Find and expand the CapsLockKeyAppearance property

•	Customize the appearance options.


TdxStatusBarKeyStateAppearance Hierarchy
Hierarchy

TPersistent

     |


Properties for TdxStatusBarKeyStateAppearance
TdxStatusBarKeyStateAppearance Properties

TdxStatusBarKeyStateAppearance          Legend

In TdxStatusBarKeyStateAppearance

ActiveCaption

ActiveFontColor

Code

Id

InactiveCaption

InactiveFontColor


Methods for TdxStatusBarKeyStateAppearance
TdxStatusBarKeyStateAppearance Methods

TdxStatusBarKeyStateAppearance          Legend

In TdxStatusBarKeyStateAppearance

Create

GetRectWidth


TdxStatusBarKeyStateAppearance.ActiveCaption

TdxStatusBarKeyStateAppearance

The caption displayed when the key is activated (locked).

property ActiveCaption: string;

Description

Use the ActiveCaption property to specify the caption displayed on the status panel when the watched key is activated (locked). For example, when Overwrite mode is on, the "OVR" label is displayed by default.

Please note that the length of the ActiveCaption string is limited to 4 characters.

Below are two examples of the Insert/Overwrite active state indicators:

Sometimes it may be adequate to have the same active and inactive labels. For example, it may be enough just to change the color of the indicator font for CAPS LOCK, SCROLL LOCK and NUM LOCK keys.


TdxStatusBarKeyStateAppearance.ActiveFontColor

TdxStatusBarKeyStateAppearance

The color of an indicator font in active state.

property ActiveFontColor: TColor;

Description

The ActiveFontColor property specifies the color of the font used to draw the text of the active status label. In other words, this color is used when the indicator is active.

By default, ActiveFontColor is set to clWindowText, which normally displays in a dark color (black in the default color scheme). When the indicator is inactive, its label is drawn using clBtnShadow, which is normally lighter (light gray in the default color scheme). Thus by default, the indicator appears dark when the watched key is active and light (almost dimmed, but still visible) when the indicator is inactive.

Below are various examples of active indicator colors:

 (default)


TdxStatusBarKeyStateAppearance.Code

TdxStatusBarKeyStateAppearance

Gets the key code corresponding to the keyboard state caption whose appearance is specified by this TdxStatusBarKeyStateAppearance object.

property Code: Integer;

Description

The keyboard state panel can display sections corresponding to the state of four keys – CAPS LOCK, NUM LOCK, SCROLL LOCK and INSERT.  Each section has a corresponding TdxStatusBarKeyStateAppearance object holding its appearance settings.  The Code property of this object returns the virtual key code representing the corresponding key.  For instance, if appearance settings are specified for the CAPS LOCK key, the Code property will return VK_CAPITAL.  Please refer to the Virtual Key Codes topic of the IDE help system for a complete list of virtual codes.

This property value is specified by the constructor.

This property is used internally to check the state of corresponding keys.  Most commonly, you will have no need to use it in applications.

ReadOnly property


TdxStatusBarKeyStateAppearance.Id

TdxStatusBarKeyStateAppearance

Returns a value representing the key whose appearance is specified by this TdxStatusBarKeyStateAppearance object.

type

  TdxStatusBarKeyboardState = (cxksCapsLock, cxksNumLock, cxksScrollLock, cxksInsert);

property Id: TdxStatusBarKeyboardState;

Description

Keyboard state panels display information about the state of particular keys.  Thus, they have several sections – each displaying a specific key’s state.  The appearance of these sections is specified by TdxStatusBarKeyStateAppearance objects.  This object’s Id property returns a value that identifies the key whose appearance is affected.

This property value is specified by the constructor.  It is used internally.  Most commonly, you will have no need to use this property in applications.

ReadOnly property


TdxStatusBarKeyStateAppearance.InactiveCaption

TdxStatusBarKeyStateAppearance

The caption displayed when the key is inactivated (unlocked).

property InactiveCaption: string;

Description

Use the InactiveCaption property to specify the caption displayed on the status panel when the watched key is inactivated (unlocked). For example, when the Overwrite mode is off, the "INS" label is displayed (by default).

Please note that the length of the ActiveCaption string is limited to 4 characters.

Below are two examples of the Insert/Overwrite inactive state indicators:

Sometimes it may be sufficient to have the same active and inactive labels. For example, it seems enough to change the color of the indicator font for CAPS LOCK, SCROLL LOCK and NUM LOCK keys.


TdxStatusBarKeyStateAppearance.InactiveFontColor

TdxStatusBarKeyStateAppearance

The color of the inactive state indicator font.

property InactiveFontColor: TColor;

Description

The InactiveFontColor property specifies the color of the font used to draw the text of the inactive status label. In other words, this font color is used when the indicator is not active.

By default, InactiveFontColor is set to clBtnShadow, which normally displays a light color (light gray in the default color scheme). When the indicator is active, its label is drawn using clWindowText, which is darker (black in the default color scheme). Thus by default, the indicator appears dark when the watched key is active and light (almost dimmed, but still visible) when the indicator is inactive.

Below are examples of active indicator colors:

 (default)


TdxStatusBarKeyStateAppearance.Create

TdxStatusBarKeyStateAppearance

Creates a new TdxStatusBarKeyStateAppearance object.

constructor Create(AId: TdxStatusBarKeyboardState; ACode: Integer; AActiveCaption: string; AActiveFontColor: TColor; AInactiveCaption: string; AInactiveFontColor: TColor; AChangeHandler: TNotifyEvent);

Description

The Create method creates and initializes the instance of the TdxStatusBarKeyStateAppearance class. The Create method is usually called automatically when you add a new keyboard states panel on the status bar. However you may need to call it directly when implementing custom status bar classes derived from TdxCustomStatusBar.


TdxStatusBarKeyStateAppearance.GetRectWidth

TdxStatusBarKeyStateAppearance

Returns the bounding rectangle of the panel section corresponding to a specific key.

function GetRectWidth(ACanvas: TcxCanvas): Integer;

Description

The TdxStatusBarKeyStateAppearance object holds appearance options for a keyboard status panel’s section.  The GetRectWidth method is used to obtain the width of this section.  Its ACanvas parameter specifies the canvas where the section will be painted.  Note that section width depends on the width of text displayed within it.  Thus, the return value depends on the font settings specified by the canvas.

The GetRectWidth method can be used, for instance, when painting panels manually.  Please refer to the OnDrawPanel event of the panel object for details.


TdxStatusBarStateIndicatorItem
TdxStatusBarStateIndicatorItem Object

Hierarchy          Properties

Represents an individual item within the state indicator panel.

Unit

dxStatusBar

TdxStatusBarStateIndicatorItem = class(TCollectionItem)

Description

The TdxStatusBarStateIndicatorItem object represents an item of the state indicator panel.  Visually, these items are represented by different color glyphs.  Glyph color is specified by the IndicatorType property.  This property also has a specific value that makes the corresponding glyph look disabled.  You can also hide items and make them visible using the Visible property.

Indicator items can be accessed via the Items property of the TdxStatusBarStateIndicators object.  This object is returned by the Indicators property of the TdxStatusBarStateIndicatorPanelStyle object representing the state indicator panel style.


TdxStatusBarStateIndicatorItem Hierarchy
Hierarchy

TCollectionItem

     |


Properties for TdxStatusBarStateIndicatorItem
TdxStatusBarStateIndicatorItem Properties

TdxStatusBarStateIndicatorItem          Legend

In TdxStatusBarStateIndicatorItem

IndicatorType

Visible


TdxStatusBarStateIndicatorItem.IndicatorType

TdxStatusBarStateIndicatorItem

Specifies the color of the indicator item.

type

  TdxStatusBarStateIndicatorType = (sitOff, sitYellow, sitBlue, sitGreen, sitRed, sitTeal, sitPurple);

property IndicatorType: TdxStatusBarStateIndicatorType;

Description

Use the IndicatorType property to specify the color of the glyph representing the item.  The sitYellow, sitBlue, sitGreen, sitRed, sitTeal and sitPurple values correspond to the yellow, blue, green, red, teal and purple colors respectively.  The sitOff value corresponds to the gray color and can be used to indicate the disabled state of the item.

The default value of the IndicatorType property is sitOff.


TdxStatusBarStateIndicatorItem.Visible

TdxStatusBarStateIndicatorItem

Specifies item visibility.

property Visible: Boolean;

Description

Use the Visible property to specify whether the item is visible.  Set this property to False to hide the item.  Otherwise, the item is displayed.

The default value of the Visible property is True.


TdxStatusBarStateIndicatorPanelStyle
TdxStatusBarStateIndicatorPanelStyle Object

Hierarchy          Properties          Methods

Provides settings for panels that display a set of indicators.

Unit

dxStatusBar

TdxStatusBarStateIndicatorPanelStyle = class(TdxStatusBarPanelStyle)

Description

If a TdxStatusBarStateIndicatorPanelStyle object is assigned to the PanelStyle property of a panel, the panel displays a set of indicators.  These indicators are colored glyphs.  You can access the collection of objects representing individual indicators via the Indicators property of the TdxStatusBarStateIndicatorPanelStyle object.  You can also specify the distance between neighboring indicators using the Spacing property.

Being the direct descendant of the TdxStatusBarPanelStyle class, the TdxStatusBarStateIndicatorStyle object also inherits properties, methods and events common for all panel types.


TdxStatusBarStateIndicatorPanelStyle Hierarchy
Hierarchy

TPersistent

     |

TdxStatusBarPanelStyle

     |


Properties for TdxStatusBarStateIndicatorPanelStyle
TdxStatusBarStateIndicatorPanelStyle Properties

TdxStatusBarStateIndicatorPanelStyle          Legend

In TdxStatusBarStateIndicatorPanelStyle

Indicators

Spacing

Derived from TdxStatusBarPanelStyle

Alignment

Color

Font

Owner

ParentFont

StatusBarControl


Methods for TdxStatusBarStateIndicatorPanelStyle
TdxStatusBarStateIndicatorPanelStyle Methods

TdxStatusBarStateIndicatorPanelStyle          Legend

Derived from TdxStatusBarPanelStyle

Assign

BeginUpdate

Create

EndUpdate


TdxStatusBarStateIndicatorPanelStyle.Indicators

TdxStatusBarStateIndicatorPanelStyle

Provides access to the collection of individual indicators.

property Indicators: TdxStatusBarStateIndicators;

Description

Use the Indicators property to set up the collection of indicators that will be displayed within the panel.  The TdxStatusBarStateIndicators objects, obtained via this property, provides a means for managing the collection and accessing its individual items.


TdxStatusBarStateIndicatorPanelStyle.Spacing

TdxStatusBarStateIndicatorPanelStyle

Specifies the distance between neighboring indicator items.

property Spacing: Integer;

Description

Use the Spacing property to specify the distance between neighboring items in the indicator state panel.  The distance is set in pixels.  Note that assigning negative values to the Spacing property results in setting it to 0.

The default value of the Spacing property is 4.


TdxStatusBarStateIndicators
TdxStatusBarStateIndicators Object

Hierarchy          Properties          Methods

Represents a collection of indicators within the state indicator panel.

Unit

dxStatusBar

TdxStatusBarStateIndicators = class(TCollection)

Description

The TdxStatusBarStateIndicators object can be accessed via the Indicators property of the TdxStatusBarStateIndicatorPanelStyle object.  It represents a collection of indicators displayed by state indicator panels.  Being a descendant of the TCollection class, it provides a means for managing the collection such as adding and deleting items.  You can also access individual items using the Items property.  The total number of indicators in the collection can be obtained via the Count property.


TdxStatusBarStateIndicators Hierarchy
Hierarchy

TCollection

     |


Properties for TdxStatusBarStateIndicators
TdxStatusBarStateIndicators Properties

TdxStatusBarStateIndicators          Legend

In TdxStatusBarStateIndicators

Items


Methods for TdxStatusBarStateIndicators
TdxStatusBarStateIndicators Methods

TdxStatusBarStateIndicators          Legend

In TdxStatusBarStateIndicators

Add

Create

Insert


TdxStatusBarStateIndicators.Items

TdxStatusBarStateIndicators

Provides access to individual items by their indexes.

property Items[Index: Integer]: TdxStatusBarStateIndicatorItem;

Description

Use the Items property to access individual items of the indicators collection.  The item to be returned is specified by its index via the Index parameter.  The index of the first item is zero.  The index of the last item is the Count property value decremented by one.

Note that indexes of items don’t necessarily correspond to their visual order.  The reason is that you can hide individual items by setting their Visible property to False.


TdxStatusBarStateIndicators.Add

TdxStatusBarStateIndicators

Adds a new item to the end of the indicators collection.

function Add: TdxStatusBarStateIndicatorItem;

Description

The Add method creates a new indicator item with default settings and adds it to the end of the indicators collection.  It returns the newly added item so that you can modify its settings.

If you need to add an item to the specified position within the collection, use the Insert method.


TdxStatusBarStateIndicators.Create

TdxStatusBarStateIndicators

Creates a new instance of the TdxStatusBarStateIndicators class.

constructor Create;

Description

The constructor is used to create and initialize a new collection of indicator items.  No items are added to the collection by default.

Generally, you will have no need to use the constructor in applications.  It is called automatically when the Indicators property of the TdxStatusBarStateIndicatorPanelStyle object is initialized.


TdxStatusBarStateIndicators.Insert

TdxStatusBarStateIndicators

Adds a new item to the specified position within the collection.

function Insert(Index: Integer): TdxStatusBarStateIndicatorItem;

Description

The Insert method creates a new indicator item with default settings and adds it to the specified position within the collection.  The position of the item is specified by the Index parameter value.  The method returns the newly created and added item so you can modify its settings as needed.

Note that if the Index parameter specifies a negative value, the item is added to the beginning of the collection.  If the Index parameter value is greater or equal to the Count property value, the item is added to the end of the collection.

If you need to add a new item to the end of the collection, use the Add method instead.


TdxStatusBar
TdxStatusBar Object

Hierarchy          Properties          Events

An advanced status bar providing rich display features and functionality.

Unit

dxStatusBar

TdxStatusBar = class(TdxCustomStatusBar)

Description

Status bar controls are widely used in various applications. A status bar is useful when you need to display an application status, give the user tip(s) or add visual indicators. For example, in a text processing application it is natural to introduce keyboard indicators on the status bar, to track the current caret position, to display the current page number and other such information. In the applications that deal with graphics, you may wish to display information about the currently selected tool, such as width of the brush, color and so on. If you develop a tool for communication, a terminal or a voice-over-IP utility, it is appropriate to add the connection status, to track network activity and to display the recipient host IP on the status bar.

However, the standard status bar does not offer you sufficient functionality. It does not provide many display options, but only offers the most basic features.

TdxStatusBar provides 4 types of panel:

1.	The Text panel is used for displaying simple text labels. For example, you may use it to display "Connected", when your networking application successfully establishes a connection to a remote host.

2.	The Container panel enables you to insert controls into a status bar. You can add images, edit fields, progress bars, checkboxes and other controls.

3.	The Keyboard State panel tracks the state of the keyboard modifiers: CAPS LOCK, NUM LOCK, SCROLL LOCK and Insert/Overwrite. The keyboard state panel can be easily integrated into text processing applications.

4.	The State Indicator panel provides you with visual indicators. You can use them to track network activity, the state of modem, communication adapter or other devices.

Note: it is also possible for a panel not to have a type and it will then provide basic text facilities only.

Below are various samples of various TdxStatusBar controls:

After adding a status bar control to the form, you will need to add one or several panels. To do so find the Panels property in the Object Inspector

and press the ellipsis button. The Panels editor opens thus enabling you to add and remove panels:

To configure a particular panel, select it in the Panels editor and customize its properties in the Object Inspector.

From the technical point of view, the TdxStatusBar class is a descendant of TdxCustomStatusBar that implements the basic functionality of the status bar. TdxStatusBar inherits its functionality and publishes its properties.

Use the TdxStatusBar if you just need to add a status bar control to your form. If you wish to implement a custom status bar control, use TdxCustomStatusBar as a parent class.


TdxStatusBar Hierarchy
Hierarchy

TcxControl

     |

TdxCustomStatusBar

     |


Properties for TdxStatusBar
TdxStatusBar Properties

TdxStatusBar          Legend

Derived From TdxCustomStatusBar

BorderWidth

Images

LookAndFeel

PaintStyle

Panels

SizeGrip


Events for TdxStatusBar
TdxStatusBar Events

TdxStatusBar          Legend

Derived from TdxCustomStatusBar

OnHint


TdxStatusBarPanel
TdxStatusBarPanel Object

Hierarchy          Properties          Methods          Events

The object that implements the functionality of a status bar panel.

Unit

dxStatusBar

TdxStatusBarPanel = class(TCollectionItem)

Description

The TdxStatusBarPanel class implements the functionality of the status bar panel used on a status bar.

TdxStatusBar provides 4 types of panel:

1.	The Text panel is used for displaying simple text labels. For example, you may use it to display "Connected", when your networking application successfully establishes a connection to a remote host.

2.	The Container panel enables you to insert controls into a status bar. You can add images, edit fields, progress bars, checkboxes and other controls.

3.	The Keyboard State panel tracks the state of the keyboard modifiers: CAPS LOCK, NUM LOCK, SCROLL LOCK and Insert/Overwrite. The keyboard state panel can be easily integrated into text processing applications.

4.	The State Indicator panel provides you with visual indicators. You can use them to track network activity, the state of modem, communication adapter or other devices.

The panel type is specified by the PanelStyle property. Note: it is also possible for a panel to have PanelStyle unassigned and it will then provide basic text facilities only.

Each TdxStatusBarPanel instance is a member of the TdxStatusBarPanels collection. At design time, you may access and configure the panels by editing the Panels property of the TdxStatusBar control in the Object Inspector:

You can also access the status bar panels at run-time, by using the standard TCollection methods and properties (such as Add, Insert, Delete, etc.).


TdxStatusBarPanel Hierarchy
Hierarchy

TCollectionItem

     |


Properties for TdxStatusBarPanel
TdxStatusBarPanel Properties

TdxStatusBarPanel          Legend

In TdxStatusBarPanel

Bevel

BiDiMode

Fixed

MinWidth

PanelStyle

PanelStyleClass

PanelStyleClassName

ParentBiDiMode

StatusBarControl

Text

Visible

Width


Methods for TdxStatusBarPanel
TdxStatusBarPanel Methods

TdxStatusBarPanel          Legend

In TdxStatusBarPanel

Assign

Create

UseRightToLeftAlignment

UseRightToLeftReading


Events for TdxStatusBarPanel
TdxStatusBarPanel Events

TdxStatusBarPanel          Legend

In TdxStatusBarPanel

OnDrawPanel


TdxStatusBarPanel.Bevel

TdxStatusBarPanel

Specify the style of a panel’s border.

type

  TdxStatusBarPanelBevel = (cxpbNone, cxpbLowered, cxpbRaised);

property Bevel: TdxStatusBarPanelBevel;

Description

Use the Bevel property to customize the appearance of the panel’s border. Changing if this property has effect only if the native style mode is not activated.

The following values are supported:

Value	Meaning	Example
cxpbNone	The panel has no bevel and appears flat.
cxpbLowered	The panel appears recessed.
cxpbRaised	The panel appears raised.

The default value of the Bevel property is pbLowered.


TdxStatusBarPanel.BiDiMode

TdxStatusBarPanel

Specifies the bi-directional mode for the status bar panel.

property BiDiMode: TBiDiMode;

Description

Use BiDiMode to specify the bi-directional mode for the status bar panel.


TdxStatusBarPanel.Fixed

TdxStatusBarPanel

Fixed the width of a panel

property Fixed: Boolean;

Description

Use the Fixed property to specify whether the panel will be resized automatically when the user changes the width of the form or not be changed. Normally, you need one or several non-fixed panels on the status bar otherwise it could look odd when resized. Often developers prefer to make the rightmost panel resizable, while other panels remain fixed. However, that is not a rule and it depends on a particular application and its interface.

Another way of using the Width property is to lock the width of several panels. For example, it may be appropriate to lock the width of the keyboard state and indicator panels.

The default value of the Fixed property is True.


TdxStatusBarPanel.MinWidth

TdxStatusBarPanel

Specifies minimum panel width.

property MinWidth: Integer;

Description

Use the MinWidth property to specify the minimum width of the panel.  The panel’s Width property cannot be set to a value less than that specified by this property.

If the Fixed property value is True, the size of the panel is not changed when resizing the underlying form.  Otherwise, they can be resized, but cannot be less than that specified by the MinWidth property.


TdxStatusBarPanel.PanelStyle

TdxStatusBarPanel          See Also

Specifies the style of the panel.

property PanelStyle: TdxStatusBarPanelStyle;

Description

The TdxStatusBar supports 4 panel styles, specified by the PanelStyle property. Below are the descriptions of the available panel styles.

1.	The Text panel (TdxStatusBarTextPanelStyle object) is used for displaying simple text labels. For example, you may use it to display "Connected", when your networking application successfully establishes a connection to a remote host.

2.	The Container panel (TdxStatusBarContainerPanelStyle object) enables you to insert controls into a status bar. You can add images, edit fields, progress bars, checkboxes and other controls.

3.	The Keyboard State panel (TdxStatusBarKeyboardStatePanelStyle object) tracks the state of the keyboard modifiers: CAPS LOCK, NUM LOCK, SCROLL LOCK and Insert/Overwrite. The keyboard state panel can be easily integrated into text processing applications.

4.	The State Indicator panel (TdxStatusBarStateIndicatorPanelStyle object) provides you with visual indicators. You can use them to track network activity, the state of modem, communication adapter or other devices

Note: it is also possible for a panel to have PanelStyle unassigned and it will then provide basic text facilities only.


TdxStatusBarPanel.PanelStyleClass

TdxStatusBarPanel          See Also

Specifies panel style.

type

  TdxStatusBarPanelStyleClass = class of TdxStatusBarPanelStyle;

property PanelStyleClass: TdxStatusBarPanelStyleClass;

Description

The PanelStyleClass property can be used to specify the style of the panel.  You need to assign the class of the desired TdxStatusBarPanelStyle descendant to this property.  Once a new value is assigned, the panel changes its style to that specified.  Also, panel style settings are set to default.  Note that if the assigned style is already the panel’s style, nothing happens.  Once a panel style is assigned, you can access panel style settings via the PanelStyle property.

Paint style classes (descendants of the TdxStatusBarPanelStyle class) that can be assigned to the PanelStyleClass property are listed in the TdxStatusBarPanelStyle class description.

You can also specify panel styles by strings corresponding to styles.  Use the PanelStyleClassName property for this purpose.


TdxStatusBarPanel.PanelStyleClassName

TdxStatusBarPanel          See Also

Specifies panel style by its name.

property PanelStyleClassName: string;

Description

Use the PanelStyleClassName property to specify panel style using a string corresponding to the desired style.  Note that the same strings are displayed within the PanelStyle property’s editor at design-time.

Once a string is assigned to the PanelStyleClassName property, the panel style is changed to the specified and default settings are applied to it.  However, if an already assigned panel style is specified, nothing happens.

The table below lists strings available for setting the PanelStyleClassName property and corresponding style classes.

String	Class
‘Text Panel’	TdxStatusBarTextPanelStyle
‘Container Panel’	TdxStatusBarContainerPanelStyle
‘Keyboard State Panel’	TdxStatusBarKeyboardStatePanelStyle
‘State Indicator Panel’	TdxStatusBarStateIndicatorPanelStyle
An empty string	No panel style is assigned to the PanelStyle property.  The panel serves as a standard text panel in this case.

Note that you can also specify the panel style by assigning the desired class to the PanelStyleClass property.


TdxStatusBarPanel.ParentBiDiMode

TdxStatusBarPanel

Specifies whether the status panel uses its parent’s bi-directional mode.

property ParentBiDiMode: Boolean;

Description

Assign True to this property if you wish the status bar panel to use the bi-directional mode of its parent status bar control. Assign False to this property if you wish to specify different bi-directional mode to the panel.

The default value of the ParentBiDiMode property is True.


TdxStatusBarPanel.StatusBarControl

TdxStatusBarPanel

Reference to the panel’s parent status bar control.

property StatusBarControl: TdxCustomStatusBar;

Description

Read the StatusBarControl property to access the status bar control owning the panel. That may come in useful if you need to get access to the other panels of this status bar.

ReadOnly Property


TdxStatusBarPanel.Text

TdxStatusBarPanel

The text displayed on a text panel.

property Text: string;

Description

The Text property specifies the text displayed on text style panels. You can access this property at design and at run-time. The Text property does not effect non-text panels (e.g. container panel, keyboard state panel, indicators panel).

The example below shows how to change of the Text property at run-time:

// Delphi

if iConnectionStatus = 1 then

    dxStatusBar1.Panels[0].Text := 'Connected'

  else

    dxStatusBar1.Panels[0].Text := 'Not Connected';

If iConnectionStatus indicates that the connection is active, the panel text is changed to ‘Connected’. If the connection appears to be inactive, the text is changed to ‘Not Connected’.

Connection is active:

Connection is inactive:


TdxStatusBarPanel.Visible

TdxStatusBarPanel

Specifies the visibility of the status bar panel.

property Visible: Boolean;

Description

If the Visible property is set to True, the panel’s content is displayed.  Otherwise, the panel becomes hidden.  Note that sizes of other panels are not modified when hiding a panel.  This can be used to create intervals between status bar panels.  The image below shows an example of hiding a panel.

Note that in some paint styles panels don’t have their own borders.  In such cases, separators are painted between them.  In this case, setting the Visible property of a panel to False will make it look like an empty panel.  The image below illustrates this effect.  The PaintStyle property of the status bar is set to stpsXP.

The default value of the Visible property is True.


TdxStatusBarPanel.Width

TdxStatusBarPanel

The width of the panel.

property Width: Integer;

Description

The Width property specifies the horizontal width of a panel (in pixels).

The default value of the Width property is 50.


TdxStatusBarPanel.Assign

TdxStatusBarPanel

Copies the contents of the sourñe panel.

procedure Assign(Source: TPersistent); override;

Description

Call the Assign method if you wish to copy the content of a container panel on the status bar. This may be useful if you wish to have two identical panels and then, perhaps, slightly modify one of them.


TdxStatusBarPanel.Create

TdxStatusBarPanel

Creates a new TdxStatusBarPanel object.

constructor Create(Collection: TCollection); override;

Description

The Create method creates and initializes a new instance of the TdxStatusBarPanel class. The Create method is called automatically when you add a new panel to the status bar. The TdxStatusBarPanel is added to the Panels collection.

Normally you do not need to call the Create method directly unless you implement a custom status bar derived from the TdxCustomStatusBar class.


TdxStatusBarPanel.UseRightToLeftAlignment

TdxStatusBarPanel

Specifies whether the alignment is applied according to the right-to-left rule.

function UseRightToLeftAlignment: Boolean;

Description

Call the UseRightToLeftAlignment method to determine whether the status bar control uses the right-to-left mode that is applied when the system uses a language that assumes right-to-left reading. You should call this method in order to implement proper alignment when implementing custom status bar controls that inherit the functionality of TdxCustomStatusBar.


TdxStatusBarPanel.UseRightToLeftReading

TdxStatusBarPanel

Specifies whether the text is supplied according to the right-to-left rule.

function UseRightToLeftReading: Boolean;

Description

Call the UseRightToLeftReading method to determine whether the control requires right-to-left order of its characters. If so, you should apply the matching style when drawing texts and arranging the elements in the status bar.


TdxStatusBarPanel.OnDrawPanel

TdxStatusBarPanel

Enables you to custom paint the panel.

type

  TdxStatusBarDrawPanelEvent = procedure(Sender: TObject; ACanvas: TcxCanvas; const ARect: TRect; var ADone: Boolean) of object;

function OnPanelDraw: TdxStatusBarDrawPanelEvent;

Description

Handle the OnPanelDraw event to paint the panel manually.  The Sender parameter identifies the panel being painted.  The ACanvas parameter provides access to the canvas used to paint.  The ARect parameter specifies the bounding rectangle of the panel.

The ADone parameter of the event specifies whether default painting needs to be performed.  If set to True, default painting is not performed after the event handler is executed.  Leaving the parameter set to False can be used if you need to custom paint the background of the panel only.

The sample code below handles the OnDraw event to paint a blinking image within a status bar section.  Note that you need a timer component to invalidate the status bar with the predefined time intervals.

// Delphi

var

  DrawImage: Boolean;

procedure TForm1.FormCreate(Sender: TObject);

begin

  DrawImage := True;

end;

procedure TForm1.Timer1Timer(Sender: TObject);

begin

  DrawImage := not DrawImage;

  dxStatusBar1.Invalidate;

end;

procedure TForm1.dxStatusBar1Panels2DrawPanel(Sender: TdxStatusBarPanel;

  ACanvas: TcxCanvas; const ARect: TRect; var ADone: Boolean);

var

  Brush: HBRUSH;

  Bitmap: TBitmap;

begin

  Bitmap := TBitmap.Create;

  Bitmap.LoadFromFile('d:\image.bmp');

  if DrawImage then

    ACanvas.Draw(ARect.Left, ARect.Top, Bitmap)

  else

  begin

    ACanvas.Brush.Color := clBtnFace;

    ACanvas.Brush.Style := bsSolid;

    ACanvas.FillRect(ARect);

  end;

  ADone := True;

end;


TdxStatusBarPanels
TdxStatusBarPanels Object

Hierarchy          Properties          Methods

The collection of status bar panels.

Unit

dxStatusBar

TdxStatusBarPanels = class(TCollection)

Description

The TdxStatusBarPanels class is a collection that controls the status bar panels. At design time, you may access and configure the panels by editing the Panels property of the TdxStatusBar control in the Object Inspector:

You may also access the status bar panels at run-time, by using the TCollection’s standard methods and properties. For example, if you wish to add a new panel at run-time, call the Add method. If you wish to insert a new panel, use the Insert method. If you wish to access a particular panel, use the zero-based index.


TdxStatusBarPanels Hierarchy
Hierarchy

TCollection

     |


Properties for TdxStatusBarPanels
TdxStatusBarPanels Properties

TdxStatusBarPanels          Legend

In TdxStatusBarPanels

Items


Methods for TdxStatusBarPanels
TdxStatusBarPanels Methods

TdxStatusBarPanels          Legend

In TdxStatusBarPanels

Add

Create

Insert


TdxStatusBarPanels.Items

TdxStatusBarPanels

Lists all items managed by the TdxStatusBarPanels object.

property Items[Index: Integer]: TdxStatusBarPanel;

Description

Use the Items property to access individual panels stored in the TdxStatusBarPanels collection. The index is zero-based.

The Items property is accessible at design-time using the Panels property displayed in the Object Inspector like the following:


TdxStatusBarPanels.Add

TdxStatusBarPanels

Adds a new panel to the status bar.

function Add: TdxStatusBarPanel;

Description

Call the Add method if you wish to add a new panel to the status bar. The new panel created will be inserted into the TdxStatusBarPanels collection and will appear at the rightmost position on the status bar.


TdxStatusBarPanels.Create

TdxStatusBarPanels

Creates a new instance of the TdxStatusBarPanels object.

constructor Create(AStatusBarControl: TdxCustomStatusBar);

Description

The Create method creates and initializes a new instance of the TdxStatusBarPanels collection. The Create method is called automatically when you add a new status bar control on a form. Normally, you do not need to call the Create method directly.


TdxStatusBarPanels.Insert

TdxStatusBarPanels

Inserts a new panel.

function Insert(Index: Integer): TdxStatusBarPanel;

Description

Call the Insert method to insert a new panel into the status bar. The panel will be inserted between the existing panels.

Parameters:

Index – the position into which the new panel will be inserted.


TdxStatusBarPanelStyle
TdxStatusBarPanelStyle Object

Hierarchy          Properties          Methods

Represents the base class for the various panel section types.

Unit

dxStatusBar

TdxStatusBarPanelStyle = class(TPersistent)

Description

TdxStatusBar is a complex control containing several sections of different types (can display text, serve as a container for other controls, display the current state of the special keys and so on). Every panel section added has a PanelStyle property that defines the particular purpose of the section.  This property can accept any TdxStatusBarPanelStyle descendant.  The TdxStatusBarPanelStyle object itself implements the basic functionality of panel style objects.

Available descendants of the TdxStatusBarPanelStyle class are the TdxStatusBarTextPanelStyle, TdxStatusBarContainerPanelStyle, TdxStatusBarKeyboardStatePanelStyle and TdxStatusBarStateIndicatorPanelStyle classes.


TdxStatusBarPanelStyle Hierarchy
Hierarchy

TPersistent

     |


Properties for TdxStatusBarPanelStyle
TdxStatusBarPanelStyle Properties

TdxStatusBarPanelStyle          Legend

In TdxStatusBarPanelStyle

Alignment

Color

Font

Owner

ParentFont

StatusBarControl


Methods for TdxStatusBarPanelStyle
TdxStatusBarPanelStyle Methods

TdxStatusBarPanelStyle          Legend

In TdxStatusBarPanelStyle

Assign

BeginUpdate

Create

EndUpdate


TdxStatusBarPanelStyle.Alignment

TdxStatusBarPanelStyle

Specifies the alignment of text within the panel.

property Alignment: TAlignment;

Description

Use the Alignment property to specify how text should be aligned within the panel.  Note that this property is used by text panels only.  State indicator panels and keyboard state panels have the minimum width required to accommodate their contents.  However, there can be situations when such panels are the last in the panels collection and all other panels have a fixed width.  In this case, panels fill the entire free space of the status bar and their contents are left aligned.


TdxStatusBarPanelStyle.Color

TdxStatusBarPanelStyle

Specifies the background color of the panel.

property Color: TColor;

Description

Use the Color property to specify the background color of the status bar panel.  Note that this property value is ignored when the status bar is painted using XP themes or Office 11 style.  Please refer to the LookAndFeel and PaintStyle properties of the status bar control for information on specifying the paint style.


TdxStatusBarPanelStyle.Font

TdxStatusBarPanelStyle

Specifies the font used to display text within the panel.

property Font: TFont;

Description

Use the Font property to modify font settings of the text displayed within the panel.  Properties of the TFont object returned by this property allow you to change the typeface, size, color and other font characteristics.

Note that Font property settings are automatically copied from font settings of the status bar control when setting the ParentFont property to True.  This enables you to provide a common text appearance for multiple panels by modifying only the control’s settings.


TdxStatusBarPanelStyle.Owner

TdxStatusBarPanelStyle

References the panel section owning the panel style object.

property Owner: TdxStatusBarPanel;

Description

The TdxStatusBar consists of several sections represented by TdxStatusBarPanel objects. Every TdxStatusBarPanel has a different purpose as defined by its PanelStyle property. The TdxStatusBarPanelStyle’s Owner property references the TdxStatusBarPanel object owning the current style.

ReadOnly Property


TdxStatusBarPanelStyle.ParentFont

TdxStatusBarPanelStyle

Specifies whether panel text is painted using font settings of the status bar control.

property ParentFont: Boolean;

Description

Setting the ParentFont property to True automatically assigns font settings of the status bar control to the Font property of the panel style object.  As a result, panel text is painted using font settings of the owning status bar.  Changing the font settings of the panel style object automatically sets the ParentFont property to False.

The ParentFont property is useful if you need to provide a common text appearance within all status bar sections.  In this case, you can modify font settings of the status bar control and set the ParentFont property to True so that panels use those modified settings.

The default value of the ParentFont property is True.


TdxStatusBarPanelStyle.StatusBarControl

TdxStatusBarPanelStyle

References the status bar control that owns the panel section owning the panel style.

property StatusBarControl: TdxCustomStatusBar;

Description

The TdxStatusBar consists of several sections represented by TdxStatusBarPanel objects. Every TdxStatusBarPanel has a different purpose as defined by its PanelStyle property. TdxStatusBarPanelStyle’s StatusBarControl property references the TdxStatusBar object owning the current style’s section.

ReadOnly Property


TdxStatusBarPanelStyle.Assign

TdxStatusBarPanelStyle

Copies the contents of the sourñe container panel style.

procedure Assign(Source: TPersistent); override;

Description

Call the Assign method to copy the content of a container panel style on the status bar. This may come in useful if you have two identical panel styles and then, perhaps, slightly modify one of them.

// Delphi

dxStatusBar1.Panels[0].PanelStyle.Assign(dxStatusBar1.Panels[1].PanelStyle);


TdxStatusBarPanelStyle.Create

TdxStatusBarPanelStyle

Creates an instance of the TdxStatusBarPanelStyle object.

constructor Create(AOwner: TdxStatusBarPanel); virtual;

Description

The constructor is used to create and initialize a new TdxStatusBarPanelStyle object.  The AOwner parameter specifies the panel whose style will be controlled by the newly created object.  The parameter value is assigned to the Owner property.

Descendants of the TdxStatusBarPanelStyle class override the constructor to perform additional initialization.

Generally, you will have no need to create instances of the TdxStatusBarPanelStyle objects in applications.  However, you will need to create instances of its descendants if you have a need to change the PanelStyle property of panels at runtime.  The sample code below shows how to change the panel style so that it indicates keyboard status.

// Delphi

var Panel: TdxStatusBarPanel;

// ...

Panel := dxStatusBar1.Panels[0];

Panel.PanelStyle := TdxStatusBarKeyboardStatePanelStyle.Create(Panel);

The image below shows the status bar appearance before and after the sample code execution.


TdxStatusBarPanelStyle.BeginUpdate

TdxStatusBarPanelStyle

Prevents the status bar control from being updated until the EndUpdate method is called.

procedure BeginUpdate;

Description

Call the BeginUpdate method to prohibit status bar updates.  This can be used when you need to perform several consecutive modifications that affect the appearance of the control.  If you do not use this method, the control will be updated after each modification.  If your code is enclosed in a BeginUpdate and EndUpdate method pair, the control will be updated only once, which gives you a significant performance benefit.

Note: calling the BeginUpdate method is the same as calling the BeginUpdate method of the control’s panel collection.  The collection of panels can be accessed via the Panels property of the status bar.


TdxStatusBarPanelStyle.EndUpdate

TdxStatusBarPanelStyle

Enables control modifications after a BeginUpdate method call.

procedure EndUpdate;

Description

The EndUpdate method is used in conjunction with the BeginUpdate method to prevent multiple updates of the control when performing consecutive modifications.  The EndUpdate method enables control updates and forces its immediate repainting.

Note: calling the EndUpdate method is the same as calling the EndUpdate method of the control’s panel collection.  The collection of panels can be accessed via the Panels property of the status bar.


TdxStatusBarTextPanelStyle
TdxStatusBarTextPanelStyle Object

Hierarchy          Properties          Methods          Events

Represents the object that defines the display style for the status bar text panels.

Unit

dxStatusBar

TdxStatusBarTextPanelStyle = class(TdxStatusBarPanelStyle)

Description

The TdxStatusBarTextPanelStyle class defines the display options and behavior of status bar text panels. Such panels are used for displaying text labels. For example, by using the text panel you may inform user about the current state of application, its connection state and so on.

You may access the properties of the TdxStatusBarTextPanelStyle class at design time and at runtime. If you wish, for example, to customize the font used to draw the text, follow the instructions below:

•	Select the status bar object

•	Find its Panels property in the Object Inspector and click the ellipsis button

•	In the Panels editor that opens, locate and select the relevant container panel

•	In the Object Inspector, find and expand the PanelStyle property

•	Expand the Font property

•	Customize the available options


TdxStatusBarTextPanelStyle Hierarchy
Hierarchy

TPersistent

     |

TdxStatusBarPanelStyle

     |


Properties for TdxStatusBarTextPanelStyle
TdxStatusBarTextPanelStyle Properties

TdxStatusBarTextPanelStyle          Legend

In TdxStatusBarTextPanelStyle

AutoHint

EllipsisType

Font

ImageIndex

Derived from TdxStatusBarPanelStyle

Alignment

Color

Font

Owner

ParentFont

StatusBarControl


Methods for TdxStatusBarTextPanelStyle
TdxStatusBarTextPanelStyle Methods

TdxStatusBarTextPanelStyle          Legend

Derived from TdxStatusBarPanelStyle

Assign

BeginUpdate

Create

EndUpdate


Events for TdxStatusBarTextPanelStyle
TdxStatusBarTextPanelStyle Events

TdxStatusBarTextPanelStyle          Legend

In TdxStatusBarTextPanelStyle

OnGetText


TdxStatusBarTextPanelStyle.AutoHint

TdxStatusBarTextPanelStyle

Specifies whether the panel displays hint texts of hot-tracked controls.

property AutoHint: Boolean;

Description

Hint windows can be quite large and may hide controls on a form.  Thus, your application may require the ability to display control hints within a status bar panel.  The easiest way to do so is to create a text panel and set its AutoHint property to True.  In this instance, the panel will display control hints currently located under the mouse pointer.  Note that only a single panel can have the AutoHint property set to True.

The hint text of a control is specified by its Hint property.  If you only want the hint text to be displayed within the status bar, ensure that the control’s ShowHint property value is False.

If the AutoHint property is set to True, the panel displays text specified by the Text property until a control with a non-empty Hint property is hot-tracked.  When the mouse pointer leaves the control, the panel displays no text until the mouse pointer enters any other control with an assigned hint.

Note: if a handler is assigned to the OnHint event of the status bar control, the AutoHint property value is ignored.  In this case, you should implement your own logic to display hnts within the panel.


TdxStatusBarTextPanelStyle.EllipsisType

TdxStatusBarTextPanelStyle

Controls the type of the ellipsis that appears when the text does not fit the text panel area.

type

  TdxStatusBarEllipsisType = (cxetNone, cxetTruncate, cxetSmartPath, cxetCustom);

property EllipsisType: TdxStatusBarEllipsisType;

Description

Using the EllipsisType property enables you to customize the appearance of text which is too long for the area of the text panel. That may happen, for example, when the user makes the window too small or when displaying long file paths. In this case, it may be appropriate to replace some of the text by an ellipsis to inform the user that full text is not displayed.

Several kinds of ellipsis are supported:

Value	Example	Meaning
cxetNone		Ellipsis is not displayed.
cxetSmartPath		If text is the valid system path, it is trimmed so that the last item in the path remains visible.
cxetTruncate		Ellipsis are enabled and displayed at the end of truncated text.

Note that you can also implement your own text trimming logic.  Handle the OnGetText event for this purpose.

The default value of the EllipsisType property is cxetNone.


TdxStatusBarTextPanelStyle.ImageIndex

TdxStatusBarTextPanelStyle

Specifies the image (if any), which can be associated with the text panel.

property ImageIndex: TImageIndex;

Description

Use the ImageIndex property if you wish to associate a TImageList collection with a status bar text panel. This is useful if you need custom bitmaps on your status bar. For example, you may wish to display icons that represent the connection state or a warning about an abnormal occurrence. You can do that in the following way:

•	add a new TImageList collection on your form and load it with the bitmaps

•	assign this TImageList object to the Images property of your status bar

•	add a new panel to the status bar

•	assign TextPanel to its PanelStyle property

•	assign the relevant index to the ImageIndex property of your panel

•

As a result, the [image] image is shown in the leftmost section of the status bar below:

The default value of the ImageIndex property is –1, thus no image is displayed.


TdxStatusBarTextPanelStyle.OnGetText

TdxStatusBarTextPanelStyle

Enables you to specify custom text for the panel.

type

  TdxStatusBarTextEvent = procedure(Sender: TObject; const R: TRect; var AText: string) of object;

property OnGetText: TdxStatusBarTextEvent;

Description

Handle the OnGetText event to provide custom text to be displayed within the panel.  For instance, this can be used to implement your own text trimming algorithm if options provided by the EllipsisType property don’t suit your needs.

The Sender parameter identifies the panel style object.  The R parameter represents the bounding rectangle of the panel’s content.  The text to be displayed within the panel should be assigned to the AText parameter.  Initially, this parameter contains the text specified by the Text property of the panel.


GetRegisteredStatusBarPanelStyles
GetRegisteredStatusBarPanelStyles Function

Returns the registered panel styles.

Unit

dxStatusBar

Declaration

function GetRegisteredStatusBarPanelStyles: TcxRegisteredClasses;

Description

The GetRegisteredStatusBarPanelStyles function returns the panel style classes that are registered for use with a status bar control. By calling this function, you get the list of the available panel style classes.


TdxStatusBarKeyboardState
TdxStatusBarKeyboardState type

Defines the keyboard states used by the keyboard state panel on the status bar.

Unit

dxStatusBar

TdxStatusBarKeyboardState = (cxksCapsLock, cxksNumLock, cxksScrollLock, cxksInsert);

Description

TdxStatusBarKeyboardState type defines the following values:

Value	Meaning
cxksCapsLock	The value for CAPS LOCK.
cxksNumLock	The value for NUM LOCK.
cxksScrollLock	The value for SCOLL LOCK.
cxksInsert	The value for Insert/Overwrite.


TdxStatusBarKeyboardStates
TdxStatusBarKeyboardStates type

The set of available keyboard states.

Unit

dxStatusBar

TdxStatusBarKeyboardStates = set of TdxStatusBarKeyboardState;

Description

TdxStatusBarKeyboardStates is a set of available keyboard states and they are defined by the TdxStatusBarKeyboardState type.


GetBarManagerByForm, TdxBars.Items, TdxBar.DockingStyle, TdxBar.Caption Example

This example requires a button and a toolbar with caption set to: ‘ToolbarCaption’.  After pressing the button, DockingStyle of the toolbar changes and the toolbar floats.

// Delphi

procedure TForm1.Button1Click(Sender: TObject);

var

  ABarManager : TdxBarManager;

  iCount      : Integer;

  ABar        : TdxBar;

begin

  ABarManager := GetBarManagerByForm(Form1);

  for iCount := 0 to ABarManager.Bars.Count-1 do

  begin

    ABar := ABarManager.Bars.Items[iCount];

    if ABar.Caption = 'ToolbarCaption' then

    begin

      ABar.DockingStyle := dsNone;

      Exit;

    end;

  end;

end;

// C++Builder

void __fastcall TForm1::Button1Click(TObject * Sender)

{

  TdxBarManager * ABarManager;

  int iCount;

  TdxBar * ABar;

  ABarManager = GetBarManagerByForm(Form1);

  for(iCount=0;iCount<ABarManager->Bars->Count;iCount++)

  {

    ABar = ABarManager->Bars->Items[iCount];

    if (ABar->Caption = "ToolbarCaption")

    {

      ABar->DockingStyle = dsNone;

      return;

    };

   };

}


TdxBarManager.CategoryItemsVisible, TdxBarManager.Categories Example

The following procedure sets the visibility of all items from a specified TdxBarManager category.  For instance, you can change category visibility when your application must enable/disable certain features according to a user’s security access level.

// Delphi

procedure ShowCategory( ACategoryName : string;

                        ABarManager : TdxBaraManager;

                        AVisible : TdxBarItemVisible)

var

  i : Integer;

begin

  for i := 0 to ABarManager.Categories.Count - 1

    if ABarManager.Categories[i] = ACategoryName then

    begin

      ABarManager.CategoryItemsVisible[i] := AVisible;

      Exit;

    end;

end;

// C++Builder

procedure ShowCategory(AnsiString ACategoryName, TdxBaraManager * ABarManager, TdxBarItemVisible AVisible)

{

  int i;

  for(i=0;ABarManager->Categories->Count;i++)

    if(ABarManager->Categories->Items[i] == ACategoryName)

    {

      ABarManager->CategoryItemsVisible->Items[i] = AVisible;

      return;

    };

}


TdxBarItem.CurItemLink, TdxBarItem.ClickItemLink Example

Assume you have several TdxBarButton item controls with one underlying item...The following code performs the same action as the Close button on a toolbar; It closes the toolbar to which an item control belongs.

// Delphi

procedure TForm1.dxBarButton1Click(Sender: TObject);

begin

  dxBarButton1.ClickItemLink.BarControl.Destroy;

end;

// C++Builder

void __fastcall TForm1::dxBarButton2Click(TObject *Sender)

{

 delete dxBarButton2->ClickItemLink->BarControl;

}

To specify the item link that corresponds to the active item control you can also use the CurItemLink property:

// Delphi

procedure TForm1.dxBarButton1Click(Sender: TObject);

begin

  dxBarButton1.CurItemLink.BarControl.Destroy;

end;

// C++Builder

void __fastcall TForm1::dxBarButton2Click(TObject *Sender)

{

 delete dxBarButton2->CurItemLink->BarControl;

}


TdxBarItemLink.UserGlyph, TdxBarItemLink.UserCaption, TdxBarItem.Links, TdxBarItem.LinkCount Example

Assume you have several different item controls corresponding to one item control of TdxBarButton type...You can use the TdxBarItemLink UserGlyph, UserCaption, UserPaintStyle, UserWidth, or BeginGroup property to customize the look of different item controls with the same underlying item.  The code below demonstrates use of the TdxBarItemLink UserGlyph and UserCaption properties: The First five button controls look different but perform the same action.

procedure ChangePictures(Sender: TObject);

var

  iCount  : integer;

  Bitmaps : array[0..4] of TBitmap;

begin

 for iCount:= 0 to 4 do

   Bitmaps[iCount] := TBitmap.Create;

 Bitmaps[0].LoadFromFile('bmp1.bmp');

 Bitmaps[1].LoadFromFile('bmp2.bmp');

 Bitmaps[2].LoadFromFile('bmp3.bmp');

 Bitmaps[3].LoadFromFile('bmp4.bmp');

 Bitmaps[4].LoadFromFile('bmp5.bmp');

 for iCount :=0 to dxBarButton1.LinkCount - 1 do

   if iCount < 5 then

   begin

     dxBarButton1.Links[iCount].UserGlyph := Bitmaps[iCount];

     dxBarButton1.Links[iCount].UserCaption :=

           dxBarButton1.Links[iCount].Caption + IntToStr(iCount);

     Bitmaps[iCount].Free;

   end;

end;

// C++Builder

void __fastcall ChangePictures(TObject * Sender)

{

  int iCount;

  Grahics::TBitmap * Bitmaps[5];

 for(iCount=0;iCount<5;iCount++)

   Bitmaps[iCount] = Graphics::TBitmap;

 Bitmaps[0]->LoadFromFile("bmp1.bmp");

 Bitmaps[1]->LoadFromFile("bmp2.bmp");

 Bitmaps[2]->LoadFromFile("bmp3.bmp");

 Bitmaps[3]->LoadFromFile("bmp4.bmp");

 Bitmaps[4]->LoadFromFile("bmp5.bmp");

 for(iCount=0;iCount<dxBarButton1->LinkCount;iCount++)

   if (iCount < 5)

   {

     dxBarButton1->Links->Items[iCount]->UserGlyph = Bitmaps[iCount];

     dxBarButton1->Links->items[iCount]->UserCaption =

           dxBarButton1->Links->Items[iCount]->Caption + IntToStr(iCount);

     delete Bitmaps[iCount];

   }

}


TdxBarWindowItem.Text, TdxBarWindowItem.OnChange Example

This example uses TdxBarEdit text as a filter value.  This procedure is a TdxBarEdit OnChange event handler:

// Delphi

procedure TForm1.dxBarEdit1Change(Sender: TObject);

begin

  Datasource1.Dataset.Filter := 'FieldName1 = '''+ dxBarEdit1.Text+'''';

  Datasource1.Dataset.Filtered := True;

end;

// C++Builder

void __fastcall TForm1::dxBarEdit1Change(TObject * Sender)

{

  Datasource1->Dataset->Filter = "FieldName1 = "+ dxBarEdit1->Text+ "’";

  Datasource1->Dataset->Filtered = true;

};


TdxBarItem.Category, TdxBarManager.ItemCount, TdxBarManager.Items Example

This example requires a TdxBarEdit object.  The procedure below creates a new category and moves all buttons of type TdxBarLargeButton to this new category.  The new category name is specified by the Text property of the TdxBarEdit object.  The procedure is a TdxBarEdit OnChange event handler.

// Delphi

procedure TForm1.dxBarEdit1Change(Sender: TObject);

var

  i : Integer;

  ABarManager : TdxBarManager;

begin

  ABarManager : = dxBarEdit1.BarManager;

  with ABarManager do

  begin

    Categories.Add(dxBarEdit1.Text);

    for i:=0 to ItemCount-1 do

      if Items[i] is TdxBarLargeButton then

      begin

        Items[i].Category := Categories.Count-1;

        Items[i].Caption := 'NewCaption'+IntToStr(i);

      end;

  end;

end;

// C++Builder

void __fastcall TForm1::dxBarEdit1Change(TObject * Sender)

{

  TdxBarManager * ABarManager;

  ABarManager = dxBarEdit1->BarManager;

  ABarManager->Categories->Add(dxBarEdit1->Text);

  for(int i=0;i<ItemCount;i++)

    if (ABarManager->Items[i]->ClassName() == "TdxBarLargeButton")

    {

     ABarManager->Items[i]->Category = ABarManager->Categories->Count-1;

     ABarManager->Items[i]->Caption = "NewCaption"+IntToStr(i);

    }

}


TdxBarList.ItemItems Example

This example adds a file specified by AFileName to the list of recently used files.  The MaxNumberOfFiles parameter specifies the maximum number of file names to store.

// Delphi

procedure AddRecentFiles( AFileName : String; MaxNumberOfFiles : Integer);

var

  i : Integer;

begin

 if dxBarListItem1.Items.Count < MaxNumberOfFiles then

   dxBarListItem1.Items.Add('');

 for i:= dxBarListItem1.Items.Count-1 downto 1 do

   dxBarListItem1.Items[i] := dxBarListItem1.Items[i-1];

 dxBarListitem1.Items[0] :=AFileName;

end;

// C++Builder

void AddRecentFiles(AnsiString AFileName, int MaxNumberOfFiles)

{

 if (dxBarListItem1->Items->Count < MaxNumberOfFiles)

   dxBarListItem1->Items->Add("");

 for(int i=dxBarListItem1->Items->Count-1;i>=1;i--)

   dxBarListItem1->Items[i] = dxBarListItem1->Items[i-1];

 dxBarListitem1->Items[0] =AFileName;

}


TdxBarPopupMenu Example

The following code occurs on the OnMouseDown event handler of a form.  This procedure activates a popup menu when a user clicks the right mouse button on a form.

// Delphi

procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;

  Shift: TShiftState; X, Y: Integer);

begin

  if Button = mbRight then

    dxBarPopupMenu1.PopupFromCursorPos;

end;

// C++Builder

void __fastcall TForm1::FormMouseDown(TObject * Sender, TMouseButton Button, TShiftState Shift, int X, int Y)

{

  if (Button == mbRight)

    dxBarPopupMenu1->PopupFromCursorPos();

}


TdxBarContainerItem, TdxBarItemLink.BeginGroup Example

This example demonstrates usage of TdxBarContainerItem in a MDI application.  The AddTheMenu procedure in this example creates submenus on the parent toolbar with the main toolbar items of the child form.  The items are added to the container item of the parent toolbar.  Notice that the default value of the Visible property of this container item is ivNever.

procedure AddTheMenu;

var

  ABarManager : TdxBarManager;

begin

  ABarManager := GetBarManagerByForm(ChildForm1);

   with dxBarContainerItem1 do

   begin

     ItemLinks := ABarManager.MainMenuBar.ItemLinks;

     Caption := ChildForm1.Caption;

     Visible := ivAlways;

   end;

end;

The following code hides the child items menu:

  dxBarContainerItem1.Visible := ivNever;

To add one item, for instance of the TdxBarButton type to the TdxBarContainerItem, use the code below.  This code also makes the item control first in the group:

  with dxBarContainerItem1 do

  begin

    ItemLinks.Add.Assign( dxBarButton1.Links[0]);

// adding the item link

    ItemLinks.Items[ItemLinks.Count-1].BeginGroup := True;

//  making the item control first in the group

  end;


TdxBarColorCombo.Color Example

This example sets the font color of the TEdit component to a new value.  The following code represents the TdxBarColorCombo OnChange event handler.

procedure TForm1.dxBarColorCombo1Change(Sender: TObject);

begin

  Edit1.Font.Color := dxBarColorCombo1.Color;

end;


TdxBarFontNameCombo Example

This example changes the font of a TEdit component.  The following code occurs within the TdxBarFontNameCombo OnChange event handler.

procedure TForm1.dxBarFontNameCombo1Change(Sender: TObject);

begin

  if Length(dxBarFontNameCombo1.Text) <> 0 then

    Edit1.Font.Name := dxBarFontNameCombo1.Text;

end;


TdxBarImageCombo.Items, TdxBarImageCombo.ImageIndexes, TdxBarImageCombo.Sorted Example

This example requires TdxBarImageCombo and TButton objects.  The code adds a new item to the TdxBarImageCombo drop down list and associates an image with the new item.

procedure TForm1.Button1Click(Sender: TObject);

var

  IsSorted : Boolean;

begin

with dxBarImageCombo1 do

  begin

    IsSorted := Sorted;

    if Sorted then Sorted := False;

    Items.Add('New item text');

    ImageIndexes[Items.Count-1] := 0;

    Sorted := IsSorted;

  end;

end;

Use the Exchange method to exchange the items in the list; You don’t need to exchange the ImageIndex values.  This code exchanges both the text strings and images of the items:

  dxBarImageCombo1.Exchange(0,1);


TdxBarDateCombo.Date Example

This example filters a table on a Date type field.  The filter date is selected by means of the TdxBarDateCombo.

procedure TForm1.dxBarDateCombo1Change(Sender: TObject);

begin

  Datasource1.Dataset.Filter :=

                  'Event_Date = ' + DateToStr(dxBardateCombo1.Date);

  Datasource1.Dataset.Filtered := True;

end;


TdxBarTreeViewCombo example

This example populates a drop down tree view with data from a self-referenced table.  The self-referenced table represents a firm’s management structure.  Large departments consist of small departments.  The table has the following structure:

Field Name	Field Type	Field Length
DepId	Number	2
DepParent	Number	2
DepName	Character	20

DepId is a department identification number, DepParent is the identification number of the parent department.  The DepId fields of the largest departments are equal to  -1.  You can use this example with smaller datasets.

procedure FillTheTreeViewNode;

 procedure AddProject(ACode : integer; ANode : TTreeNode);

 var

   OldFilterTmp   : String;

   OldFilteredTmp : Boolean;

   OldRecNo       : Integer;

   NewTreeNode    : TTreeNode;

 begin

   dxBarTreeViewCombo1.Items.Clear;

   with DataSource1.Dataset do

   begin

     OldRecNo := RecNo;

     OldFilterTmp := Filter;

     OldFilteredTmp := Filtered;

     Filtered := False;

     Filter := 'DepParent = '+IntToStr(ACode);

     Filtered := True;

     First;

     while not Eof do

     begin

       NewTreeNode :=  dxBarTreeViewCombo1.Items.

                        AddChild(ANode,FieldValues['DepName']);

       AddProject(FieldValues['DepId'], NewTreeNode);

       Next;

     end;

     Filter := OldFilterTmp;

     Filtered := OldFilteredTmp;

     RecNo := OldRecNo;

   end;

end;

var

  OldFilter   : String;

  OldFiltered : Boolean;

  NewRootNode : TTreeNode;

begin

  with DataSource1.Dataset do

  begin

    OldFilter := Filter;

    OldFiltered := Filtered;

    Filtered := False;

    Filter := ' DepParent = -1';

    Filtered := True;

    First;

    while not Eof do

    begin

      NewRootNode := dxBarTreeViewCombo1.

                              Items.Add(nil,FieldValues['DepName']);

      AddProject(FieldValues['DepId'], NewRootNode );

      Next;

    end;

    Filtered := False;

    Filter := OldFilter;

    Filtered := OldFiltered;

  end;

end;


TdxBarStatic Example

During long operations, such as locating a record in a large database, you may wish to display a wait cursor to the user.  The following code shows a way to use TdxBarStatic for this purpose:

var

  OldString : string;

{other strings of program}

begin

{other strings of program}

  OldStrings := dxBarStatic1.Caption;

  dxBarStatic1.Caption := 'Search in progress ...';

{locates the record}

  dxBarStatic1.Caption := OldString;

{other strings of program}

end;


TdxBarLookupCombo Example

This example shows how to use a TdxBarLookupCombo for record filtering.  For instance, you have two datasets: VENDORS and PARTS.  One record from VENDORS corresponds to several records in PARTS. Using the TdxBarLookupCombo you can get a list of all parts belonging to the vendor.  Set ListSource of the TdxBarLookupCombo to the datasource which specifies vendors and use the procedure below.  This procedure is contained within the TdxBarLookupCombo OnChange event handler.  The Datasource2.Dataset specifies the PARTS dataset.

procedure TForm1.dxBarLookupCombo1Change(Sender: TObject);

begin

Datasource2.Dataset.Filter :=

      dxBarLookupCombo1.KeyField + ' = ' +

                               VarToStr(dxBarLookupCombo1.KeyValue);

Datasource2.Dataset.Filtered := True;

end;


TdxBarDBNavigator.VisibleButtons Example

This procedure hides the TdxBarDBNavigator buttons and removes them from a form to avoid data modification.

dxBarDBNavigator1.VisibleButtons := dxBarDBNavigator1.VisibleButtons - [dxbnEdit, dxbnInsert, dxbnDelete, dxbnPost, dxbnCancel];

If you don’t want to remove buttons from the form but only wish to hide them, use the button Visible property.  The following code hides (but doesn’t remove from the form) all buttons:

dxbnBDBNavEdit.Visible := ivNever;   // hides the Edit button

dxbnBDBNavPost.Visible := ivNever;   // hides the Post button

dxbnBDBNavCancel.Visible := ivNever; // hides the Cancel button

dxbnBDBNavInsert.Visible := ivNever; // hides the Insert button

dxbnBDBNavDelete.Visible := ivNever; // hides the Delete button


TdxBar, TdxBars.Add, TdxBarItemLink, TdxBarItemLink.Item example
TdxBar, TdxBars.Add, TdxBarItemLink, TdxBarItemLink.Item, TdxBarColorCombo, TdxBarButton Example

This example requires a form with a TdxBarManager and a TdxBarButton object.  The following code adds a new toolbar to the form and creates a button with a color combo.  The procedures to add the new item controls to the toolbars are similar to this code:

var

  ABarManager : TdxBarManager;

  ABar : TdxBar;

  NewButton : TdxBarButton;

  NewColorCombo : TdxBarColorCombo;

  NewItemLink : TdxBarItemLink;

begin

  // Gets the bar manager

  ABarManager := GetBarManagerByForm(Form1);

  // New toolbar

  ABar := ABarManager.Bars.Add;

  ABar.Caption := 'New toolbar';

  ABar.DockingStyle := dsTop;

  ABar.FloatLeft := Form1.Left+(Form1.Width div 2);

  ABar.FloatTop :=  Form1.Height div 2;

  // New Button

  NewButton := TdxBarButton.Create(Form1);

  // Sets the OnClick event handler.

  // The OnClick1 procedure has been already defined.

  NewButton.OnClick := OnClick1;

  // Creates and adds the new item control to the toolbar

  NewItemLink := ABar.ItemLinks.Add;

  NewItemLink.Item := NewButton;

  NewButton.Caption := 'NewButton';

  // New Color Combo

  NewColorCombo := TdxBarColorCombo.Create(Form1);

  // Creates and adds the new item control to the toolbar

  NewItemLink := ABar.ItemLinks.Add;

  NewItemLink.Item := NewColorCombo;

  NewColorCombo.Text := 'clNavy';

  // Makes the toolbar visible

  ABar.Visible := True;

end;


TdxBarItem, TdxBaritemLinks.Add, TdxBarManager.MainMenuBar, TdxBarManager.MainForm Example

This example requires a form with a TdxBarManager.  It creates a new item of the TdxBarEdit type and places an item control, corresponding to this new item, onto the main toolbar (if it exists):

var

  ABarManager : TdxBarManager;

  ABar : TdxBar;

  AEdit : TdxBarEdit;

  AForm : TForm;  // for Delphi 4™ you should use TCustomForm

  AItemLink : TdxBarItemLink;

begin

  ABarManager := GetbarManagerByForm(form1);

  AForm := ABarManager.MainForm;

  ABar := ABarManager.MainMenuBar;

  if ABar <> nil then

  begin

    AEdit := TdxBarEdit.Create(AForm);

    AItemLink := ABar.ItemLinks.Add;

    AItemLink.Item := AEdit;

    ABar.Control.RepaintBar;

  end;

end;

You can use similar code to create items of any type, not just the TdxBarEdit type.


TCustomdxBarCombo, TCustomdxBarCombo.OnGetDropDownWindow, TdxBarManager.HideAll Example

This example creates a dropdown window with a grid.  The grid cells contain numbers.  The sum of the selected cells is added to the TCustomdxBarCombo.  The HideAll method of the TdxBarManager object is used to hide the dropdown grid.

{ TForm1  is a class of the form that contains the bar manager, toolbars and items; CustomdxBarCombo1  is an item of the TCustomdxBarCombo type; DropDownGrid1  is a dropdown window with a grid}

interface

uses

  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, dxBar, StdCtrls, Grids;

type

{Definiton of the form}

TForm1 = class(TForm)

   private

       . . . . .

{Definition of the dropdown grid class }

TDropDownGrid = class(TStringGrid)

   private

    FCustomCombo : TCustomdxBarCombo;

   public

    constructor Create(AOwner:TComponent); override;

    procedure CreateParams(var Params: TCreateParams); override;

    procedure CreateWnd; override;

    { MyMouseUp is an OnMouseUp event handler of the TDropDownGrid object }

    procedure MyMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

    property CustomCombo : TCustomdxBarCombo read FCustomCombo write FCustomCombo;

   end;

var

  DropDownGrid1 : TDropDownGrid;

implementation

constructor TDropDownGrid.Create(AOwner: TComponent);

var

 i, j : Integer;

begin

  inherited;

  RowCount := 5;

  ColCount := 5;

  FixedCols := 0;

  FixedRows := 0;

  DefaultColWidth := 20;

  DefaultRowHeight := 20;

  Width := DefaultColWidth*ColCount+9;

  Height := DefaultRowHeight*RowCount+9;

  ScrollBars := ssNone;

  {Setting the OnGetDropDownWindow event handler}

  OnMouseUp := MyMouseUp;

  for j:=0 to RowCount -1 do

    for i :=0 to ColCount -1 do

      Cells[i, j] := IntToStr(j*RowCount+i+1);

  Visible := False;

end;

procedure TDropDownGrid.CreateParams(var Params: TCreateParams);

begin

  inherited;

  with Params do

    ExStyle := ExStyle or WS_EX_TOOLWINDOW or WS_EX_TOPMOST;

end;

procedure TDropDownGrid.CreateWnd;

begin

  inherited;

  Windows.SetParent(Handle, 0);

  CallWindowProc(DefWndProc, Handle, WM_SETFOCUS, 0, 0);

end;

procedure TDropDownGrid.MyMouseUp(Sender: TObject;

Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

var

  i ,j, Sum : integer;

  CellValue, ZeroCode : integer;

begin

{Calculates the sum of cell numbers}

  Sum := 0;

  with DropDownGrid1.Selection do

  for i:=Left to Right do

    for j :=Top to Bottom do

    begin

      Val(DropDownGrid1.Cells[i,j], CellValue, ZeroCode);

      Sum := Sum + CellValue;

    end;

{Adds the sum to the TCustomdxBarCombo object}

CustomCombo.Text := IntToStr(Sum);

{Hides the dropdown grid}

CustomCombo.BarManager.HideAll;

end;

constructor TForm1.Create(Aowner : Tcomponent);

begin

  inherited;

  DropDownGrid1 := TDropDownGrid.Create(Form1);

  DropDownGrid1.Parent := Self;

  DropDownGrid1.CustomCombo := CustomdxBarCombo1;

end;

destructor TForm1.Destroy;

begin

  DropDownGrid1.Free;

  inherited;

end;

{This procedure is the TCustomdxBarCombo OnGetDropDown event handler}

procedure TForm1.CustomdxBarCombo1GetDropDownWindow(

  Sender: TCustomdxBarCombo; var Window: HWND);

begin

{The dropdown window handle}

Window := DropDownGrid1.Handle;

end;


TdxBarItem.Visible Example

This example requires a TEdit object and demonstrates a method to hide and display item controls when you move through controls on a form.  When TEdit gets focus, the color combo and the font combo on the toolbar are made visible to set the text font or text color for the TEdit control.  When the TEdit control loses focus, the font name combo and color combo are hidden.

procedure TForm1.Edit1Enter(Sender: TObject);

begin

  dxBarFontNameCombo1.Visible := ivAlways;

  dxBarColorCombo1.Visible := ivAlways;

end;

procedure TForm1.Edit1Exit(Sender: TObject);

begin

  dxBarFontNameCombo1.Visible := ivNever;

  dxBarColorCombo1.Visible := ivNever;

end;


TdxBarEdit Example

The following code demonstrates how to organize and edit an item, into which only numbers may be entered.  For example, the string '777' is automatically replaced by '333' and then text highlighting is removed.  Highlighting appears on the assignment of the CurText property.  The dxBarEdit1KeyPress is the TdxBarEdit OnKeyPress event handler, the dxBarEdit1CurChange is the TdxBarEdit OnCurChange event handler.

dxBarEdit1: TdxBarEdit;

dxBarEdit1.OnKeyPress = dxBarEdit1KeyPress;

dxBarEdit1.OnCurChange = dxBarEdit1CurChange;

{ . . . . . . . . }

procedure TMainForm.dxBarEdit1KeyPress(Sender: TObject; var Key: Char);

begin

  if not (Key in [Chr(VK_BACK), '0'..'9']) then Key := #0;

end;

procedure TMainForm.dxBarEdit1CurChange(Sender: TObject);

begin

  with TdxBarEdit(Sender) do

    if CurText = '777' then

    begin

      CurText := '333';

      SendMessage(TdxBarWinControl(CurItemLink.Control).Handle, EM_SETSEL, -1, 0);

    end;

end;


TdxBarListItem Example

The following code demonstrates organization of MDI child lists with the help of the TdxBarListItem object.  If the ShowCheck property of a given class is equal to True, then at the current item (in our case it is the current MDI child form) a "check" is displayed.  While selecting any window from the list, it becomes active - While destroying - it removes the corresponding string.  This example assumes that the window caption contains the file name.  With the change of this name, the caption and the corresponding string in the MDI child list also changes.

MainForm: TMainForm

dxBarListWindows: TdxBarListItem

dxBarListWindows.ShowCheck = True

{ . . . . . . . . }

//In MDI child (TChildForm.FormStyle = fsMDIChild):

procedure TChildForm.FormCreate(Sender: TObject);

begin

  Inc(MainForm.CreatedMDICount);

  Caption := 'Document' + IntToStr(MainForm.CreatedMDICount);

  MainForm.dxBarListWindows.Items.AddObject(Caption, Self);

end;

procedure TChildForm.FormDestroy(Sender: TObject);

begin

  with MainForm.dxBarListWindows.Items do

    Delete(IndexOfObject(Self));

end;

procedure TChildForm.SetFileName(Value: string);

var

  I: Integer;

begin

  Caption := Value;

  with MainForm.dxBarListWindows do

  begin

    I := Items.IndexOfObject(Self);

    if (0 <= I) and (I < Items.Count) then Items[I] := Value;

  end;

end;

// in MDI frame (TMainForm.FormStyle = fsMDIForm):

procedure TMainForm.dxBarListWindowsGetData(Sender: TObject);

begin

  with dxBarListWindows do

    ItemIndex := Items.IndexOfObject(ActiveMDIChild);

end;

procedure TMainForm.dxBarListWindowsClick(Sender: TObject);

begin

  with dxBarListWindows do

    if ItemIndex > -1 then

      TCustomForm(Items.Objects[ItemIndex]).Show;

end;


TdxBarSubItem Example

In the following example, values entered in edit are saved in subitem in such an order that the last input string is first.  This process is organized by means of only one item of type TdxBarButton.

In its ItemLinks, the UserCaption property changes to entered string.

dxBarEdit1: TdxBarEdit

dxBarEdit1.OnChange = dxBarEdit1Change

dxBarSubItemHistory: TdxBarSubItem

dxBarButtonHistory: TdxBarButton

dxBarButtonHistory.OnClick = dxBarButtonHistoryClick

{ . . . . . . . . }

var

  FSettingText: Boolean;

procedure TMainForm.dxBarEdit1Change(Sender: TObject);

begin

  if not FSettingText then

    with dxBarSubItemHistory.ItemLinks.Add do

    begin

      Index := 0;

      Item := dxBarButtonHistory;

      UserCaption := TdxBarEdit(Sender).Text;

    end;

end;

procedure TMainForm.dxBarButtonHistoryClick(Sender: TObject);

begin

  FSettingText := True;

  dxBarEdit1.Text := TdxBarButton(Sender).ClickItemLink.Caption;

  FSettingText := False;

end;


Legend

Protected

Published

ReadOnly