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


dxBarDBNav Unit Overview
dxBarDBNav Unit

Components

TdxBarDBNavigator

Classes

TdxBarDBCheckLink

TdxBarDBCheckLinks

TdxBarDBNavButton

Other Types

TdxBarDBEnableType

TdxBarDBNavButtonType


TdxBarDBNavigator
  TdxBarDBNavigator Object

Hierarchy          Properties           Methods            See Also            Example

The 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

The TdxBarDBNavigator is similar to the Delphi TDBNavigator object.  The button type, their location, and appearance aspects of the TdxBarDBNavigator are determined by an application.  In addition, you may create links between TdxBarManager items and a dataset’s state using specific conditions.

Note:	The TdxBarManager can work with only one TdxBarDBNavigator object.


Hierarchy

TComponent

|

TdxBarDBNavigator


TdxBarDBNavigator Properties

TdxBarDBNavigator               Legend

In TdxBarDBNavigator

BarManager

Buttons

CategoryName

ConfirmDelete

DataSource

DBCheckLinks

VisibleButtons


TdxBarDBNavigator Methods

TdxBarDBNavigator               Legend

In TxBarDBNavigator

Create

Destroy


TdxBarDBNavigator.Buttons

TdxBarDBNavigator            See Also

Contains a list of available buttons.

type

  TdxBarDBNavButtonType = (dxbnFirst, dxbnPrior, dxbnNext, dxbnLast, dxbnInsert, dxbnDelete, dxbnEdit, dxbnPost, dxbnCancel, dxbnRefresh);

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

Specifies the bar manager for the current TdxBarDBNavigator.

property BarManager: TdxBarManager;

Description

Use the BarManager property to specify the bar manager of the TdxBarManager type to which the current TdxBarDBNavigator belongs.  The TdxBarManager supports a single TdxBarDBNavigator object.


TdxBarDBNavigator.CategoryName

TdxBarDBNavigator            See Also

Specifies the bar manager category for the current TdxBarDBNavigator.

property CategoryName: string;

Description

The CategoryName property specifies the name of the default category for TdxBarDBNavigator buttons.


TdxBarDBNavigator.ConfirmDelete

TdxBarDBNavigator

Determines whether end-users should confirm record deletion.

property ConfirmDelete: Boolean;

Description

If the ConfirmDelete property is set to True, clicking the Delete toolbar button shows a confirmation dialog.  Otherwise, the record is deleted without user notification.


TdxBarDBNavigator.DataSource

TdxBarDBNavigator

Specifies the TDataSource object which can be accessed by the current TdxBarDBNavigator.

property DataSource: TDataSource;

Description

Use the DataSource property to connect the TdxBarDBNavigator to a dataset.  Once set, the TdxBarDBNavigator buttons can operate directly with dataset records.


TdxBarDBNavigator.DBCheckLinks

TdxBarDBNavigator            See Also

Specifies the list of item links between toolbar items and dataset’s states.

property DBCheckLinks: TdxBarDBCheckLinks;

Description

If there is a link between an item and a dataset’s state, the item’s Enabled property is changed accordingly to the dataset’s state.  Each link is represented by the TdxBarDBCheckLink object.  The TdxBarDBCheckLinks object contains a list of these links.


TdxBarDBNavigator.VisibleButtons

TdxBarDBNavigator            See Also                Example

Specifies a collection of buttons that are shown in the item list of the Customization Form.

type

  TdxBarDBNavButtonType = (dxbnFirst, dxbnPrior, dxbnNext, dxbnLast, dxbnInsert, dxbnDelete, dxbnEdit, dxbnPost, dxbnCancel, dxbnRefresh);

  TdxBarDBNavButtonTypes = set of TdxBarDBNavButtonType;

property VisibleButtons: TdxBarDBNavButtonTypes;

Description

The VisibleButtons property contains a collection of button types which was created in a bar manager’s category.  The items which correspond to the visible buttons can be placed on any TdxBarManager toolbar or TdxBarPopupMenu.  The buttons can also be moved to any category.  Use the bar manager’s CategoryItemsVisible property to specify the visibility of the category items that correspond to the buttons.  This is useful when it’s necessary to restrict user actions on data (for instance, to provide full access or read-only access to data records).


TdxBarDBNavigator.Create

TdxBarDBNavigator            See Also

Creates the TdxBarDBNavigator object.

constructor Create(AOwner: TComponent); override;

Description

This method creates and initializes an instance of the TdxBarDBNavigator type.  The AOwner parameter specifies the form that owns the created TdxBarDBNavigator.  The Create method initializes the created TdxBarDBNavigator as follows:

•	sets the BarManager property to the TdxBarManager which is currently on the form;

•	loads the default value for the CategoryName property from resources;


TdxBarDBNavigator.Destroy

TdxBarDBNavigator            See Also

Destroys the current TdxBarDBNavigator object.

destructor Destroy; override;

Description

Before calling the inherited method, the Destroy method frees the VisibleButtons list.


TdxBarDBCheckLink
TdxBarDBCheckLink Object

Hierarchy          Properties

Defines the link between the item’s 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 visual control (via the corresponding item’s Enabled property).  For example, some controls can be disabled when a bound dataset’s state is changed from dsEdit to dsBrowse.  A link is represented by an instance of the TdxBarDBCheckLink class.

Note:	This class is for internal purposes only.


Hierarchy

TCollectionItem

|

TdxBarDBCheckLink


TdxBarDBCheckLink Properties

TdxBarDBCheckLink               Legend

In TdxBarDBCheckLink

Item

EnableTypes

DBNavigator


TdxBarDBCheckLink Methods

TdxBarDBCheckLink               Legend

In TdxBarDBCheckLink

Assign


TdxBarDBCheckLink.Item

TdxBarDBCheckLink

Specifies the item whose Enabled property is changed according to changes to a dataset’s state.

property Item: TdxBarItem;

Description

Use the Item property to specify the item whose Enabled property is changed according to changes to a dataset’s state.  The Enabled property of all the controls that correspond to this item are changed when the state of the bound dataset is changed.  For example, you can disable a font combo box when the bound dataset’s state is changed from dsEdit to dsBrowse.


TdxBarDBCheckLink.EnableTypes

TdxBarDBCheckLink

Specifies the conditions that affect the values of the item’s Enabled property.

type

  TdxBarDBEnableType = (dxdbtCanModify, dxdbtNotEOF, dxdbtNotBOF, dxdbtHasRecords, dxdbtIsModified, dxdbtIsNotModified);

  TdxBarDBEnableTypes = set of TdxBarDBEnableType;

property EnableTypes: TdxBarDBEnableTypes;

Description

Use the EnabledTypes property to specify the type of the link between an item and a dataset’s state.  The value of the item’s Enabled property is equal to True when the bound dataset is active and all the conditions specified by the corresponding EnableTypes flags are met.  Otherwise, it’s equal to False.


TdxBarDBCheckLink.Assign

TdxBarDBCheckLink          See Also

Copies the properties of another TdxBarDBCheckLink object.

procedure Assign(Value: TPersistent); override;

Description

Call the Assign method to set the DB check link’s published properties to the values of properties specified by Source.  If Source is a TdxBarDBCheckLink object, the Assign method matches the link properties of the source.

If Source is not a TdxBarDBCheckLink object, the Assign method calls the inherited method to copy item link properties from any object that can assign them through the AssignTo method.


TdxBarDBCheckLink.DBNavigator

TdxBarDBCheckLink

Provides access to the DBNavigator that the current DB check link belongs to.

property DBNavigator: TdxBarDBNavigator;

ReadOnly Property


TdxBarDBCheckLinks
TdxBarDBCheckLinks Object

Hierarchy          Properties           Methods            See Also

Represents the list which stores all the information about the links between toolbar items and dataset’s states.

Unit

dxBarDBNav

TdxBarDBCheckLinks = class(TCollection);

Description

The TdxBarDBCheckLinks object represents a list of the TdxBarDBCheckLinks which are managed by TdxBarDBNavigator.

This class is for internal purposes only.


Hierarchy

TCollection

|

TdxBarDBCheckLinks


TdxBarDBCheckLinks Properties

TdxBarDBCheckLinks               Legend

In TdxBarDBCheckLinks

Items


TdxBarDBCheckLinks Methods

TdxBarDBCheckLinks               Legend

In TdxBarDBCheckLinks

Add

GetOwner

RemoveItem


TdxBarDBCheckLinks.Items

TdxBarDBCheckLinks            See Also

Provides indexed access to the links between items and dataset’s states.

property Items[Index: Integer]: TdxBarDBCheckLink;

Description

The Items property is a zero-based indexed collection of the links of the TdxBarDBCheckLink type.  Each link can be accessed using its index within the collection.

ReadOnly Property


TdxBarDBCheckLinks.GetOwner

TdxBarDBCheckLinks

Returns an object which owns the current TdxBarDBCheckLinks collection.

function GetOwner: TPersistent; override;

Description

Returns an object of the TdxBarDBNavigator type that owns the current TdxBarDBCheckLinks collection of the links between items and dataset’s states.

Note:	This method is only available in Delphi 3™ or higher.


TdxBarDBCheckLinks.RemoveItem

TdxBarDBCheckLinks

Removes a link from the current TdxBarDBCheckLinks collection.

procedure RemoveItem(Item: TdxBarItem);

Description

Call the RemoveItem method to remove the link between a particular toolbar item and a dataset’s state from the current TdxBarDBCheckLinks collection. The Item parameter specifies the toolbar item for which the link is removed.


TdxBarDBCheckLinks.Add

TdxBarDBCheckLinks            See Also

This method adds a new link to the current TdxBarDBCheckLinks collection.

function Add: TdxBarDBCheckLink;

Description

The TdxBarDBCheckLink object describes a single link between a dataset’s state and the toolbar item’s Enabled property.  Calling the Add function adds a new link (not associated with any toolbar item) to the current TdxBarDBCheckLinks collection and returns the link.  This link is appended as the last item within the collection.


TdxBarDBNavButton
TdxBarDBNavButton Object

Hierarchy          Properties           Methods          Events

This class represents the TdxBarDBNavigator button.

Unit

dxBarDBNav

TdxBarDBNavButton = class(TdxBarButton);

Description

The TdxBarDBNavButton class extends its ancestor class with several properties which are specific to data-aware components.  An item (button) of the TdxBarDBNavButton type performs specific actions on datasets such as navigating through the dataset records, editing records, refreshing data, etc.


Hierarchy

TComponent

|

TdxBarComponent

|

TdxBarItem

|

TdxBarButton

|

TdxBarDBNavButton


TdxBarDBNavButton Properties

TdxBarDBNavButton               Legend

In TdxBarDBNavButton

BarDBNavigator

NavButton

Derived from TdxBarButton

AllowAllUp

ButtonStyle

CloseSubMenuOnClick

Down

DropDownEnabled

DropDownMenu

GroupIndex

Lowered

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


TdxBarDBNavButton Event
TdxBarDBNavButton Events

TdxBarDBNavButton               Legend

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TdxBarDBNavButton Methods

TdxBarDBNavButton               Legend

In TdxBarDBNavButton

Destroy

DoClick

Derived from TdxBarButton

ButtonStyleChanged

CanChangePaintStyle

Click

DownChanged

DoDropDown

DropDownEnabledChanged

PaintStyleChanged

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarDBNavButton.BarDBNavigator

TdxBarDBNavButton            See Also

Provides access to the TdxBarDBNavigator to which a given button belongs.

property BarDBNavigator: TdxBarDBNavigator;

Description

Use the BarDBNavigator property to access the TdxBarDBNavigator which manages a given button.

ReadOnly Property


TdxBarDBNavButton.NavButton

TdxBarDBNavButton            See Also

Determines the type of a given button.

type

  TdxBarDBNavButtonType = (dxbnFirst, dxbnPrior, dxbnNext, dxbnLast, dxbnInsert, dxbnDelete, dxbnEdit, dxbnPost, dxbnCancel, dxbnRefresh);

property NavButton: TdxBarDBNavButtonType;

Description

Use the NavButton property to specify the type of a given button.  The type of a button determines the action which is performed on the bound dataset (accessible via the TdxBarDBNavigator.DataSource property) when the button is clicked.


TdxBarDBNavButton.Destroy

TdxBarDBNavButton            See Also

Destroys an instance of the TdxBarDBNavButton type.

destructor Destroy; override;

Description

Calling the Destroy method removes the button from the Buttons and VisibleButtons collections of the corresponding TdxBarDBNavigator and also destroys a given instance.


TdxBarDBNavButton.DoClick

TdxBarDBNavButton            See Also

Processes mouse click events.

procedure DoClick; override;

Description

After calling the inherited method, the DoClick method generates the button’s OnClick event and then performs specific actions on a dataset.  The type of current button determines the action which is performed on the dataset when the button is clicked.


TdxBarDBNavButtonType

Defines the TdxBarDBNavigator button types.

Unit

dxBarDBNav

type

  TdxBarDBNavButtonType = (dxbnFirst, dxbnPrior, dxbnNext, dxbnLast, dxbnInsert, dxbnDelete, dxbnEdit, dxbnPost, dxbnCancel, dxbnRefresh);

  TdxBarDBNavButtonTypes = set of TdxBarDBNavButtonType;

Description

The TdxBarDBNavButtonTypes represents a set of the buttons which will be available within the TdxBarDBNavigator.  The button types are similar to those of the TDBNavigator.

All the possible values are listed in the following table.

Value	Meaning
dxbnFirst	Corresponds to the ‘First’ button.  Clicking this button moves the cursor to the beginning of a dataset.
dxbnPrior	Corresponds to the ‘Prior’ button.  Clicking this button moves the cursor to the previous record.
dxbnNext	Corresponds to the ‘Next’ button.  Clicking this button moves the cursor to the next record.
dxbnLast	Corresponds to the ‘Last’ button.  Clicking this button moves the cursor to the end of a dataset.
dxbnInsert	Corresponds to the ‘Insert’ button.  Clicking this button inserts a record into a dataset.
dxbnDelete	Corresponds to the ‘Delete’ button.  Clicking this button deletes a record from a dataset.
dxbnEdit	Corresponds to the ‘Edit’ button.  Clicking this button allows editing within a dataset.
dxbnPost	Corresponds to the ‘Post’ button.  Clicking this button posts changes to a dataset.
dxbnCancel	Corresponds to the ‘Cancel’ button.  Clicking this button discards changes made to a dataset.
dxbnRefresh	Corresponds to the ‘Refresh’ button.  Clicking this button refreshes a dataset’s view of data.


TdxBarDBEnableType

See Also

Defines the types of changes to the dataset’s state that affect the Enabled property of the items.

Unit

dxBarDBNav

type

  TdxBarDBEnableType = (dxdbtCanModify, dxdbtNotEOF, dxdbtNotBOF, dxdbtHasRecords, dxdbtIsModified, dxdbtIsNotModified);

  TdxBarDBEnableTypes = set of TdxBarDBEnableType;

Description

The TdxBarDBEnableTypes represents the types of changes to the dataset’s state that affect the Enabled property of the items via the TdxBarDBCheckLink object.  The item is enabled when all the specified types correspond to the current dataset’s state.

All the possible values are listed in the following table.

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 a 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.


dxBarExtDBItems Unit Overview
dxBarExtDBItems Unit

Items

TdxBarLookupCombo

Item Controls

TdxBarLookupComboControl

Objects

TdxBarLookupLink

TdxBarPopupLookupControl


TdxBarLookupCombo
TdxBarLookupCombo Object

Hierarchy          Properties           Methods           Events           See Also            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

     |

TdxBarComponent

     |

TdxBarItem

     |

TdxBarWindowItem

     |

TdxBarEdit

     |

TCustomdxBarCombo

     |

TdxBarLookupCombo


TdxBarLookupCombo Properties

TdxBarLookupCombo               Legend

In TdxBarLookupCombo

AllowResizing

Color

EditText

ImmediateDropDown

KeyField

KeyValue

ListField

ListFields

ListFieldIndex

ListLink

ListSource

PopupWidth

RowCount

Derived from TCustomdxBarCombo

DropDownWindow

DroppedDown

ShowEditor

Derived from TdxBarEdit

MaxLength

ReadOnly

Derived from TdxCustomBarEdit

ShowCaption

StyleEdit

Width

Derived from TdxBarWindowItem

CurText

EmptyWindow

FocusedItemLink

Text

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


TdxBarLookupCombo Methods

TdxBarLookupCombo               Legend

In TdxBarLookupCombo

DoClick

CheckKeyForDropDownWindow

KeyDown

KeyPress

Derived from TCustomdxBarCombo

AfterDropDown

CheckKeyForDropDownWindow

CloseUp

DropDown

GetDropDownWindow

Derived from TdxCustomBarEdit

WidthChanged

Derived from TdxBarWindowItem

Change

CurChange

DoEnter

DoExit

KeyDown

KeyPress

KeyUp

SetFocus

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

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 property 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
TdxBarLookupComboControl Object

Hierarchy          Properties          Methods          See Also

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

     |

TdxCustomBarEditControl

     |

TdxBarEditControl

     |

TCustomdxBarComboControl

     |

TdxBarLookupComboControl


TdxBarLookupComboControl Properties

TdxBarLookupComboContro          Legend

Derived from TCustomdxBarComboControl

DropDownButtonRect

DropDownWindow

DroppedDown

Item

Derived from TdxBarEditControl

Item

MaxLength

ReadOnly

Derived from TdxCustomBarEditControl

CaptionWidth

ShowCaption

Derived from TdxBarWinControl

Focused

Handle

Item

Text

WindowRect

Derived from TdxBarItemControl

BarManager

 	Caption

Enabled

Glyph

Height

Hint

IsActive

IsSelected

ImageIndex

Item

ItemLink

PainterClass

Parent

Pressed

ShortCut

Width


TdxBarLookupComboControl Methods

TdxBarLookupComboContro          Legend

Derived from TCustomdxBarComboControl

ControlInactivate

Derived from TdxBarWinControl

CanClicked

ControlClick

HasWindow

IsDestroyOnClick

WndProc

Derived from TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

HasWindow

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged

WidthChanged


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

     |

TdxBarLookupLink


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

     |

TdxBarPopupLookupControl


Unit dxBarConverter
dxBarConverter Unit

Controls

TdxBarConverter


TdxBarConverter
 TdxBarConverter Object

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


TdxBarConverter Properties

TdxBarConverter               Legend

In TdxBarConverter

BarManager

Execute

Menu


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.


How to Add an Editor from the Editor Repository

See Also

This topic describes how you can quickly create an editor and insert it into a bar using the editor repository.

The editor repository is represented by the TcxEditRepository component.  It stores a collection of pre-configured editors and allows developers to quickly create the required editor and insert it into a bar.

To use editors from the editor repository in your application, do the following:

1.	Drop the TcxEditRepository component from the Component Palette (this component is located on the Express Utilities page) onto a form.

2.	Double-click the dropped icon or select Edit from its context menu to open the repository dialog.

3.	In the repository dialog, click the Add button to show the Select EditRepositoryItem dialog.  Choose the repository item that relates to the editor you need (in this example, the SpinEdit item).

4.	Using the Object Inspector, name it SpinItem.

5.	Assign this repository item to the TcxBarEditItem.RepositoryItem property in order to place the editor into a bar (in this example into the Custom 1 bar) as shown in the code below.

The sample code below assumes that this bar has already been added to the ExpressBars6MainForm form.

// Delphi

uses

  ..., cxSpinEdit, cxBarEditItem, cxEditRepositoryItems;

procedure TExpressBars6MainForm.FormCreate(Sender: TObject);

var

  ABarManager : TdxBarManager;

  ABar : TdxBar;

  ABarEditItem: TcxBarEditItem;

begin

  ABarManager := GetBarManagerByForm(ExpressBars6MainForm);

  with ABarManager do

  begin

    ABar := BarByCaption('Custom 1');

    if ABar <> nil then

    begin

      BeginUpdate;

      try

        ABarEditItem := TcxBarEditItem(ABar.ItemLinks.AddItem(TcxBarEditItem).Item);

        with ABarEditItem do

        begin

          RepositoryItem := SpinItem;

          Caption := 'Spin Edit';

          ShowCaption := True;

        end;

      finally

        EndUpdate;

      end;

    end;

  end;

end;

// C++Builder

#pragma link "cxEditRepositoryItems"

#pragma link "cxBarEditItem"

// ...

void __fastcall TExpressBars6MainForm::FormCreate(TObject *Sender)

{

  TdxBarManager * ABarManager;

  TdxBar * ABar;

  TcxBarEditItem * ABarEditItem;

  ABarManager = GetBarManagerByForm(ExpressBars6MainForm);

  ABar = ABarManager->BarByCaption("Custom 1");

  if (ABar != NULL)

  {

    ABarManager->BeginUpdate();

    try

    {

      ABarEditItem = (TcxBarEditItem*)(ABar->ItemLinks->AddItem(__classid(TcxBarEditItem))->Item);

      ABarEditItem->RepositoryItem = SpinItem;

      ABarEditItem->Caption = "Spin Edit";

      ABarEditItem->ShowCaption = True;

    }

    __finally

    {

      ABarManager->EndUpdate();

    }

  }

}

Note:	To use an editor from the editor repository in code, pass TcxBarEditItem as an argument into the TdxBarItemLinks.AddItem method.  The example above assumes that the bar named Custom 1 has already been added to the ExpressBars6MainForm form.

The image below shows the embedded spin editor when the application runs.


How to Add a Standalone Editor to a Toolbar

See Also

In addition to built-in bar editors, the ExpressBars Suite also allows you to place standalone editors from the ExpressEditors library onto any toolbar or menu.  This topic demonstrates how to add a standalone editor from this library to a toolbar at design and runtime.

To add an editor programmatically you need to:

•	add a TcxBarEditItem by passing the TcxBarEditItem as an argument into the TdxBarItemLinks.AddItem method;

•	use the item’s TcxBarEditItem.PropertiesClass or TcxBarEditItem.PropertiesClassName property to associate the desired ExpressEditors with the item.

The following code snippet adds a TcxCalcEdit, and it assumes that a bar named Custom 1 has already been added to the ExpressBars6MainForm form.

// Delphi

uses

  ..., cxCalc, cxBarEditItem;

procedure TExpressBars6MainForm.FormCreate(Sender: TObject);

var

  ABarManager : TdxBarManager;

  ABar : TdxBar;

  ABarEditItem: TcxBarEditItem;

begin

  ABarManager := GetBarManagerByForm(ExpressBars6MainForm);

  with ABarManager do

  begin

    ABar := BarByCaption('Custom 1');

    if ABar <> nil then

    begin

      BeginUpdate;

      try

        ABarEditItem := TcxBarEditItem(ABar.ItemLinks.AddItem(TcxBarEditItem).Item);

        with ABarEditItem do

        begin

          PropertiesClass := TcxCalcEditProperties;

          Caption := 'Calc Edit';

          ShowCaption := True;

        end;

      finally

        EndUpdate;

      end;

    end;

  end;

end;

// C++Builder

#pragma link "cxCalc"

#pragma link "cxBarEditItem"

// ...

void __fastcall TExpressBars6MainForm::FormCreate(TObject *Sender)

{

  TdxBarManager * ABarManager;

  TdxBar * ABar;

  TcxBarEditItem * ABarEditItem;

  ABarManager = GetBarManagerByForm(ExpressBars6MainForm);

  ABar = ABarManager->BarByCaption("Custom 1");

  if (ABar != NULL)

  {

    ABarManager->BeginUpdate();

    try

    {

      ABarEditItem = (TcxBarEditItem*)(ABar->ItemLinks->AddItem(__classid(TcxBarEditItem))->Item);

      ABarEditItem->PropertiesClass = __classid(TcxCalcEditProperties);

      ABarEditItem->Caption = "Calc Edit";

      ABarEditItem->ShowCaption = True;

    }

    __finally

    {

      ABarManager->EndUpdate();

    }

  }

}

The following image shows the result when the above code executes.

To add a standalone editor at design time, right-click the desired bar and choose Add cxEditItem and then select the appropriate editor type within the submenu (see the image below).


How to Add Buttons to a Toolbar

See Also

This topic demonstrates how to add buttons to toolbars at design and runtime.

To add a button at design time, right-click on a toolbar and select Add Button from the popup menu.

When coding, you should create a link to the button within a toolbar.  The following code snippet adds a button to the first dxBarManager toolbar.

// Delphi

// ...

procedure TForm1.AddButtonClick(Sender: TObject);

begin

  with dxBarManager do

  begin

    BeginUpdate;

    try

      with Bars[0].ItemLinks.AddButton do

      begin

        Item.Caption := '&File';

        UserPaintStyle := psCaption;

      end;

    finally

      EndUpdate;

    end;

  end;

end;

// C++ Builder

// ...

void __fastcall TForm1::AddButtonClick(TObject *Sender)

{

  TdxBarItemLink * NewItemLink;

  dxBarManager->BeginUpdate();

  try {

    NewItemLink = dxBarManager->Bars->Items[0]->ItemLinks->AddButton();

    NewItemLink->Item->Caption = "&File";

    NewItemLink->UserPaintStyle = psCaption;

  }

  __finally {

    dxBarManager->EndUpdate();

  }

}


How to Export a Toolbar From a Child Form to a Main Form

See Also

This topic explains how to copy toolbars from a bar manager located on child forms to the bar manager within the main form.

To create toolbars on a child form and then integrate them onto the main form, you must use the TdxBarManager.Merge method as shown below:

// Delphi

// ...

  // set the second parameter to True to create new toolbars in the

  // main form, if the bar captions of the main and child forms do

  // not match

  MaindxBarManager.Merge(ChilddxBarManager, True);

// C++ Builder

// ...

  // set the second parameter to True to create new toolbars in the

  // main form, if the bar captions of the main and child forms do

  // not match

  MaindxBarManager->Merge(ChilddxBarManager, True);

Note:	You can omit passing the second parameter (which is True by default).

To "detach" toolbars, use the TdxBarManager.Unmerge method as shown below.

// Delphi

// ...

  MaindxBarManager.Unmerge(ChilddxBarManager);

// C++ Builder

// ...

  MaindxBarManager->Unmerge(ChilddxBarManager);

Note:	We recommend that you use a bar manager on the main form when merging/unmerging toolbars.  This allows you to dynamically change, display, and 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

See Also

This example illustrates how to create new items at runtime and then add them to a toolbar or sub menu.  The code below creates items of type TdxBarColorCombo and TdxBarButton and places them onto a toolbar or in a sub menu.  First you should place a bar manager and a toolbar on a form and add a subitem to the toolbar calling it siFormat.  The btnCustomColorClick procedure represents the button’s OnClick event handler.

// Delphi

uses

  ..., dxBarExtItems;

// ...

type

  TMainForm = class(TForm)

  private

    // ...

    procedure btnCustomColorClick(Sender: TObject);

    // ...

  end;

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 dxBarManager1.Bars[0], ItemLinks do

  begin

    BeginUpdate;

    with Add do

    begin

      Item := cbColor;

      Index := 0;

      BringToTopInRecentList(False);

    end;

    with Add do

    begin

      Item := btnCustomColor;

      Index := 1;

      BringToTopInRecentList(False);

    end;

    EndUpdate;

  end;

end;

// C++ Builder

Unit1.h

// ...

#include "dxBarExtItems.hpp"

// ...

class TMainForm : public TForm

{

// ...

private:

  void __fastcall btnCustomColorClick(TObject *Sender);

// ...

};

Unit1.cpp

// ...

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 TMainForm::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[0]->ItemLinks->BeginUpdate();

  NewItemLink = dxBarManager->Bars->Items[0]->ItemLinks->Add();

  NewItemLink->Item = cbColor;

  NewItemLink->Index = 0;

  NewItemLink->BringToTopInRecentList(false);

  NewItemLink = dxBarManager->Bars->Items[0]->ItemLinks->Add();

  NewItemLink->Item = btnCustomColor;

  NewItemLink->Index = 1;

  NewItemLink->BringToTopInRecentList(false);

  dxBarManager->Bars->Items[0]->ItemLinks->EndUpdate();

}


How to Create a Popup Menu at Runtime

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.  The Memo1MouseDown procedure represents the TMemo.OnMouseDown event handler.

// Delphi

type

  TMainForm = class(TForm)

  private

    // ...

    procedure PopupMenuButtonClick(Sender: TObject);

    // ...

  end;

// ...

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;

// C++ Builder

Unit1.h

// ...

class TMainForm : public TForm

{

// ...

private:

  void __fastcall PopupMenuButtonClick(TObject *Sender);

// ...

};

Unit1.cpp

// ...

const int ButtonCount = 5;

const AnsiString Captions[ButtonCount] = {"Cu&t", "&Copy", "&Paste", "Cle&ar", "&Select All"};

void __fastcall TMainForm::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 TMainForm::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

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 ADockRow.ColList.Count > 0 then

        begin

          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;

    end;

    Visible := AVisible;

  end;

end;

// 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 (ADockRow->ColList->Count > 0)

      {

        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

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 docked to a form’s top, to eliminate this free space.

// Delphi

// ...

procedure TMainForm.ArrangeBarsButtonClick(Sender: TObject);

var

  I, J, Offset: Integer;

  DockRow: TdxDockRow;

begin

  with dxBarManager do

  begin

    BeginUpdate;

    try

      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;

    finally

      EndUpdate;

    end;

  end;

end;

// C++ Builder

// ...

void __fastcall TMainForm::ArrangeBarsButtonClick(TObject *Sender)

{

  int I, J, Offset;

  TdxDockRow * DockRow;

  TdxDockCol * DockCol;

  dxBarManager->BeginUpdate();

  try {

    for(J=0;J<dxBarManager->Bars->DockControls[dsTop]->RowList->Count;J++)

    {

      DockRow = (TdxDockRow *)(dxBarManager->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;

    }

  }

  __finally {

    dxBarManager->EndUpdate();

  }

}


How to Convert Standard Menus to ExpressBars Menus

Use the TdxBarConverter component to convert standard TMainMenu or TPopupMenu to ExpressBars menus.  TdxBarConverter converts standard menu items to ExpressBars 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 via the TdxBarConverter.Menu property;

•	use the TdxBarConverter.BarManager property to specify a TdxBarManager object which will manage items created based on the standard menu.

After you complete the steps listed above, double-click the TdxBarConverter.Execute property (or press the ellipsis button).


How to Dock a Floating Toolbar to its Previous Position Upon Closing

To implement this feature, you must handle a bar manager’s OnBarClose event as shown in the following code example.

// 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::dxBarManagerBarClose(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 its AllowCustomizing and AllowQuickCustomizing properties to False.

To disable toolbar docking to a dock control, use the toolbar’s NotDocking property.  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[0] do

begin

  AllowCustomizing := False;

  AllowQuickCustomizing := False;

  NotDocking := [dsNone,dsLeft,dsTop,dsRight,dsBottom];

end;

// C++ Builder

// ...

TdxBar * Bar;

Bar = dxBarManager->Bars->Items[0];

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

  with 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<dxBarManager->Bars->Count;I++)

    if (dxBarManager->Bars->Items[I]->DockingStyle == dsTop)

    {

      dxBarManager->Bars->Items[I]->NotDocking.Clear();

      dxBarManager->Bars->Items[I]->NotDocking << dsNone << dsLeft << dsRight << dsBottom;

      dxBarManager->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 a bar manager’s 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

This example demonstrates how you can add your own items to the Toolbars Popup Menu.

Let’s add the Show Captions option to this popup menu.  This option toggles the captions of all TdxBarLargeButtons within toolbars.

The following code snippet adds a new button within a bar manager’s OnShowToolbarsPopup event handler.

// Delphi

// ...

uses

  ..., dxBarExtItems;

// ...

btnShowCaptions: TdxBarButton;

// ...

// The OnClick event handler of the ShowCaptions button

procedure TMainForm.btnShowCaptionsClick(Sender: TObject);

var

  I: Integer;

begin

  with dxBarManager do

  begin

    BeginUpdate;

    try

      for I := 0 to ItemCount - 1 do

        if Items[I] is TdxBarLargeButton then

          TdxBarLargeButton(Items[I]).ShowCaption := btnShowCaptions.Down;

    finally

      EndUpdate;

    end;

  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;

// C++ Builder

Unit1.h

// ...

#include "dxBarExtItems.hpp"

// ...

class TMainForm : public TForm

{

// ...

private:

  void __fastcall btnShowCaptionsClick(TObject *Sender);

// ...

};

Unit1.cpp

// ...

TdxBarButton * btnShowCaptions;

// ...

// The OnClick event handler of the ShowCaptions button

void __fastcall TMainForm::btnShowCaptionsClick(TObject * Sender)

{

  dxBarManager->BeginUpdate();

  try {

    for(int I = 0;I<dxBarManager->ItemCount;I++)

      if (String(dxBarManager->Items[I]->ClassName()) == "TdxBarLargeButton")

        ((TdxBarLargeButton *)(dxBarManager->Items[I]))->ShowCaption =

        btnShowCaptions->Down;

  }

  __finally {

    dxBarManager->EndUpdate();

  }

}

// The OnShowToolbarsPopup event handler

void __fastcall TMainForm::dxBarManagerShowToolbarsPopup( 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 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 CategoryItemsVisible property of a bar manager.  The code below also hides empty toolbars via the AutoHideEmptyBars property.

// Delphi

// ...

with dxBarManager do

begin

  // Hides empty toolbars

  AutoHideEmptyBars := True;

  // Shows/hides items within the default category

  if CategoryItemsVisible[0] = ivAlways then

    CategoryItemsVisible[0] := ivNever

  else

    CategoryItemsVisible[0] := ivAlways;

end;

// C++ Builder

// ...

  // Hides empty toolbars

  dxBarManager->AutoHideEmptyBars = true;

  // Shows/hides items within the default category

  if (dxBarManager->CategoryItemsVisible[0] == ivAlways)

      dxBarManager->CategoryItemsVisible[0] = ivNever;

  else

    dxBarManager->CategoryItemsVisible[0] = ivAlways;


How to Create Several Item Controls for the Same Underlying Item

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 the item controls 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.

// 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 TMainForm : 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 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"

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::CreateColorBarButtonClick(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 = dxBarManager->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::dxBarManagerBarDockingStyleChange(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

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.  To display check marks within the list, set the TdxBarListItem.ShowCheck property to True.

unit Unit1;

interface

uses

  Classes, Forms, dxBar;

type

  TMainForm = class(TForm)

    dxBarManager: 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.

// 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 "cxClasses.hpp"

#include "Unit2.h"

//-------------------------------------------------------

class TMainForm: public TForm

{

__published:	// IDE-managed Components

  TdxBarManager *dxBarManager;

  TdxBar *dxBarManagerBar1;

  TdxBarSubItem *dxBarSubItemWindow;

  TdxBarListItem *dxBarListWindows;

  TdxBarButton *dxBarButtonNewWindow;

  TdxBarButton *dxBarButtonArrangeAll;

  TdxBarButton *dxBarButtonNextWindow;

  TdxBarButton *dxBarButtonPreviousWindow;

  void __fastcall dxBarButtonArrangeAllClick(TObject *Sender);

  void __fastcall dxBarButtonNewWindowClick(TObject *Sender);

  void __fastcall dxBarButtonNextWindowClick(TObject *Sender);

  void __fastcall dxBarButtonPreviousWindowClick(TObject *Sender);

  void __fastcall dxBarListWindowsGetData(TObject *Sender);

  void __fastcall dxBarListWindowsClick(TObject *Sender);

private:	// User declarations

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::dxBarButtonArrangeAllClick(TObject *Sender)

{

  Tile();

}

// Creates a new child form

void __fastcall TMainForm::dxBarButtonNewWindowClick(TObject *Sender)

{

  new TChildForm(Application);

}

void __fastcall TMainForm::dxBarButtonNextWindowClick(TObject *Sender)

{

  Next();

}

//-------------------------------------------------------

void __fastcall TMainForm::dxBarButtonPreviousWindowClick(TObject *Sender)

{

  Previous();

}

// The OnGetData event handler of TdxBarListItem

void __fastcall TMainForm::dxBarListWindowsGetData(TObject *Sender)

{

  dxBarListWindows->ItemIndex = dxBarListWindows->Items->IndexOfObject(ActiveMDIChild);

}

// The OnClick event handler of TdxBarListItem

void __fastcall TMainForm::dxBarListWindowsClick(TObject *Sender)

{

  ((TCustomForm *) dxBarListWindows->Items->Objects[dxBarListWindows->ItemIndex])->Show();

}

//-------------------------------------------------------

// The child form unit

// 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)

{

}

// Adds a child window to the child window list

void __fastcall TChildForm::FormCreate(TObject *Sender)

{

  MainForm->CreatedMDICount ++;

  Caption = "Document" + IntToStr(MainForm->CreatedMDICount);

  MainForm->dxBarListWindows->Items->AddObject(Caption, this);

}

// Removes a child window from the child window list

void __fastcall TChildForm::FormDestroy(TObject *Sender)

{

  MainForm->dxBarListWindows->Items->Delete(

    MainForm->dxBarListWindows->Items->IndexOfObject(this));

}

//--------------------------------------------------------

void __fastcall TChildForm::FormClose(TObject *Sender, TCloseAction &Action)

{

  Action = caFree;

}


How to Associate TdxBarPopupMenu with Controls

You can associate a TdxBarPopupMenu with any control on a form.  This popup menu will be displayed by right-clicking the appropriate control.

You should use the PopupMenuLinks property of a TdxBarManager object in order to connect a control and a TdxBarPopupMenu.

Follow these steps to associate a control with a TdxBarPopupMenu at design time:

1.	Select a bar manager in the Object Inspector.

2.	Press the ellipsis button (‘...’) in the PopupMenuLinks edit field to display a standard collection editor with a list all existing menu links.

3.	Using this editor you can manage elements within the PopupMenuLinks collection and associate a control with a menu link using the menu link’s TdxBarPopupMenu.Control property.

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 TEdit with a TdxBarPopupMenu programmatically:

// Delphi

// ...

var

  NewMenuLink : TdxBarPopupMenuLink;

begin

  NewMenuLink := dxBarManager1.PopupMenuLinks.Add;

  NewMenuLink.Control := Edit1;

  NewMenuLink.PopupMenu := dxBarPopupMenu;

end;

// C++ Builder

// ...

TdxBarPopupMenuLink * NewMenuLink;

NewMenuLink = dxBarManager->PopupMenuLinks->Add();

NewMenuLink->Control = Edit1;

NewMenuLink->PopupMenu = dxBarPopupMenu;


How to Implement Help for the Customization Form

To include your own custom help for the Customization Form, you should use the help button placed at the bottom of this form.  By default, the help button is hidden.  To make it visible, set the ShowHelpButton property of the bar manager to True.  Use the HelpButtonGlyph property 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.dxBarManagerHelpButtonClick(Sender: TObject);

begin

  WinHelp(0, 'MyHelp.hlp', HELP_CONTENTS, 0);

end;

// C++ Builder

// ...

void __fastcall TForm1::dxBarManagerHelpButtonClick(TObject *Sender)

{

  WinHelp(NULL,"MyHelp.hlp",HELP_CONTENTS, 0);

}


How to Make an Item Occupy Several Rows within a Ribbon Toolbar

See Also

A Ribbon tab group displays items from the bound toolbar (see the tab group’s Toolbar property).

An item's representation within a tab group depends on the layout constraints specified for each item (see TdxBarItemViewLevels).

Some items don’t provide this information.  For these items, the layout data is specified in their ancestor – TdxBarItemControl.  The default state it returns via a GetPossibleViewLevels method is ivlSmallIconWithText.  It means that an item only occupies one row in a tab group.

If you need to span a particular item over an entire tab group’s height, override the GetPossibleViewLevels method.

Consider a TdxBarControlContainerItem object as an example.  This is a container for any external control to be placed in a toolbar (see the TdxBarControlContainerItem.Control property).  By default, this item only resides in one row.

To inform the Ribbon that TdxBarControlContainerItem will take up the entire group’s height for any layout, use the following code:

// Delphi

unit dxBarExtItems.pas

// ...

  TdxBarControlContainerControl = class(TdxBarItemControl)

  protected

    function GetPossibleViewLevels: TdxBarItemViewLevels; override;

// ...

implementation

// ...

function TdxBarControlContainerControl.GetPossibleViewLevels: TdxBarItemViewLevels;

begin

  // indicate that this item requires the largest possible space

  Result := [ivlLargeIconWithText];

end;

The following image demonstrates the result:

Note that to make these changes come into effect for the C++ Builder, you must run Express Install in the Recompile mode.


Customization Form

See Also

The Customization Form is used to manage toolbar item layouts, to customize item and category properties, to determine toolbar behavior, etc.  Use the Customization Form for runtime and design-time toolbar customization.

Design-Time Customization

Runtime Customization

Design-Time Customization

Click a page or the corresponding link below to learn more about it.

Toolbars Page

Commands Page

Options Page

All Commands Page

Groups Page

To display the Customization Form, double-click the TdxBarManager component, or right-click it and choose Customization Form… from the popup menu.

The Customization Form allows you to:

•	create, delete, rename and hide toolbars;

•	manage toolbar content (by creating or removing toolbar items or creating item controls for existing items and placing them on toolbars);

•	control the layout and appearance aspects of toolbars (MRU functionality, large icons on toolbar items, etc.);

•	determine toolbar behavior (menu animation, item tooltips, etc.);

•	access all existing toolbars and toolbar items, and customize their properties via the Object Inspector;

•	organize toolbar items in categories;

•	group toolbar items.

Runtime Customization

Click a page or the corresponding link below to learn more about it.

Toolbars Page

Commands Page

Options Page

The Customization Form can be displayed by clicking Customize… in a toolbar’s popup menu or by calling the Customizing method of a bar manager.

The Customization Form allows end-users to:

•	create, delete, rename and hide toolbars;

•	control the layout and appearance aspects of toolbars (MRU functionality, large icons on toolbar items, etc.);

•	reset toolbars;

•	create item controls of existing toolbar items, and place them on toolbars;

•	customize toolbar items via their popup menus.

Common Visual Elements

The ExpressBars Suite allows you to display custom help topics for the Customization Form by clicking the [image] button.  By default, this button is invisible.  To make it visible, set the bar manager’s ShowHelpButton property to True.  To associate a help topic with this button and to specify a bitmap for it, use the HelpContext and HelpButtonGlyph properties, respectively.

To close the Customization Form, press the Close button.


Customization Form - Toolbars Page (Design Time)
Customization Form – Toolbars Page (at Design Time)

Customization Form

The Toolbars page displays a list of existing toolbars and allows you to create, delete, rename, hide and display toolbars.

Click a page or the corresponding link below to learn more about it.

Toolbars Page (displayed at runtime)

Commands Page (displayed both at runtime and design time)

Options Page (displayed both at runtime and design time)

All Commands Page (displayed only at runtime)

Groups Page (displayed only at runtime)

You can hide/display a toolbar on a form by clicking the corresponding check box.  The main menu cannot be hidden in this manner.

To customize toolbar properties, select it in the toolbar list, and then switch to the Object Inspector or invoke the toolbar popup menu.

The following buttons are available on this page:

New …

Invokes the dialog box shown below to specify a caption for the new toolbar.  Since the toolbar must have a unique caption, entering an existing caption generates a warning message.  To create a toolbar, click OK in the dialog box (by default, its docking style is dsTop).  To represent a toolbar as a main menu, set its IsMainMenu property to True.

Rename …

Invokes a dialog box below to specify a custom caption for the selected toolbar.  Since toolbars must have unique captions, entering an existing caption generates a warning message.

Delete

Deletes the selected toolbar.  Toolbar items are not deleted.  You can access them in the Commands Page of the Customization Form and add to any toolbar.


Customization Form - Toolbars Page (Runtime)
Customization Form – Toolbars Page (at Runtime)

Customization Form

The Toolbars page displays a list of existing toolbars, and allows you to create, rename, delete, hide/display and reset any toolbar (restoring its default settings) on a form.

Click a page or the corresponding link below to learn more about it.

Toolbars Page (displayed at design time)

Commands Page (displayed both at runtime and design time)

Options Page (displayed both at runtime and design time)

An end-user can hide/display a toolbar on a form by clicking the corresponding check box.  The main menu cannot be hidden in this manner.

The following buttons are available on this page:

New …

Invokes the dialog box shown below.  Since each toolbar must have a unique caption, entering a duplicate caption generates a warning message.  To create a toolbar, click OK in the dialog box (by default, its docking style is dsTop).  To display the toolbar as a main menu, set its IsMainMenu property to True.  To add items to the toolbar, use the Commands Page of the Customization Form.

Rename …

This button is enabled only when the selected toolbar has been created by an end-user via the New… button at runtime.  When clicking it, a dialog box (see the image below) is invoked to specify a custom caption for the selected toolbar.  Since each toolbar must have a unique caption, entering a duplicate caption generates a warning message.

Delete

This button is enabled only when the selected toolbar has been added by an end-user via the New… button at runtime.  Clicking this button deletes the toolbar.  Toolbar items are not deleted.  You can access them in the Commands Page of the Customization Form and add to any toolbar.

Reset

Restores the original layout of the selected toolbar.  If a bar manager’s UseFullReset property is set to True, its original settings are also restored (caption, dockings settings, visibility).  This button is disabled if the selected toolbar has been created via the New… button at runtime.


Customization Form - Commands Page

Customization Form

The Commands page is displayed both at design and runtime.

The Commands page displays a list of existing categories (the Categories panel), and a list of toolbar items for the selected category (the Commands panel).

Click a page or the corresponding link below to learn more about it.

Toolbars Page (displayed at design time)

Toolbars Page (displayed at runtime)

Options Page (displayed both at runtime and design time)

All Commands Page (displayed only at runtime)

Groups Page (displayed only at runtime)

Use the Commands page to organize toolbar items into categories and collectively manage general appearance and end-user availability.

At design time, the Commands Page of the Customization Form allows you to:

•	create, rename, delete and hide/display categories (using the Modify button on the Categories panel);

•	distribute existing toolbar items among the categories;

•	create, delete and control the visible state of toolbar items within a specific category;

•	clear the contents of a specific category;

•	add toolbar item controls from the Commands list to toolbars and submenus.

To remove an item from one category and place it onto another, drag it from the Commands list to the desired category within the Categories list.

At runtime, the Commands Page of the Customization Form only allows end-users to add toolbar item controls from the Commands list to toolbars and submenus.  To place a bar item onto a toolbar, drag it from the Commands list to the desired toolbar.

At design time, you can customize item properties by selecting it in the Commands list and switching to the Object Inspector.  Setting these properties affects all item controls.  You can customize item control properties at runtime by using the properties of the corresponding item link. Certain properties can be customized at design time via its customizing popup menu.

The selected item’s Description property is displayed within the Description area.

The following controls are available on the Commands Page of the Customization Form:

Two "…modify" buttons appears in the Commands Page at design time.

With the "…modify" button on the Categories panel, you can call a popup menu which can be used to create, rename, delete and hide/display categories, and control the visible state of individual items within a specific category.

With the "…modify" button on the Commands panel, you can clear the content of a specific category; create, delete an item and add existing items to a subitem.

Clicking any of these buttons invokes a popup menu.  This popup menu can also be invoked by right-clicking a category or an item.  Refer to the Category Modify and Item Modify topics, for more information.


Customization Form - Category Modify

Customization Form

The "…modify" button is located on the Categories panel of the form's Commands page, and is visible only at design time.  This button activates the popup menu shown below.  The popup menu can also be activated by right-clicking a category from the Categories list.

Use this popup menu to:

•	add or delete categories;

•	rename, hide/display the selected category;

•	control the visibility state of the selected category’s items.

Use the following popup menu items to:

 Add…

Invokes the dialog box shown below to specify the caption for a new category.  Categories can have the same names.  Click OK in the dialog box to add a category to the end of the Categories list.  You can place existing items in this category by dragging them from the Commands list.

Insert…

Invokes the dialog box shown below to specify the caption for the new category.  Categories can have the same names.  To add a category above the selected category, click OK in the dialog box.  You can place existing items in this category by dragging them from the Commands list.

Rename…

Invokes the dialog box shown below to specify a custom name for the selected category.  Names can be duplicated.

Visible

Determines whether the selected category will be visible in the Customization Form at runtime.

Items Visible

Determines the Visible property of items that belong to the selected category.  Options include:

Option	Description
Always	The items are visible.
InCustomizing	The items are visible only when the Customization Form is displayed.
Never	The items are invisible.

This option corresponds to the CategoryItemsVisible property of a bar manager.

 Delete

Deletes the selected category.

Important Note:	When deleting a category, all its items are also deleted.


Customization Form - Item Modify

Customization Form

A "…modify" button is available on the Commands panel of the form's Commands page, and is visible only at design time.  This button activates the popup menu shown below.  The popup menu can also be activated by right-clicking an item from the Commands list.

This popup menu can be used to add or delete items, move them up or down, to clear the current Commands list, and to add existing items to a subitem.

Use the following popup menu items to:

 Add…

Creates a new item.  Item type, its name, caption, and category are specified by the user in the Add New ExpressBars Item dialog box.  This dialog box is displayed below.

 Delete

Deletes the selected item.

Clear

Deletes all items that belong to the current category.

 Move Up

Moves the selected item up within the Commands list.

 Move Down

Moves the selected item down within the Commands list.

SubMenu Editor …

Activates the SubMenu Editor.

The SubMenu Editor … is enabled only when the selected item is a subitem or a container item.  To add an existing item to a specific subitem, activate the SubMenu Editor for this subitem, and drag the item from the Commands list to the SubMenu Editor.


Customization Form - Options Page

Customization Form

The Options page is displayed at both design and runtime and allows you to customize the appearance aspects and layout of all the toolbars and their items on a form.  If a bar manager is painted using a standard style (the bar manager’s Style property is set to bmsStandard), the Options Page only displays Large Icons, Show ToolTips on toolbars, Show shortcut keys in ToolTips and Menu animations options.

Click a page or the corresponding link below to learn more about it.

Toolbars Page (displayed at design time)

Toolbars Page (displayed at runtime)

Commands Page (displayed both at runtime and design time)

All Commands Page (displayed only at runtime)

Groups Page (displayed only at runtime)

The Options page allows you to reset the layout of all toolbars on a form and specify the following:

•	large icons on toolbar items;

•	item tooltips;

•	menu animation (if any);

•	the use of MRU (Most Recently Used) menu functionality (available for bar managers painted using non-standard paint styles).

To do this, use the following controls:

Menus show recently used commands first

If this option is active, most recently used menu items are "promoted", while the remaining items are hidden.

Show full menus after a short delay

This option is used only if the Menus show recently used commands first option is checked.  If Show full menus after a short delay is active, all menu items are displayed in the menu after it has been active for 4000 milliseconds.

Reset my usage data

This button is only available at runtime and it resets all usage data.

Large Icons

If active, large images are displayed on toolbar items.  This option corresponds to the LargeIcons property of a bar manager.

Show ToolTips on toolbars

If active, hints for toolbar items are displayed.  This option corresponds to the ShowHint property of a bar manager.

Show shortcut keys in ToolTips

If active, hints for toolbar items contain shortcuts that are used to activate them.  This option corresponds to the ShowShortCutInHint property of a bar manager.  It is active only when the Show ToolTips on toolbars option is active.

Menu animations

Specifies the style in which menus are activated (None, Random, Unfold, Slide, Fade).  This option corresponds to the MenuAnimations property of a bar manager.  By default, None is selected.


Customization Form - All Commands Page

Customization Form

The All Commands page is displayed only at design time.

This page displays all existing toolbar items from all categories including: toolbar names, captions and shortcuts used to activate them in corresponding columns.

Click a page or the corresponding link below to learn more about it.

Toolbars Page (displayed at design time)

Toolbars Page (displayed at runtime)

Commands Page (displayed both at runtime and design time)

Options Page (displayed at runtime and at design time)

Groups Page (displayed only at runtime)

You can use this page to quickly locate items with identical shortcuts.

If the Show commands that may have a shortcut option is active, the list is organized by item names and contains only those items for which you can specify shortcuts (i.e., TdxBarButton type items).


Customization Form - Groups Page

Customization Form

The Groups page is displayed only at design time.

This page contains two panels that represent a list of existing item groups (the Groups panel), and a list of items within the selected group (the Items panel).

Click a page or use the corresponding link below to learn more about it.

Toolbars Page (displayed at design time)

Toolbars Page (displayed at runtime)

Commands Page (displayed both at runtime and design time)

Options Page (displayed at runtime and at design time)

All Commands Page (displayed only at runtime)

With this page, you can group toolbar items to customize their properties in code simultaneously.

To quickly enable/disable or make visible/invisible all items contained within a group, select the group from the Groups list, switch to the Object Inspector and set the group’s Visible and Enabled properties accordingly.

The following table lists all buttons within the Groups page.

Button	Description
	In the Groups panel: creates a new group. In the Items panel: invokes the dialog box shown below to specify an item from a list of existing items.  The item list is organized by categories.
	In the Groups panel: deletes the selected group. In the Items panel: deletes the selected item.
	In the Groups panel: moves the selected group up within the Groups list. In the Items panel: moves the selected item up within the Items list.
	In the Groups panel: moves the selected group down within the Groups list. In the Items panel: moves the selected item down within the Items list.


Using Enter Value Dialog

See Also

This topic describes the Enter value dialog.  It allows editing via a specific editor under the following conditions:

•	At design time, if its initial data needs to be entered into an editor;

•	At runtime, if an editor is hidden when the bar is shown vertically (when it’s docked to the left or right edge of the form).

To display the Enter value dialog at design time:

1.	Click the appropriate editor link to display its properties in the Object Inspector.

2.	When in the Object Inspector, click an ellipsis button next to the TcxCustomBarEditItem.EditValue property to invoke the Enter value dialog. Enter the required initial value.

To display the Enter value dialog at runtime:

1.	Click the caption of an appropriate editor. The Enter value dialog will be displayed. Enter data.


Using Context Menus

See Also

The following context menus are available to end-users:

•	Ribbon Popup Menu

•	Toolbars Popup Menu

•	Quick Customization Popup Menu

•	Customizing Popup Menu

In this topic you will learn how to use them.

Ribbon Popup Menu

End-users can use a built-in Ribbon context menu to perform the following operations:

•	Customize Ribbon Quick Access Toolbar’s content

•	Obtain access to additional end-user actions

•	Position the Ribbon Quick Access Toolbar above or below the Ribbon

•	Minimize the Ribbon

Additionally, you can provide a custom context menu in Ribbon applications using the TdxRibbonPopupMenu control:

Toolbars Popup Menu

The Toolbars Popup Menu, which is displayed below, is activated when an end-user right-clicks a toolbar.

This popup menu contains a list of all toolbars on a form except for toolbars that represent the main menu.  Visible toolbars are displayed as checked in the list.  Uncheck a toolbar to make it invisible.

The Toolbars Popup Menu allows you to display the Customization Form via the Customize… menu item.  It is displayed in the popup menu only when a bar manager’s CanCustomize property is set to True (by default).

Quick Customization Popup Menu

The Quick Customization Popup Menu is designed to manage visibility, layout and appearance aspects of a toolbar.  Click the dropdown button located at the end of a toolbar to activate this menu.

Note, this dropdown button isn’t displayed on a toolbar when a bar manager’s Style property is set to bmsStandard.

When an end-user clicks this dropdown button the Add or Remove Buttons menu is displayed.  You can prohibit quick customization for a specific toolbar by setting its AllowQuickCustomizing property to False.  In this instance, the dropdown button will not be displayed on the toolbar.

The Quick Customization Popup Menu contains a list of items located on the selected toolbar as shown in the picture below.

Visible toolbar items are checked within this list.  Uncheck an item to make it invisible.  There are also two popup menu items:

Reset Toolbar

Allows an end-user to restore the default settings of the current toolbar.  When clicking this popup menu item, a confirmation message box is displayed:

By default only settings related to the toolbar's item links are restored.  To restore the toolbar’s size, position, docking style, state, etc., set the bar manager’s UseFullReset property to True.

Note, the Reset Toolbar item is displayed in the Quick Customization Popup Menu when a bar manager’s AllowReset property is set to True (by default), and the selected toolbar was not created by the end-user.  You can prohibit a reset by setting the toolbar’s AllowReset property to False (Reset Toolbar will not be displayed).

Customize…

Invokes the Customization Form.  This popup menu item is displayed in the Quick Customization Popup Menu when a bar manager’s CanCustomize property is set to True (by default).  You can prohibit this option by setting the toolbar’s AllowCustomizing property to False (Customize… will not be displayed.)

Customizing Popup Menu

An end-user can customize item controls via the Customizing Popup Menu.  It is invoked by right-clicking an item control when the Customization Form is displayed.

This menu has a different appearance at design-time.  The list below describes all menu items as they appear at runtime.  All menu options that correspond to toolbar item link properties.  For detailed information, refer to the Customizing Popup Menu help topic.

Reset

Resets the original caption, glyph, paint style and width of the selected toolbar item control.

Delete Link

Removes the selected toolbar item control.

Name

Allows an end-user to change the caption of the selected item control.

Default Style

If active, the selected item control is painted using the default style (corresponds to the psStandard value of the UserPaintStyle property of an item link).

This option is displayed for TdxBarButton items only.

Text Only (Always)

If active, the selected item control is represented only by text (corresponds to the psCaption value of the UserPaintStyle property of an item link).

Text Only (in Menus)

If active, when the selected item control is displayed in a menu, it is represented only by text (corresponds to the psCaptionInMenu value of the UserPaintStyle property of an item link).

Image and Text

If active, the selected item control is represented both by text and an image (corresponds to the psCaptionGlyph value of the UserPaintStyle property of an item link).

This option is displayed for TdxBarButton items only.

Begin a Group

If active, the selected item control follows a separator.  Use this option to visually group items on a toolbar.


Using Drag and Drop

See Also

Users can customize toolbar and item control layout via drag and drop (both at design and runtime).  This topic describes available drag and drop operations.

Drag & drop operations on toolbars

Drag & drop operations on item controls

Drag & drop operations on toolbars

The following drag & drop operations can be executed by users:

•	Dragging toolbars within rows, from one row to another and from one side of a form to another.

Users can drag a toolbar to a row that contains another toolbar, only if the latter toolbar’s OneOnRow property is set to False.  You can prohibit a certain toolbar or all toolbars on a form from being docked to the form’s sides via the toolbar’s NotDocking property and a bar manager’s NotDocking property, respectively.

The image below displays dragging a toolbar from one row to another and then to the right side of a form.

•	Float a toolbar and return back to its recent dock location.

Use a bar manager’s NotDocking property to prevent this operation.

Note that these operations can also be executed by double-clicking a toolbar or by clicking a toolbar’s drag grip when holding down the Ctrl key.

The image below describes this process.

•	Resizing floating toolbars.

The maximum width of a toolbar is determined by the integral width of its items.  The minimum width is limited to the width of a single item.  The value of a toolbar’s height is changed in the same way.

The following image displays possible variants.

Drag & drop operations on item controls

Users can customize the layout of toolbar items via the following:

•	Dragging an item control on and between toolbars, submenus, and popup menus.

Item controls can be dragged when the Customization Form is displayed.

Users can change the order of item controls on a toolbar by dragging them within it.  Toolbar layout on a form can be modified by dragging item controls between them.  Dragging an item control a short distance to the end of a toolbar leads to the creation of a separator before the item control.

The following image displays drag operations between a toolbar and a submenu:

•	Duplicating a toolbar item control by holding down the Ctrl key and dragging an existing item control to any toolbar, submenu, or popup menu.

•	Dragging an item control away from toolbars (deletes the item control).

Users can delete any item control (including a submenu) using this method provided that the Customization Form is displayed.  This process is described in the image below.

•	Dragging a toolbar item from the Customization Form and dropping on a toolbar, submenu, or popup menu.

Users can add an item control of an existing item to a toolbar, submenu, or popup menu by dragging the item from the Commands list in the Commands page of the Customization Form to the toolbar, submenu, or popup menu.  In the image below, the Close item is added to the File submenu.


Using the Keyboard

The ExpressBars Suite allows an end-user to use the keyboard when navigating toolbars and toolbar items.  This topic contains a table describing all the available keys and key combinations.  Refer to the Accessing Ribbon UI and Bar Elements topic to learn about the design-time keyboard access to bar elements.

Key and key combinations can be applied when a form’s toolbar is active (except for the F10 and Alt keys, which activate the first item control on the main menu.

Keys	Description
F10, Alt	Closes all open popup menus and submenus, and focuses the main menu.  An end-user can use the F10 key, if a bar manager’s UseF10ForMenu property is set to True.
Accelerator Keys	If an item control’s caption includes an ampersand, pressing the key combination that consists of the Alt key and the letter following the ampersand executes the item control’s functionality.  For instance, if &File is an item control’s caption, an end-user can press Alt+F to emulate a click event.
Ctrl+Tab	Focuses the next toolbar control.
Tab	Focuses the item control to the right of the current item control on the toolbar.  In the instance of a vertical toolbar, submenu or popup menu, it focuses the item control below the current item control.
Left Arrow	Focuses the item control to the left of the current item control on a toolbar (if the layout is not vertical).
Right Arrow	Focuses the item control to the right of the current item control on a horizontal toolbar.  If a dropdown button or a subitem located on a toolbar with a vertical layout is currently focused, emulates its click event.
Shift+Tab	Focuses the item control to the left of the current item control on a toolbar.  In the instance of a vertical toolbar, submenu or popup menu, it focuses the item control above the current one.
Home	Focuses the first item control on a toolbar, submenu or popup menu.
End	Focuses the last item control on a toolbar, submenu or popup menu.
Up Arrow	If the current item control is located on a vertical toolbar, in a submenu or popup menu, focuses the item control above the current one.
Down Arrow	If the current item control is located on a vertical toolbar, in a submenu or popup menu, focuses the item control under the current one.  If a dropdown button or a subitem located on a horizontal toolbar is currently focused, emulates its click event.
Esc	Removes focus from item controls and toolbars.  If a popup menu or submenu is open, it closes it.
Enter	Emulates a click event of the focused item control.

You can assign a shortcut for a toolbar button to allow an end-user to emulate a click event via the keyboard.  Use the toolbar button’s ShortCut property to do this.  You can also display shortcuts in item hints via a bar manager’s ShowShortCutInHint.


Using the Customization Form

See Also

The Customization Form allows end-users to customize the visibility state, layout and appearance aspects of toolbars, create new toolbars and reset the existing toolbars.  This topic provides information on how to invoke the Customization Form at runtime.

An end-user can invoke the Customization Form in several ways.  Note, if a bar manager’s CanCustomize property is set to False, there is no way for an end-user to customize toolbars.  You can also prohibit a certain toolbar from being customized by setting its AllowCustomizing property to False.

•	Invoking via code

Calling a bar manager’s Customizing method displays or hides the Customization Form.

•	Invoking via the toolbars popup menu

When an end-user right-clicks a toolbar, the toolbars popup menu is invoked.  It contains the Customize… item.  Clicking it displays the Customization Form.  The following picture demonstrates how it can be done:

•	Invoking via the Quick Customization Popup Menu

End-users can click the dropdown button at the end of a toolbar.  This invokes the quick customization popup menu in which the Customize… item can be chosen to display the Customization Form.

Note that a toolbar contains this dropdown button when its AllowQuickCustomizing property is set to True, and a bar manager’s Style property isn’t bmsStandard.

•	Invoking via double-clicking

If a toolbar doesn’t occupy the entire dock row (its WholeRow property is set to False), an end-user can double-click the remaining dock row region to display the Customization Form.


Customizing Toolbar Items and Item Controls

See Also

This topic describes how you can customize bar items and their item controls at design and runtime.  Select one of the following links to jump to the desired section of this topic.

At Design Time

At Runtime

At Design Time

To display a bar item’s properties in the Object Inspector, click the corresponding item control on a toolbar or submenu, or click the corresponding command in the Commands page of the Customization Form.

The following list shows main item properties that affect appearance aspects of item controls:

•	Caption

Specifies the caption of an item and its controls.

•	ImageIndex

Specifies the image from a bar manager’s Images list, which is displayed on item controls.

•	Glyph

Specifies the custom image, which is displayed on item controls.

•	PaintStyle

Specifies whether the text, an image or a combination of both represents button item controls.

Item link properties associated with a specific item control can be accessed via the Object TreeView by locating the toolbar where this item control resides and clicking the corresponding item in the toolbar’s ItemLinks collection.

A caption, glyph, paint style and width are automatically assigned to an item control as specified by the corresponding item properties.  You can override these values using the UserCaption, UserGlyph, UserPaintStyle and UserWidth properties of the item link.

When any of these properties is assigned a value, the corresponding flag is set in the item link’s UserDefine property.  You can clear a specific flag to prevent item link setting from being used when painting the item control.

The Customizing Popup Menu provides a convenient way to customize item link settings.  To display this popup menu, right-click an item as displayed in the following picture.

At Runtime

The ExpressBars Suite allows end-users to customize item controls via the:

•	Customization Form;

•	Customizing Popup Menu;

•	Quick Customizing Popup Menu.

To prevent item controls from being customized at runtime, set a bar manager’s CanCustomize property to False.  To prohibit a certain toolbar or submenu from being customized, set its AllowCustomizing property to False.

For more information on customizing item controls via the Customizing Popup Menu and Quick Customizing Popup Menu, refer to the Using Context Menus topic.


Creating Toolbar Items and Item Controls

See Also

This topic describes how you can create bar items and their item controls at design time, runtime and in code.  Select one of the following links to jump to the desired section of this topic.

At Design Time

At Runtime

In Code

At Design Time

To create an item, item link, and item control and add the latter to the selected toolbar, click Add Item... in the Toolbars Popup Menu or Customizing Popup Menu.

In addition, you can use the Commands page of the Customization Form to create a bar item.  To do this:

•	click the modify… button on the Commands panel to display a dropdown menu;

•	click Add… in this dropdown menu.

This displays the Add New ExpressBars Item dialog box, which allows you to specify the type, category, name and caption of a new item.

At Runtime

End-users can create an item control for an existing bar item by dragging the item from the Commands page in the Customization Form to the desired toolbar.  For more information on how this can be accomplished, refer to the Using Drag and Drop help topic.

In Code

To programmatically create a bar item, call a bar manager’s AddItem method and pass the item type as the AClass parameter.  To create a button or subitem, you can call the AddButton or AddSubItem functions respectively.

The following code snippet demonstrates how to create a TdxBarLargeButton and specify its caption and image.

// Delphi

var ALargeButton: TdxBarItem;

// ...

// creating a large button

ALargeButton := dxBarManager1.AddItem(TdxBarLargeButton);

// setting the caption and image

ALargeButton.Caption := '&New';

TdxBarLargeButton(ALargeButton).LargeImageIndex := 0;

// ...

To add an existing item to a toolbar or submenu, an item link must be created.  Call the Add method of the desired toolbar or submenu’s ItemLinks collection.  This is demonstrated in the following example.

// Delphi

var ALargeButton: TdxBarItemLink;

// ...

// creating an item link for an existing item

ALargeButton := dxBarManager1Bar1.ItemLinks.Add(dxBarLargeButton1);

// setting the caption for the item link

ALargeButton.UserCaption := 'NewFile';

// ...

To create an item and add its item control to a toolbar or submenu, call the AddItem function of the desired toolbar or submenu’s ItemLinks collection, and pass the item type as the AItemClass parameter.  Use the AddButton and AddSubItem functions to create a button and subitem respectively.

The following code sample demonstrates how to create a TdxBarLargeButton and its item link on a toolbar.

// Delphi

var ALargeButton: TdxBarItemLink;

// ...

// creating a large button and displaying it on the first toolbar

ALargeButton := dxBarManager1Bar1.ItemLinks.AddItem(TdxBarLargeButton);

// setting the caption and image

ALargeButton.Item.Caption := '&New';

TdxBarLargeButton(ALargeButton.Item).LargeImageIndex := 0;

// ...

Refer to the How to Create Items at Runtime and Place them on a Toolbar or a Sub Menu and How to Create Several Item Controls for the Same Underlying Item help topics for additional code samples related to bar items and item links.


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

     |

TdxStatusBarContainerPanelStyle


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

In TdxStatusBarContainerPanelStyle

Assign

RestoreDefaults

Derived from TdxStatusBarPanelStyle

Assign

BeginUpdate

Create

EndUpdate

RestoreDefaults


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	Runtime
True
False

The default value of the AlignControl property is True.


TdxStatusBarContainerPanelStyle.Assign

TdxStatusBarStateIndicatorPanelStyle          See Also

Copies the properties of a TdxStatusBarContainerPanelStyle object to the current object.

procedure Assign(Source: TPersistent); override;

Description

Call the Assign method to set the container panel style’s published properties to the values of the object specified by Source. If Source is a TdxStatusBarContainerPanelStyle object, the Assign method matches the properties of the source object.

This is an overridden Assign method of the TdxStatusBarPanelStyle class.  The published properties of the TdxStatusBarContainerPanelStyle class are also included.

If Source is not a TdxStatusBarContainerPanelStyle object, the Assign method calls the inherited method of the TPersistent class to copy the panel style’s values from any object that can assign them through the AssignTo method.


TdxStatusBarContainerPanelStyle.RestoreDefaults

TdxStatusBarStateIndicatorPanelStyle          See Also

Restores the default settings of the current status toolbar container panel style.

procedure RestoreDefaults; override;

Description

Use the RestoreDefaults method to restore the default values of the published properties.  This is an overridden status toolbar panel style’s RestoreDefaults method.  It restores both the inherited properties and the published AlignControl property of the TdxStatusBarContainerPanelStyle class.

Refer to the description of a status toolbar panel style’s RestoreDefaults method to discover which properties are restored.


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

TCustomControl

     |

TcxControl

     |

TdxCustomStatusBar


Properties for TdxCustomStatusBar
TdxCustomStatusBar Properties

TdxCustomStatusBar          Legend

In TdxCustomStatusBar

BorderWidth

Images

LookAndFeel

PaintStyle

Panels

SizeGrip

Derived from TControl

Anchors

BiDiMode

Color

Constraints

DragCursor

DragKind

DragMode

Enabled

Font

ParentBiDiMode

ParentFont

ParentShowHint

PopupMenu

ShowHint

Visible


Methods for TdxCustomStatusBar
TdxCustomStatusBar Methods

TdxCustomStatusBar          Legend

In TdxCustomStatusBar

ExecuteAction

GetPanelAt


Events for TdxCustomStatusBar
TdxCustomStatusBar Events

TdxCustomStatusBar          Legend

In TdxCustomStatusBar

OnHint

Derived from TControl

OnClick

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


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 LookAndFeel.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 LookAndFeel.NativeStyle property value is False or XP themes are not available, the paint style is specified by the LookAndFeel.Kind or LookAndFeel.SkinName property.  The LookAndFeel.Kind property has lfStandard, lfFlat, lfUltraFlat, and lfOffice11 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;


TdxCustomStatusBar.GetPanelAt

TdxCustomStatusBar

Returns the current status toolbar’s panel that contains the specified point.

function GetPanelAt(X, Y: Integer): TdxStatusBarPanel; virtual;

Description

The GetPanelAt function returns the current status toolbar’s panel that contains the point whose coordinates are specified by the X and Y parameters.  If the status toolbar has no panels or there is no specified point on them, this method returns nil.

Use this method when handling an event that can determine the X and Y parameters, for instance, the OnMouseDown or OnMouseUp event.


TdxCustomStatusBar.ExecuteAction

TdxCustomStatusBar

Processes the specified action for the current status toolbar.

function ExecuteAction(Action: TBasicAction): Boolean; override;

Description

The ExecuteAction method performs an action specified by the Action parameter.  If the THintAction object is passed into the method and there is a panel with a text panel style on the current status bar, this method assigns the parameter’s Hint property value to the panel’s Text property.

If there is no panel with a text panel style or its AutoHint property is set to False, the ExecuteAction method calls the inherited ExecuteAction method.

If the specified action has been executed, the method returns True; otherwise – False.


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

     |

TdxStatusBarKeyboardStatePanelStyle


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

In TdxStatusBarKeyboardStatePanelStyle

Assign

RestoreDefaults

Derived from TdxStatusBarPanelStyle

Assign

BeginUpdate

Create

EndUpdate

RestoreDefaults


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 instance 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’.


TdxStatusBarKeyboardStatePanelStyle.Assign

TdxStatusBarStateIndicatorPanelStyle

Copies the properties of another TdxStatusBarKeyboardStatePanelStyle object.

procedure Assign(Source: TPersistent); override;

Description

Call the Assign method to set published properties of the keyboard state panel style to values of the object specified by Source. If Source is a TdxStatusBarKeyboardStatePanelStyle object, the Assign method matches the properties of the source object.

This is an overridden Assign method of the TdxStatusBarPanelStyle class.  The published properties of the TdxStatusBarKeyboardStatePanelStyle class are also included.

If Source is not a TdxStatusBarKeyboardStatePanelStyle object, the Assign method calls the TPersistent‘s inherited method to copy the panel style’s values from any object that can assign them through the AssignTo method.


TdxStatusBarKeyboardStatePanelStyle.RestoreDefaults

TdxStatusBarStateIndicatorPanelStyle          See Also

Restores the default settings of the current style.

procedure RestoreDefaults; override;

Description

Use the RestoreDefaults method to restore the default values of the published properties of the keyboard state panel style.  This is an overridden status toolbar panel style’s RestoreDefaults method.  It restores both the inherited properties and the published KeyboardStates property of the TdxStatusBarKeyboardStatePanelStyle class.

Refer to the description of a status toolbar panel style’s RestoreDefaults method to discover which properties are restored.


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 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

     |

TdxStatusBarKeyStateAppearance


Properties for TdxStatusBarKeyStateAppearance
TdxStatusBarKeyStateAppearance Properties

TdxStatusBarKeyStateAppearance          Legend

In TdxStatusBarKeyStateAppearance

ActiveCaption

ActiveFontColor

Code

Id

InactiveCaption

InactiveFontColor


Methods for TdxStatusBarKeyStateAppearance
TdxStatusBarKeyStateAppearance Methods

TdxStatusBarKeyStateAppearance          Legend

In TdxStatusBarKeyStateAppearance

Assign

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.

type

  TNotifyEvent = procedure(Sender : TObject) of 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.


TdxStatusBarKeyStateAppearance.Assign

TdxStatusBarKeyStateAppearance          See Also

Copies properties of another TdxStatusBarKeyStateAppearance object.

procedure Assign(Source: TPersistent); override;

Description

Call the Assign method to set published properties of the TdxStatusBarKeyStateAppearance object to values of the object specified by Source. If Source is a TdxStatusBarKeyStateAppearance object, the Assign method matches the properties of the source object.

If Source is not a TdxStatusBarKeyStateAppearance object, the Assign method calls the inherited method to copy values from any object that can assign them through the AssignTo method.


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

     |

TdxStatusBarStateIndicatorItem


Properties for TdxStatusBarStateIndicatorItem
TdxStatusBarStateIndicatorItem Properties

TdxStatusBarStateIndicatorItem          Legend

In TdxStatusBarStateIndicatorItem

IndicatorType

Visible


Methods for TdxStatusBarStateIndicatorItem
TdxStatusBarStateIndicatorItem Methods

TdxStatusBarStateIndicatorItem          Legend

In TdxStatusBarStateIndicatorItem

Assign


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.


TdxStatusBarStateIndicatorItem.Assign

TdxStatusBarKeyStateAppearance          See Also

Copies properties of another TdxStatusBarStateIndicatorItem object.

procedure Assign(Source: TPersistent); override;

Description

Call the Assign method to set the published properties of the TdxStatusBarStateIndicatorItem object to values of the object specified by Source. If Source is a TdxStatusBarStateIndicatorItem object, the Assign method matches the properties of the source object.

If Source is not a TdxStatusBarStateIndicatorItem object, the Assign method calls the inherited method to copy values from any object that can assign them through the AssignTo method.


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

     |

TdxStatusBarStateIndicatorPanelStyle


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

In TdxStatusBarStateIndicatorPanelStyle

Assign

RestoreDefaults

Derived from TdxStatusBarPanelStyle

Assign

BeginUpdate

Create

EndUpdate

RestoreDefaults


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.


TdxStatusBarStateIndicatorPanelStyle.Assign

TdxStatusBarStateIndicatorPanelStyle

Copies properties of another TdxStatusBarStateIndicatorPanelStyle object.

procedure Assign(Source: TPersistent); override;

Description

Call the Assign method to set the published properties of the state indicator panel style to values of the object specified by Source. If Source is a TdxStatusBarStateIndicatorPanelStyle object, the Assign method matches properties of the source object.

This is an overridden Assign method of the TdxStatusBarPanelStyle class.  The published properties of the TdxStatusBarStateIndicatorPanelStyle class are also included.

If Source is not a TdxStatusBarStateIndicatorPanelStyle object, the Assign method calls the TPersistent‘s method to copy values from any object that can assign them through the AssignTo method.


TdxStatusBarStateIndicatorPanelStyle.RestoreDefaults

TdxStatusBarStateIndicatorPanelStyle          See Also

Restores default settings of the current style.

procedure RestoreDefaults; override;

Description

Use the RestoreDefaults method to restore default values of the state indicator panel style’s published properties.  This method is an overridden status toolbar panel style’s RestoreDefaults method.  It restores both the inherited properties and the published Spacing property of the TdxStatusBarStateIndicatorPanelStyle class.

Refer to the description of a status toolbar panel style’s RestoreDefaults method to discover which properties are restored.


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

     |

TdxStatusBarStateIndicators


Properties for TdxStatusBarStateIndicators
TdxStatusBarStateIndicators Properties

TdxStatusBarStateIndicators          Legend

In TdxStatusBarStateIndicators

Items


Methods for TdxStatusBarStateIndicators
TdxStatusBarStateIndicators Methods

TdxStatusBarStateIndicators          Legend

In TdxStatusBarStateIndicators

Add

Create

Insert


Events for TdxStatusBarStateIndicators
TdxStatusBarStateIndicators Events

TdxStatusBarStateIndicators          Legend

In TdxStatusBarStateIndicators

OnChange


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.


TdxStatusBarStateIndicators.OnChange

TdxStatusBarStateIndicators          See Also

Occurs when the collection’s contents have been modified.

type

  TNotifyEvent = procedure(Sender : TObject) of object;

property OnChange: TNotifyEvent;


TdxStatusBar
 TdxStatusBar Object

Hierarchy          Properties           Methods         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 this, invoke the context menu and click the ‘Panels Editor…’ item, or 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

TCustomControl

     |

TcxControl

     |

TdxCustomStatusBar

     |

TdxStatusBar


Properties for TdxStatusBar
TdxStatusBar Properties

TdxStatusBar          Legend

Derived from TdxCustomStatusBar

BorderWidth

Images

LookAndFeel

PaintStyle

Panels

SizeGrip

Derived from TControl

Anchors

BiDiMode

Color

Constraints

DragCursor

DragKind

DragMode

Enabled

Font

ParentBiDiMode

ParentFont

ParentShowHint

PopupMenu

ShowHint

Visible


Methods for TdxStatusBar
TdxStatusBar Methods

TdxStatusBar          Legend

Derived from TdxCustomStatusBar

ExecuteAction

GetPanelAt


Events for TdxStatusBar
TdxStatusBar Events

TdxStatusBar          Legend

Derived from TdxCustomStatusBar

OnHint

Derived from TControl

OnClick

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


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

     |

TdxStatusBarPanel


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

RestoreDefaults

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 = (dxpbNone, dxpbLowered, dxpbRaised);

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
dxpbNone	The panel has no bevel and appears flat.
dxpbLowered	The panel appears recessed.
dxpbRaised	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 5 panel styles, specified by the PanelStyle property. Below are the descriptions of the available panel styles.

1.	The Toolbar Panel (the TdxStatusBarToolbarPanelStyle object) – allows you to dock a toolbar into the status bar.  Note: this panel style is only available for the Ribbon status bar;

2.	The Text panel (the 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.

3.	The Container panel (the TdxStatusBarContainerPanelStyle object) enables you to insert controls into a status bar. You can add images, edit fields, progress bars, checkboxes and other controls.

4.	The Keyboard State panel (the 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.

5.	The State Indicator panel (the 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
‘Toolbar Panel‘	TdxStatusBarToolbarPanelStyle
‘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 instance.

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 instance 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          See Also

Copies the contents of the source panel.

procedure Assign(Source: TPersistent); override;

Description

Call the Assign method if you wish to copy the content of a 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;


TdxStatusBarPanel.RestoreDefaults

TdxStatusBarPanel          See Also

Restores the current status toolbar panel’s default settings.

procedure RestoreDefaults; virtual;

Description

Use the RestoreDefaults method to restore default values of the current status toolbar panel’s published properties (e.g. the Visible, Width, Fixed, Bevel and BiDiMode properties).

After these properties have been changed the panel is repainted.  To avoid screen flickering use the BeginUpdate and EndUpdate methods of the panel collection to which the current status toolbar panel belongs.


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

     |

TdxStatusBarPanels


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, TdxStatusBarStateIndicatorPanelStyle and TdxStatusBarToolbarPanelStyle classes.


TdxStatusBarPanelStyle Hierarchy
Hierarchy

TPersistent

     |

TdxStatusBarPanelStyle


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

RestoreDefaults


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 instance 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 instance 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          See Also

Copies the contents of the sourñe 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          See Also

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          See Also

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.


TdxStatusBarPanelStyle.RestoreDefaults

TdxStatusBarPanelStyle          See Also

Restores the current status bar panel style’s default settings.

procedure RestoreDefaults; virtual;

Description

Use the RestoreDefaults method to restore the default values of the current status toolbar panel style’s published properties (e.g. the Alignment and ParentFont properties).

After the properties have been changed, the current panel style is repainted. Use the BeginUpdate and EndUpdate methods to avoid flickering.


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

     |

TdxStatusBarTextPanelStylez


Properties for TdxStatusBarTextPanelStyle
TdxStatusBarTextPanelStyle Properties

TdxStatusBarTextPanelStyle          Legend

In TdxStatusBarTextPanelStyle

AutoHint

EllipsisType

ImageIndex

Derived from TdxStatusBarPanelStyle

Alignment

Color

Font

Owner

ParentFont

StatusBarControl


Methods for TdxStatusBarTextPanelStyle
TdxStatusBarTextPanelStyle Methods

TdxStatusBarTextPanelStyle          Legend

In TdxStatusBarTextPanelStyle

Assign

RestoreDefaults

Derived from TdxStatusBarPanelStyle

Assign

BeginUpdate

Create

EndUpdate

RestoreDefaults


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 instance 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 instance, 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.


TdxStatusBarTextPanelStyle.Assign

TdxStatusBarTextPanelStyle          See Also

Copies properties of another TdxStatusBarTextPanelStyle object.

procedure Assign(Source: TPersistent); override;

Description

Call the Assign method to set the text panel style’s published properties to values of the object specified by Source.  If Source is a TdxStatusBarTextPanelStyle object, the Assign method matches properties of the source object.

This is an overridden Assign method of the TdxStatusBarPanelStyle class.  The published properties of the TdxStatusBarTextPanelStyle class are also included.

If Source is not a TdxStatusBarTextPanelStyle object, the Assign method calls the TPersistent‘s method to copy values from any object that can assign them through the AssignTo method.


TdxStatusBarTextPanelStyle.RestoreDefaults

TdxStatusBarTextPanelStyle          See Also

Restores the current status bar text panel style’s default settings.

procedure RestoreDefaults; override;

Description

Use the RestoreDefaults method to restore the default values of the text panel style’s published properties.  This method is an overridden RestoreDefaults method.  It restores both the inherited properties and published properties of the TdxStatusBarTextPanelStyle class (e.g. the AutoHint; ImageIndex and EllipsisType properties).

Refer to the description of a status toolbar panel style’s RestoreDefaults method to discover which properties are restored.

After the properties have been changed, the current panel style is repainted.  Use the BeginUpdate and EndUpdate methods to avoid screen flickering.


GetRegisteredStatusBarPanelStyles
GetRegisteredStatusBarPanelStyles Function

Returns the registered panel styles.

Unit

dxStatusBar

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.


cxBarEditItem Unit Overview
cxBarEditItem Unit

Items

TcxBarEditItem

Item Controls

TcxBarEditItemControl

Classes

TcxCustomBarEditItem


TcxBarEditItem
TcxBarEditItem Object

Hierarchy          Properties          Methods          See Also

A bar item that contains an editor from the ExpressEditors library.

Unit

cxBarEditItem

TcxBarEditItem = class(TcxCustomBarEditItem)

Description

This class provides the following settings:

•	Editor type and editor-specific settings (RepositoryItem, Properties or PropertiesClass (PropertiesClassName)).

•	Container-specific settings (EditValue, Height and Width).

These settings are used by the TcxBarEditItemControl class to display the actual control within toolbars, menus and Ribbons.

To learn more, see In-place Editors.


TcxBarEditItem Hierarchy
Hierarchy

TComponent

     |

TdxBarComponent

     |

TdxBarItem

     |

TdxBarWindowItem

     |

TdxCustomBarEdit

     |

TcxCustomBarEditItem

     |

TcxBarEditItem


Properties for TcxBarEditItem
TcxBarEditItem Properties

TcxBarEditItem          Legend

Derived from TcxCustomBarEditItem

BarStyleDropDownButton

EditValue

Height

Properties

PropertiesClass

PropertiesClassName

RepositoryItem

Derived from TdxCustomBarEdit

ShowCaption

StyleEdit

Width


Methods for TcxBarEditItem
TcxBarEditItem Methods

TcxBarEditItem          Legend

Derived from TcxCustomBarEditItem

GetProperties


TcxBarEditItemControl
TcxBarEditItemControl Object

Hierarchy          Properties          See Also

Visually represents a TcxBarEditItem item.

Unit

cxBarEditItem

TcxBarEditItemControl = class(TdxCustomBarEditControl)

Description

Generally, you don't need to use this class in your applications.  For additional information, see ExpressBars Basics.


TcxBarEditItemControl Hierarchy
Hierarchy

TObject

     |

TdxBarItemControl

     |

TdxBarWinControl

     |

TdxCustomBarEditControl

     |

TcxBarEditItemControl


Properties for TcxBarEditItemControl
TcxBarEditItemControl Properties

TcxBarEditItemControl          Legend

Derived from TdxCustomBarEditControl

CaptionWidth

ShowCaption

Derived from TdxBarWinControl

Handle

Item

Focused

Text

WindowRect


TcxCustomBarEditItem
TcxCustomBarEditItem Object

Hierarchy          Properties          Methods          See Also

Implements the basic functionality for bar items that allow you to embed ExpressEditors into toolbars, menus and Ribbons.

Unit

cxBarEditItem

TcxCustomBarEditItem = class(TdxCustomBarEdit)

Description

You don't need to use this class in your applications.  Instead, use its descendant – TcxBarEditItem.


TcxCustomBarEditItem Hierarchy
Hierarchy

TComponent

     |

TdxBarComponent

     |

TdxBarItem

     |

TdxBarWindowItem

     |

TdxCustomBarEdit

     |

TcxCustomBarEditItem


Properties for TcxCustomBarEditItem
TcxCustomBarEditItem Properties

TcxCustomBarEditItem          Legend

In TcxCustomBarEditItem

BarStyleDropDownButton

EditValue

Height

Properties

PropertiesClass

PropertiesClassName

RepositoryItem

Derived from TdxCustomBarEdit

ShowCaption

StyleEdit

Width


Methods for TcxCustomBarEditItem
TcxCustomBarEditItem Methods

TcxCustomBarEditItem          Legend

In TcxCustomBarEditItem

GetProperties


TcxCustomBarEditItem.BarStyleDropDownButton

TcxCustomBarEditItem

Specifies how to paint dropdown buttons in embedded ExpressEditors.

property BarStyleDropDownButton: Boolean;

Description

Values include:

Value	Description	Example
True	Dropdown buttons have the same appearance as dropdown buttons in standard toolbar items.
False	Dropdown buttons are painted in the same manner as within standalone editors.

The default value of the BarStyleDropDownButton property is True.


TcxCustomBarEditItem.EditValue

TcxCustomBarEditItem          See Also

Specifies the embedded editor's value.

property EditValue: Variant;


TcxCustomBarEditItem.Height

TcxCustomBarEditItem

Specifies the embedded editor's height.

property Height: Integer;

Description

The embedded editor's actual height can differ from the specified value.  This takes place if the editor cannot be resized as specified.  If the editor doesn't fit into the specified dimensions, the container is automatically resized to accommodate it.  This also affects the container bar size.

If the Height property is set to 0, the height is calculated automatically.

The default value of the Height property is 0.


TcxCustomBarEditItem.Properties

TcxCustomBarEditItem          See Also

Provides access to the currently assigned editor's properties.

property Properties: TcxCustomEditProperties;


TcxCustomBarEditItem.PropertiesClass

TcxCustomBarEditItem          See Also           Example

Specifies the embedded editor's type.

property PropertiesClass: TcxCustomEditPropertiesClass;

Description

If the PropertiesClass property is not set, the default TcxTextEdit editor will be used.

The following example shows how to use this property to assign a spin editor to an editor container item:

// Delphi

// ...

uses

  cxSpinEdit;

// ...

  cxBarEditItem.PropertiesClass := TcxSpinEditProperties;


TcxCustomBarEditItem.PropertiesClassName

TcxCustomBarEditItem          See Also          Example

Specifies the embedded editor's type by its class name.

property PropertiesClassName: string;

Description

The following example shows how to use this property to assign a button editor to an editor container item:

// Delphi

// ...

uses

  cxButtonEdit;

// ...

  cxBarEditItem.PropertiesClassName := 'TcxButtonEditProperties';


TcxCustomBarEditItem.RepositoryItem

TcxCustomBarEditItem          See Also

Specifies the repository item to be used within this bar item.

property RepositoryItem: TcxEditRepositoryItem;

Description

If you need to re-use the same editor settings in several bar items, use the editor repository.  It holds a collection of repository items – classes that store editor settings.  This allows you to bind several bar items to the same repository item and thus avoid editor duplication.

The editor, specified by the RepositoryItem property, overrides the editor specified by the PropertiesClass property.


TcxCustomBarEditItem.GetProperties

TcxCustomBarEditItem

Returns the embedded editor's settings.

function GetProperties: TcxCustomEditProperties;

Description

The embedded editor can be specified by either the Properties or RepositoryItem property.  If both properties were initialized, then the RepositoryItem property overrides the Properties property.  In this instance, the GetProperties function returns the RepositoryItem property value.

If none of these properties was initialized, the GetProperties function returns the default editor’s settings (TcxTextEditProperties).


TdxBarApplicationMenu
 TdxBarApplicationMenu Object

Hierarchy          Properties          Methods          Events          See Also

The TdxBarApplicationMenu class implements the Application Menu control.

Unit

dxRibbon

TdxBarApplicationMenu = class(TdxBarCustomPopupMenu)

Description

The Application Menu contains two panels:

•	The left panel provides a main menu.  This menu can be built as any other regular pop-up menu (see TdxBarCustomPopupMenu and the Customizing Popup Menu help topics to learn more);

•	The right panel displays a list of shortcuts (see the ExtraPane property).

Under these panels, a collection of buttons is displayed.  Use the Buttons property to populate this collection and manage its contents.

Note: for complete Ribbon UI consistency (see Ribbon Application Menu), a custom background image, specified via the menu’s BackgroundBitmap property (or via the bar manager’s Backgrounds.SubMenu property), is suppressed and the menu is provided with a built-in background.


TdxBarApplicationMenu Hierarchy
Hierarchy

TComponent

     |

TdxBarComponent

     |

TdxBarCustomPopupMenu

     |

TdxBarApplicationMenu


Properties for TdxBarApplicationMenu
TdxBarApplicationMenu Properties

TdxBarApplicationMenu          Legend

In TdxBarApplicationMenu

Buttons

ExtraPane

ExtraPaneHeader

ExtraPaneItems

ExtraPaneSize

ExtraPaneWidthRatio

Derived from TdxBarCustomPopupMenu

BackgroundBitmap

BarManager

BarSize

Font

ItemLinks

ItemOptions

SubMenuControl

UseOwnFont

UseRecentItems

Derived from TdxBarComponent

BarManager

Enabled

Visible


Methods for TdxBarApplicationMenu
TdxBarApplicationMenu Methods

TdxBarApplicationMenu          Legend

Derived from TdxBarCustomPopupMenu

Create

Destroy

Popup

PopupEx

PopupFromCursorPos


Events for TdxBarApplicationMenu
TdxBarApplicationMenu Events

TdxBarApplicationMenu          Legend

In TdxBarApplicationMenu

OnExtraPaneItemClick

Derived from TdxBarCustomPopupMenu

OnCloseUp

OnPaintBar

OnPopup


TdxBarApplicationMenu.Buttons

TdxBarApplicationMenu

Specifies a collection of buttons displayed under the Application Menu’s panels.

property Buttons: TdxBarApplicationMenuButtons;

Description

Use this property to populate the current Application Menu with buttons, manage the contents of the collection and access individual buttons.


TdxBarApplicationMenu.ExtraPane

TdxBarApplicationMenu

Specifies the menu’s right panel.

property ExtraPane: TdxBarApplicationMenuExtraPane;


TdxBarApplicationMenu.ExtraPaneHeader

TdxBarApplicationMenu          See Also

Specifies the shortcut list header.

property ExtraPaneHeader: string;

Description

This property is obsolete and used for compatibility purposes.  Use the menu’s ExtraPane.Header property instead.


TdxBarApplicationMenu.ExtraPaneItems

TdxBarApplicationMenu          See Also

Specifies a list of shortcuts.

property ExtraPaneItems: TdxBarExtraPaneItems;

Description

This property is obsolete and used for compatibility purposes.  Use the menu’s ExtraPane.Items property instead.


TdxBarApplicationMenu.ExtraPaneSize

TdxBarApplicationMenu          See Also

Specifies the width of the Application Menu’s right panel.

property ExtraPaneSize: Integer;

Description

This property is obsolete and used for compatibility purposes.  Use the menu’s ExtraPane.Size property instead.


TdxBarApplicationMenu.ExtraPaneWidthRatio

TdxBarApplicationMenu          See Also

Specifies the ratio of the right panel’s width to the left panel’s width.

property ExtraPaneWidthRatio: Double;

Description

This property is obsolete and used for compatibility purposes.  Use the menu’s ExtraPane.WidthRatio property instead.


TdxBarApplicationMenu.ItemOptions

TdxBarApplicationMenu

Provides access to appearance settings of items in the Application Menu.

property ItemOptions: TdxBarItemOptions;

Description

This property uses the ItemLinks.ItemOptions property to provide the required functionality.


TdxBarApplicationMenu.OnExtraPaneItemClick

TdxBarApplicationMenu          See Also

Fires after an end-user has clicked the AIndex item.

type

  TdxBarExtraPaneNotifyEvent = procedure(Sender: TObject; AIndex: Integer) of object;

property OnExtraPaneItemClick: TdxBarExtraPaneNotifyEvent;

Description

This event is obsolete and used for compatibility purposes.  Use the menu’s ExtraPane.OnItemClick event instead.


TdxBarApplicationMenuExtraPane
TdxBarApplicationMenuExtraPane Object

Hierarchy          Properties          Events

The TdxBarApplicationMenuExtraPane represents the Application Menu’s right panel.

Unit

dxBar

TdxBarApplicationMenuExtraPane = class(TPersistent)

Description

The right panel displays a list of shortcuts.

To populate a list with items, use the Items property.  To invoke commands on an item click, handle the OnItemClick event.

The list header is specified via the Header property.


TdxBarApplicationMenuExtraPane Hierarchy
Hierarchy

TPersistent

     |

TdxBarApplicationMenuExtraPane


Properties for TdxBarApplicationMenuExtraPane
TdxBarApplicationMenuExtraPane Properties

TdxBarApplicationMenuExtraPane          Legend

In TdxBarApplicationMenuExtraPane

Header

Items

Size

WidthRatio


Events for TdxBarApplicationMenuExtraPane
TdxBarApplicationMenuExtraPane Events

TdxBarApplicationMenuExtraPane          Legend

In TdxBarApplicationMenuExtraPane

OnGetItemDisplayText

OnItemClick


TdxBarApplicationMenuExtraPane.Header

TdxBarApplicationMenuExtraPane

Specifies the shortcut list header.

property Header: string;

Description

The Application Menu is split into two panels.  The right panel contains a list of shortcuts, such as the recently used documents (see the Items property):

Use the Header property to specify the header for this list.


TdxBarApplicationMenuExtraPane.Items

TdxBarApplicationMenuExtraPane

Specifies a list of shortcuts.

property Items: TdxBarExtraPaneItems;

Description

The Application Menu is split into two panels.  The right panel contains a list of shortcuts, such as the recently used documents:

Use the Items property to populate the right panel with shortcut items.


TdxBarApplicationMenuExtraPane.Size

TdxBarApplicationMenuExtraPane

Specifies the width of the Application Menu’s right panel.

property Size: Integer;

Description

Note: if the Size property is 0, the panel’s width is automatically calculated based on the width of the left panel and the WidthRatio property.

If specified, the Size property has a higher priority than the WidthRatio property.

The default value of the Size property is 0.


TdxBarApplicationMenuExtraPane.WidthRatio

TdxBarApplicationMenuExtraPane

Specifies the ratio of the right panel’s width to the left panel’s width.

property WidthRatio: Double;

Description

The right panel’s width is calculated as the left panel’s width, multiplied by the WidthRatio property’s value.

If the right panel’s width is directly specified via the Size property, then the WidthRatio property is ignored.


TdxBarApplicationMenuExtraPane.OnGetItemDisplayText

TdxBarApplicationMenuExtraPane          See Also

Allows you to specify a shortcut’s display name.

type

  TdxBarExtraPaneGetDisplayTextEvent = procedure(Sender: TObject; AIndex: Integer; var ADisplayText: string) of object;

property OnGetItemDisplayText: TdxBarExtraPaneGetDisplayTextEvent;

Description

This event fires when a shortcut is about to be displayed.

Sender specifies the Application Menu.

AIndex specifies the shortcut item’s index in the TdxBarExtraPaneItems collection.

ADisplayText specifies the shortcut name to be displayed.


TdxBarApplicationMenuExtraPane.OnItemClick

TdxBarApplicationMenuExtraPane

Fires after an end-user has clicked the AIndex item.

type

  TdxBarExtraPaneNotifyEvent = procedure(Sender: TObject; AIndex: Integer) of object;

property OnItemClick: TdxBarExtraPaneNotifyEvent;

Description

Implement the OnItemClick event handler to respond to the item click.

Sender specifies the Application Menu;

AIndex specifies the clicked item.


TdxBarCaptionButton
TdxBarCaptionButton Object

Hierarchy          Properties          Events

The TdxBarCaptionButton class implements a toolbar title button.

Unit

dxBar

TdxBarCaptionButton = class(TCollectionItem)

Description

If specified (see the bar’s CaptionButtons property), the button appears at the far right end of a toolbar’s title.  The button can be created at both design (using the bar’s CaptionButtons’s editor) and run-time (using the button collection’s Add method).

By default, the button is provided with a built-in glyph.  Use the Glyph property to specify a custom glyph.

To provide end-users with information on the purpose of a button, use a hint or a ScreenTip (see the button’s Hint and ScreenTip properties).

You can associate any action with the button by handling the button’s OnClick event.


TdxBarCaptionButton Hierarchy
Hierarchy

TCollectionItem

     |

TdxBarCaptionButton


Properties for TdxBarCaptionButton
TdxBarCaptionButton Properties

TdxBarCaptionButton          Legend

In TdxBarCaptionButton

Collection

Enabled

Glyph

Hint

KeyTip

Rect

ScreenTip


Events for TdxBarCaptionButton
TdxBarCaptionButton Events

TdxBarCaptionButton          Legend

In TdxBarCaptionButton

OnClick


TdxBarCaptionButton.Collection

TdxBarCaptionButton

Represents a collection of toolbar title buttons specified for the current toolbar.

property Collection: TdxBarCaptionButtons;

Description

Using the collection’s Items property, you can obtain access to any individual button that is stored in the collection.

ReadOnly Property


TdxBarCaptionButton.Enabled

TdxBarCaptionButton

Specifies whether a toolbar title button is enabled.

property Enabled: Boolean;

Description

Set the Enabled property to False to disable the button.  If disabled, the button is grayed out, and no action event is generated when it is clicked (see the button’s OnClick event).

The default value of the Enabled property is True.


TdxBarCaptionButton.Glyph

TdxBarCaptionButton

Specifies the toolbar title button’s glyph.

property Glyph: TBitmap;

Description

By default, the button is provided with a built-in glyph.

Use the Glyph property to assign a custom glyph to the button.


TdxBarCaptionButton.Hint

TdxBarCaptionButton

Specifies a hint message for a toolbar title button.

property Hint: string;

Description

Note: the hint window only appears if a ScreenTip for the button is not specified (see the button’s ScreenTip property).


TdxBarCaptionButton.KeyTip

TdxBarCaptionButton

Specifies a KeyTip for the current toolbar title button.

property KeyTip: string;

Description

The following image shows the ‘FN’ KeyTip displayed for a toolbar title button.

Note:	The specified KeyTip only appears if the corresponding ribbon tab group is expanded.


TdxBarCaptionButton.Rect

TdxBarCaptionButton          See Also

Specifies the toolbar title button’s rectangle.

property Rect: TRect;

Description

Use the Rect property to specify the button’s on-screen coordinates.


TdxBarCaptionButton.ScreenTip

TdxBarCaptionButton          See Also

References a ScreenTip associated with a toolbar title button.

property ScreenTip: TdxBarScreenTip;

Description

The TdxBarScreenTip class implements an enhanced ScreenTip.  A ScreenTip window can contain three sections – header (see the Header property), description (see the Description property) and footer (see the Footer property).

Each section can display an explanatory image (see the section’s Glyph property), a descriptive text (see the section’s Text property) and a keyboard shortcut (see the bar item’s ShortCut property).

Use the ScreenTip property to associate a ScreenTip with the button.


TdxBarCaptionButton.OnClick

TdxBarCaptionButton          See Also

Fires after a toolbar title button has been clicked.

property OnClick: TNotifyEvent;

Description

Implement the OnClick event handler to perform any action associated with the button.


TdxBarCaptionButtons
TdxBarCaptionButtons Object

Hierarchy          Properties          Methods

The TdxBarCaptionButtons class implements a collection of toolbar title buttons.

Unit

dxBar

TdxBarCaptionButtons = class(TCollection)

Description

The TdxBarCaptionButtons object is referenced by the bar’s CaptionButtons property.


TdxBarCaptionButtons Hierarchy
Hierarchy

TCollection

     |

TdxBarCaptionButtons


Properties for TdxBarCaptionButtons
TdxBarCaptionButtons Properties

TdxBarCaptionButtons          Legend

In TdxBarCaptionButtons

Bar

Items

Rect


Methods for TdxBarCaptionButtons
TdxBarCaptionButtons Methods

TdxBarCaptionButtons          Legend

In TdxBarCaptionButtons

Add


TdxBarCaptionButtons.Bar

TdxBarCaptionButtons

Represents a toolbar that owns the current series of toolbar title buttons.

property Bar: TdxBar;

Description

Use the Bar property to access the bar instance.

ReadOnly Property


TdxBarCaptionButtons.Items

TdxBarCaptionButtons          See Also

Provides indexed access to a toolbar title button at the position specified by the zero-based Index parameter.

property Items[Index: Integer]: TdxBarCaptionButton;

Description

Use the Items property to obtain a reference to the button by its index in the collection.


TdxBarCaptionButtons.Rect

TdxBarCaptionButtons          See Also

Represents a rectangle occupied by a group of toolbar title buttons.

property Rect: TRect;

Description

Use the Rect property to return the button group’s on-screen coordinates.

ReadOnly Property


TdxBarCaptionButtons.Add

TdxBarCaptionButtons          See Also

Adds a new toolbar title button at the end of the collection.

function Add: TdxBarCaptionButton;

Description

Once added, the new button automatically appears at the far right end of a toolbar’s title.  If one or more buttons are already specified prior to the creation of the new button, it’s placed at the leftmost position of the series.

The Add method returns a reference to the newly created button.


TdxBarCustomPopupMenu
TdxBarCustomPopupMenu Object

Hierarchy          Properties          Methods          Events

The TdxBarCustomPopupMenu class is the base class for classes implementing the Ribbon Application Menu, and contextual menus for the Ribbon and toolbars.

Unit

dxBar

TdxBarCustomPopupMenu = class(TdxBarComponent, IcxPopupMenu, IdxBarLinksOwner, IdxBarSubMenuOwner)

Description

At design time, you can populate the pop-up menu with the bar manager’s (see the menu’s BarManager property) items using the PopupMenu Editor and Customization Form. To invoke these dialogs, double-click an icon of the appropriate menu control dropped on a form, or right-click this icon and select the PopupMenu Editor… item in the displayed pop-up menu.  Alternatively, using the Object Inspector, you can click the ellipsis button next to the menu’s ItemLinks property to invoke these dialogs.  Once dialogs are open, drag the required items from the Customization Form to the PopupMenu Editor.

The menu’s ItemLinks property provides access to the collection of items that make up the menu.

At runtime, you can populate the menu’s ItemLinks collection with the bar manager’s items, by using one of the following methods: Add, AddButton, AddItem and AddSubItem.

The Customizing Popup Menu topic details how to build toolbar context menu.


TdxBarCustomPopupMenu Hierarchy
Hierarchy

TComponent

     |

TdxBarComponent

     |

TdxBarCustomPopupMenu


Properties for TdxBarCustomPopupMenu
TdxBarCustomPopupMenu Properties

TdxBarCustomPopupMenu          Legend

In TdxBarCustomPopupMenu

BackgroundBitmap

BarManager

BarSize

Font

ItemLinks

ItemOptions

SubMenuControl

UseOwnFont

UseRecentItems

Derived from TdxBarComponent

BarManager

Enabled

Visible


Methods for TdxBarCustomPopupMenu
TdxBarCustomPopupMenu Methods

TdxBarCustomPopupMenu          Legend

In TdxBarCustomPopupMenu

Create

Destroy

Popup

PopupEx

PopupFromCursorPos


Events for TdxBarCustomPopupMenu
TdxBarCustomPopupMenu Events

TdxBarCustomPopupMenu          Legend

In TdxBarCustomPopupMenu

OnCloseUp

OnPaintBar

OnPopup


TdxBarCustomPopupMenu.BackgroundBitmap

TdxBarCustomPopupMenu

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.  To assign a default background image for all popup menus owned by a bar manager, use the bar manager’s Backgrounds.SubMenu property.

Note:	This property has no effect in the TdxRibbonPopupMenu and TdxBarApplicationMenu.


TdxBarCustomPopupMenu.BarManager

TdxBarCustomPopupMenu          See Also

Represents the TdxBarManager object that owns the currently processed pop-up menu.

property BarManager: TdxBarManager;

Description

The TdxBarManager‘s items are used to make up a popup menu.


TdxBarCustomPopupMenu.BarSize

TdxBarCustomPopupMenu          See Also

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

property BarSize: Integer;

Description

Use the BarSize property to set the size of this bar – in pixels.  The default value for this property is 0.


TdxBarCustomPopupMenu.Font

TdxBarCustomPopupMenu

Specifies the popup menu’s font.

property Font: TFont;

Description

The specified font is used for all items that belong to the currently processed popup menu.

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


TdxBarCustomPopupMenu.ItemLinks

TdxBarCustomPopupMenu

Represents an item link collection.

property ItemLinks: TdxBarItemLinks;

Description

The Popup method uses this property’s value to create the TdxBarSubMenuControl bar control.


TdxBarCustomPopupMenu.ItemOptions

TdxBarCustomPopupMenu

Provides access to appearance settings of items in the popup menu.

property ItemOptions: TdxBarItemOptions;

Description

This property uses the ItemLinks.ItemOptions property to provide the required functionality.


TdxBarCustomPopupMenu.SubMenuControl

TdxBarCustomPopupMenu          See Also

Provides access to the submenu control that visualizes the current popup menu.

property SubMenuControl: TdxBarSubMenuControl;

Description

Use the SubMenuControl property to access the submenu control that represents a toolbar control for the current popup menu item links.

ReadOnly Property


TdxBarCustomPopupMenu.UseOwnFont

TdxBarCustomPopupMenu          See Also

Specifies the font used to draw a popup menu.

property UseOwnFont: Boolean;

Description

If the UseOwnFont property is set to False, then the font specified by the TdxBarManager.Font property is used in the popup menu.  Otherwise, the popup menu is drawn with the font specified by the menu’s Font property.


TdxBarCustomPopupMenu.UseRecentItems

TdxBarCustomPopupMenu

Specifies whether the most frequently used items are to be shown in the currently processed popup menu.

property UseRecentItems: Boolean;

Description

Set the UseRecentItems property to True to only display the most frequently used items.  Otherwise, all items will be displayed in the menu.

The default value of the UseRecentItems property is False.


TdxBarCustomPopupMenu.Create

TdxBarCustomPopupMenu

Creates a TdxBarPopupMenu instance.

constructor Create(AOwner: TComponent); override;

Description

If a form already contains the manager component, the BarManager property is set to the form’s TdxBarManager object; otherwise, the BarManager property is set to the first available TdxBarManager object from the TdxBarManagerList collection.


TdxBarCustomPopupMenu.Destroy

TdxBarCustomPopupMenu

destructor Destroy; override;

Description

This method destroys a pop-up menu instance.  Descendants can override this method to perform special actions when the pop-up menu is being destroyed.


TdxBarCustomPopupMenu.Popup

TdxBarCustomPopupMenu          See Also

Displays a popup menu on screen.

procedure Popup(X, Y: Integer);

Description

This method is used to display the popup menu onscreen at the point specified by the X and Y absolute coordinates.


TdxBarCustomPopupMenu.PopupEx

TdxBarCustomPopupMenu          See Also

Displays a popup menu onscreen.

procedure PopupEx(X, Y, AOwnerWidth, AOwnerHeight: Integer; AShowAnimation: Boolean; AOwnerBounds: PRect; AUseOwnMessageLoop: Boolean = True; AOwnerControl: TWinControl = nil);

Description

This method displays a popup menu at the position specified by the X and Y absolute 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 onscreen so it can 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).  In this instance, 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.

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.  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.


TdxBarCustomPopupMenu.PopupFromCursorPos

TdxBarCustomPopupMenu          See Also          Example 1          Example 2

Displays a popup menu at the current mouse pointer position.

procedure PopupFromCursorPos;

Description

This procedure calls the Popup method, and supplies it with mouse pointer coordinates.


TdxBarCustomPopupMenu.OnCloseUp

TdxBarCustomPopupMenu

Occurs when a popup menu has been closed.

property OnCloseUp: TNotifyEvent;

Description

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


TdxBarCustomPopupMenu.OnPaintBar

TdxBarCustomPopupMenu          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.

Canvas specifies the drawing surface.

R specifies the rectangle for drawing.

The following example demonstrates you how to draw the bar and fill it with the color green.

// Delphi

Canvas.Brush.Color := clGreen;

Canvas.FillRect(R);


TdxBarCustomPopupMenu.OnPopup

TdxBarCustomPopupMenu

Occurs before displaying a menu on screen.

property OnPopup: TNotifyEvent;

Description

Handle this event to perform special actions before a popup menu appears.


TdxBarCustomScreenTipBand
TdxBarCustomScreenTipBand Object

Hierarchy          Properties          See Also

The TdxBarCustomScreenTipBand class is the base class for classes implementing sections in the ScreenTip window.

Unit

dxBar

TdxBarCustomScreenTipBand = class(TPersistent)

Description

A ScreenTip window can be split into three sections: header (see the ScreenTip’s Header property), description (see the ScreenTip’s Description property) and footer (see the ScreenTip’s Footer property).

These sections are represented by the TdxBarCustomScreenTipBand’s derived classes.

The TdxBarCustomScreenTipBand class provides an interface common to its descendants:

•	Glyph property – specifies an explanatory image;

•	Text property – specifies a descriptive text;

•	TextAlign property – specifies the horizontal alignment of text in the section.

Additionally, the Font property is provided to identify font options that are currently applied to a descriptive text in a particular section.

Do not use the TdxBarCustomScreenTipBand class directly.  Use its descendants instead.


TdxBarCustomScreenTipBand Hierarchy
Hierarchy

TPersistent

     |

TdxBarCustomScreenTipBand


Properties for TdxBarCustomScreenTipBand
TdxBarCustomScreenTipBand Properties

TdxBarCustomScreenTipBand          Legend

In TdxBarCustomScreenTipBand

Font

Glyph

Text

TextAlign


TdxBarCustomScreenTipBand.Font

TdxBarCustomScreenTipBand          See Also

Gets font settings for the descriptive string displayed in the currently processed ScreenTip.

property Font: TFont;

Description

The Font property returns font settings that depend upon settings are currently applied to the string – either TdxBarScreenTipRepository‘s or system font options (see the ScreenTip repository’s AssignedFonts property).

ReadOnly Property


TdxBarCustomScreenTipBand.Glyph

TdxBarCustomScreenTipBand

Specifies the explanatory image for the currently processed ScreenTip.

property Glyph: TBitmap;

Description

The specified image is displayed in the ScreenTip along with the descriptive text (see the Text property).

The image is displayed to the left of the descriptive text, if the latter is aligned to the right of the ScreenTip window.  It’s displayed to the right of the text, if the text is aligned to the left of the window (see the TextAlign property).


TdxBarCustomScreenTipBand.Text

TdxBarCustomScreenTipBand

Specifies the descriptive text for the currently processed ScreenTip.

property Text: string;

Description

The specified text is a description of the bar item’s intended purpose.

This text can be used along with the specified explanatory image (see the Glyph property).

The image is displayed to the left of the descriptive text, if the latter is aligned to the right of the ScreenTip window.  It’s displayed to the right of the text, if the text is aligned to the left of the window (see the TextAlign property).


TdxBarCustomScreenTipBand.TextAlign

TdxBarCustomScreenTipBand

Specifies the horizontal alignment of the descriptive text in the currently processed ScreenTip.

type

  TdxBarScreenTipBandTextAlign = (stbtaLeft, stbtaRight);

property TextAlign: TdxBarScreenTipBandTextAlign;

Description

A ScreenTip provides a description for a corresponding bar item.  This description contains an explanatory image (see the Glyph property), and a descriptive text (see the Text property).

Use the TextAlign property to specify the horizontal alignment of the descriptive text – it can be aligned to the left or to the right of the ScreenTip window.

The image is displayed to the left of the descriptive text, if the text is aligned to the right of the ScreenTip window.  The image is displayed to the right of the text, if the text is aligned to the left side of the window (see the TextAlign property).

The default value of the TextAlign property is stbtaRight.


TdxBarExtraPaneItem
TdxBarExtraPaneItem Object

Hierarchy          Properties

TdxBarExtraPaneItem represents an item displayed in the Application Menu’s right panel.

Unit

dxBar

TdxBarExtraPaneItem = class(TCollectionItem)

Description

This class allows you to do the following:

•	specify the item’s display name (DisplayText).

•	provide an item with an explanatory image (ImageIndex).

•	specify additional information for each item (Text).

•	store an arbitrary numeric value with the item (Data).

The TdxBarExtraPaneItem instance is referenced by the Application Menu’s ExtraPaneItems.Items property.


TdxBarExtraPaneItem Hierarchy
Hierarchy

TCollectionItem

     |

TdxBarExtraPaneItem


Properties for TdxBarExtraPaneItem
TdxBarExtraPaneItem Properties

TdxBarExtraPaneItem          Legend

In TdxBarExtraPaneItem

Data

DisplayText

ImageIndex

Text


TdxBarExtraPaneItem.Data

TdxBarExtraPaneItem

Allows you to store an arbitrary numeric value associated with the item.

property Data: Integer;


TdxBarExtraPaneItem.DisplayText

TdxBarExtraPaneItem          See Also

Specifies the item’s display name.

property DisplayText: string;

Description

If the DisplayText property is not specified, then the Text property’s value is used to display the item name.


TdxBarExtraPaneItem.ImageIndex

TdxBarExtraPaneItem          See Also

Specifies the item's explanatory image.

property ImageIndex: Integer;

The default value of the ImageIndex property is -1.


TdxBarExtraPaneItem.Text

TdxBarExtraPaneItem

Specifies arbitrary textual information for the item.

property Text: string;

Description

Apart from the DisplayText property that is used to display the item’s name, the Text property is used to specify any information associated with the item.  For example, this property can contain the path to the file location, if the shortcut item represents a file.


TdxBarExtraPaneItems
TdxBarExtraPaneItems Object

Hierarchy          Properties          Methods

TdxBarExtraPaneItems represents a collection of items displayed in the Application Menu’s right panel.

Unit

dxBar

TdxBarExtraPaneItems = class(TCollection)

Description

The TdxBarExtraPaneItems instance is referenced by the Application Menu’s ExtraPane.Items property.


TdxBarExtraPaneItems Hierarchy
Hierarchy

TCollection

     |

TdxBarExtraPaneItems


Properties for TdxBarExtraPaneItems
TdxBarExtraPaneItems Properties

TdxBarExtraPaneItems          Legend

In TdxBarExtraPaneItems

Items


Methods for TdxBarExtraPaneItems
TdxBarExtraPaneItems Methods

TdxBarExtraPaneItems          Legend

In TdxBarExtraPaneItems

Add

IndexOf

Insert


TdxBarExtraPaneItems.Items

TdxBarExtraPaneItems          See Also

Provides indexed access to items in the collection.

property Items[Index: Integer]: TdxBarExtraPaneItem;

Description

Use the Items property to obtain a reference to an item at the position specified by the zero-based Index parameter.


TdxBarExtraPaneItems.Add

TdxBarExtraPaneItems          See Also

Adds a new item at the end of the collection.

function Add: TdxBarExtraPaneItem;

Description

Once added, the new item is automatically displayed at the end of the item list in the Application Menu’s right panel.

The Add method returns a reference to the newly created item.


TdxBarExtraPaneItems.IndexOf

TdxBarExtraPaneItems          See Also

Returns an AItemText’s zero-based index in a collection.

function IndexOf(const AItemText: string): Integer;

Description

The IndexOf method returns -1 if there is no AItemText item in the collection.


TdxBarExtraPaneItems.Insert

TdxBarExtraPaneItems          See Also

Inserts a new item in the collection at the position specified by the zero-based Index parameter.

function Insert(AIndex: Integer): TdxBarExtraPaneItem;

Description

Once inserted, the new item is automatically displayed in the specified position in the Application Menu’s right panel.

The Insert method returns a reference to the newly created item.


TdxBarApplicationMenuButton
TdxBarApplicationMenuButton Object

Hierarchy         Properties

Represents an Application Menu button.

Unit

dxBar

TdxBarApplicationMenuButton = class(TCollectionItem)

Description

An Application Menu button is a container for a bar button (a TdxBarButton, TdxBarLargeButton or any of their descendants).  To display an Application Menu button, add it to the Application Menu’s Buttons collection, and associate it with the desired bar button via the Item property.

By default, an Application Menu button’s width is automatically calculated to display both an image and caption.  To adjust the button’s width, use the Width property.  To customize all other appearance settings and respond to events, use corresponding properties of the associated bar button.


TdxBarApplicationMenuButton Hierarchy
Hierarchy

TCollectionItem

     |

TdxBarApplicationMenuButton


Properties for TdxBarApplicationMenuButton
TdxBarApplicationMenuButton Properties

TdxBarApplicationMenuButton          Legend

In TdxBarApplicationMenuButton

Collection

Item

Width


TdxBarApplicationMenuButton.Collection

TdxBarApplicationMenuButton

Provides access to a collection of Application Menu buttons.

property Collection: TdxBarApplicationMenuButtons;

Description

Using the collection’s Items property, you can obtain access to any individual button that is stored in the collection.

ReadOnly Property


TdxBarApplicationMenuButton.Item

TdxBarApplicationMenuButton

Specifies the bar button associated with the current Application Menu button.

property Item: TdxBarButton;

Description

Use properties of the associated bar button to customize appearance aspects and handle events of the Application Menu button.


TdxBarApplicationMenuButton.Width

TdxBarApplicationMenuButton

Specifies the button's width (in pixels).

property Width: Integer;

Description

You can use this property to equalize button widths or narrow buttons to display only images.  If this property is set to 0, the button's width is calculated automatically to fit both image and text.

The default value of the Width property is 0.


TdxBarApplicationMenuButtons
TdxBarApplicationMenuButtons Object

Hierarchy          Properties          Methods

Represents a collection of buttons displayed under the Application Menu’s panels.

Unit

dxBar

TdxBarApplicationMenuButtons = class(TCollection)

Description

Application Menu buttons are displayed from right to left in a single row.  That is, the first button in the collection is painted as rightmost.

Note:	Buttons that don’t entirely fit into the Application Menu’s width are not displayed.  Use the Menu’s ExtraPane.Size and ExtraPane.WidthRatio properties, and a button’s Width property to adjust their sizes as your needs dictate.


TdxBarApplicationMenuButtons Hierarchy
Hierarchy

TCollection

     |

TdxBarApplicationMenuButtons


Properties for TdxBarApplicationMenuButtons
TdxBarApplicationMenuButtons Properties

TdxBarApplicationMenuButtons          Legend

In TdxBarApplicationMenuButtons

Items


Methods for TdxBarApplicationMenuButtons
TdxBarApplicationMenuButtons Methods

TdxBarApplicationMenuButtons          Legend

In TdxBarApplicationMenuButtons

Add

Insert


TdxBarApplicationMenuButtons.Items

TdxBarApplicationMenuButtons          See Also

Provides indexed access to buttons in the collection.

property Items[Index: Integer]: TdxBarApplicationMenuButton;

Description

Use the Items property to obtain a reference to a button at the position specified by the zero-based Index parameter.


TdxBarApplicationMenuButtons.Add

TdxBarApplicationMenuButtons          See Also

Adds a new button at the end of the collection.

function Add: TdxBarApplicationMenuButton;

Description

This function returns a reference to the newly created button.


TdxBarApplicationMenuButtons.Insert

TdxBarApplicationMenuButtons          See Also

Inserts a new button in the collection at the position specified by the zero-based AIndex parameter.

function Insert(AIndex: Integer): TdxBarApplicationMenuButton;

Description

This function returns a reference to the newly created button.


TdxBarItemOptions
TdxBarItemOptions Object

Hierarchy          Properties

Represents appearance options for menu items.

Unit

dxBar

TdxBarItemOptions = class(TPersistent)

Description

This class introduces properties that control the following menu item appearance options:

•	size (Size);

•	the visibility of descriptions and shortcuts (ShowDescriptions and ShowShortCuts);

•	a set of flags that determine which of the options listed above have been modified (AssignedValues).

These options are in effect for toolbar and Ribbon context menus (see TdxBarPopupMenu, TdxRibbonPopupMenu and TdxBarApplicationMenu) and toolbar subitems (see TCustomdxBarSubItem) that display large menu items.

Use the menu’s ItemOptions property to toggle the desired option.


TdxBarItemOptions Hierarchy
Hierarchy

TPersistent

     |

TdxBarItemOptions


Properties for TdxBarItemOptions
TdxBarItemOptions Properties

TdxBarItemOptions          Legend

In TdxBarItemOptions

AssignedValues

ShowDescriptions

ShowShortCuts

Size


TdxBarItemOptions.AssignedValues

TdxBarItemOptions          See Also

Provides access to a set of flags that determine which appearance options have been modified.

type

  TdxBarItemOptionValue = (ioShowDescriptions, ioShowShortCuts, ioSize);

  TdxBarItemOptionValues = set of TdxBarItemOptionValue;

property AssignedValues: TdxBarItemOptionValues;

Description

Changing the ShowDescriptions, ShowShortCuts, and Size properties sets the corresponding option flag in the AssignedValues property.  When an option flag is not set or reset, the default property value is used.  For subitem controls, this value is determined by the corresponding option of the parent bar’s ItemLinks.ItemOptions property.


TdxBarItemOptions.ShowDescriptions

TdxBarItemOptions          See Also

Toggles the general appearance of item descriptions for large menu items.

property ShowDescriptions: Boolean;

Description

When this property is set to True, the height of each large menu item is adjusted to display its description specified by the corresponding bar item’s Description property.  Otherwise, descriptions are not displayed.

Value	Sample
True
False

Note:	To display large menu items, set the Size property to misLarge.

For the Application Menu, the default value of the ShowDescriptions property is True.  Otherwise, it is False.


TdxBarItemOptions.ShowShortCuts

TdxBarItemOptions          See Also

Toggles the general appearance of item shortcuts.

property ShowShortCuts: Boolean;

Description

When this property is set to True, each menu item displays its shortcut specified by the corresponding bar item’s ShortCut property.  Otherwise, shortcuts are not displayed.

For the Application Menu, the default value of the ShowShortCuts property is False.  Otherwise, it is True.


TdxBarItemOptions.Size

TdxBarItemOptions          See Also

Specifies menu item size.

type

  TdxBarMenuItemSize = (misNormal, misLarge);

property Size: TdxBarMenuItemSize;

Description

All possible values are listed in the following table.

Value	Meaning	Sample
misNormal	Standard size (for 16x16 images).
misLarge	Double size (for 32x32 images).

Note:	For large menu items, you can toggle the general appearance of item descriptions via the ShowDescriptions property.

For the Application Menu, the default value of the Size property is misLarge.  Otherwise, it is misNormal.


TdxBarScreenTip
TdxBarScreenTip Object

Hierarchy          Properties          Methods          See Also

The TdxBarScreenTip class implements a ScreenTip.

Unit

dxBar

TdxBarScreenTip = class(TcxComponentCollectionItem)

Description

The TdxBarScreenTip class represents an enhanced ScreenTip.  A ScreenTip window can contain three sections – header (see the Header property), description (see the Description property) and footer (see the Footer property).

Each section can display an explanatory image (see the section’s Glyph property), a descriptive text (see the section’s Text property) and a keyboard shortcut (see the bar item’s ShortCut property).

To display a common footer across a number of different ScreenTips, specify footer information via the ScreenTip repository’s StandardFooter property and toggle the UseStandardFooter property of specific ScreenTips.

If there are no specific details to be shown in the ScreenTip’s header, toggle the ScreenTip’s UseHintAsHeader property to display a hint in this section specified by the bar item’s Hint property.

To customize the width of the ScreenTip’s window, use the ScreenTip’s Width property.

From the ScreenTip instance you can access other ScreenTips via the ScreenTip’s Collection property.

A bar item’s associated ScreenTip can be accessed via the bar item’s ScreenTip property.


TdxBarScreenTip Hierarchy
Hierarchy

TcxComponentCollectionItem

     |

TdxBarScreenTip


Properties for TdxBarScreenTip
TdxBarScreenTip Properties

TdxBarScreenTip          Legend

In TdxBarScreenTip

Collection

Description

Footer

Header

UseHintAsHeader

UseStandardFooter

Width

Derived from TcxComponentCollectionItem

ID

Index


Methods for TdxBarScreenTip
TdxBarScreenTip Methods

TdxBarScreenTip          Legend

Derived from TcxComponentCollectionItem

AddToCollection

GetParentComponent

RemoveFromCollection


TdxBarScreenTip.Collection

TdxBarScreenTip

Represents the ScreenTip collection.

property Collection: TdxBarScreenTipCollection;

Description

The ScreenTip collection stores ScreenTips created both at design and run-time.

At design-time, in the Object Inspector, click the ellipsis button next to the ScreenTip repository’s Items property to invoke a design-time editor for adding or removing ScreenTips from the repository (see TdxBarScreenTipRepository).

At run-time, you can add a new ScreenTip to the collection, using the collection’s Add method.

Indexed access to an individual ScreenTip can be obtained via the collection’s Items property.

ReadOnly Property


TdxBarScreenTip.Description

TdxBarScreenTip          See Also

Represents settings for the ScreenTip window’s description section.

property Description: TdxBarScreenTipBand;

Description

The ScreenTip window is split into three sections – header (see the Header property), description and footer (see the Footer property).

The description section contains a description of the associated bar item.

With the Description property, you can assign an explanatory image (see the section’s Glyph property), specify a descriptive text (see the section’s Text property) and also specify the text’s horizontal alignment (see the section’s TextAlign property).


TdxBarScreenTip.Footer

TdxBarScreenTip          See Also

Represents settings for the ScreenTip window’s footer section.

property Footer: TdxBarScreenTipBand;

Description

The ScreenTip window is split into three sections – header (see the Header property), description (see the Description property) and footer.

The footer section contains footer information on the associated bar item.

With the Footer property, you can assign an explanatory image (see the section’s Glyph property), specify a descriptive text (see the section’s Text property) and also specify the text’s horizontal alignment (see the section’s TextAlign property).


TdxBarScreenTip.Header

TdxBarScreenTip          See Also

Represents settings for the ScreenTip window’s header section.

property Header: TdxBarScreenTipBand;

Description

The ScreenTip window is split into three sections – header, description (see the Description property) and footer (see the Footer property).

The header section contains a short description of the associated bar item.  For example, it can display the bar item’s caption (specified via the section’s Text property) and the corresponding keyboard shortcut, if specified (see the bar item’s ShortCut property).

With the Header property, you can assign an explanatory image (see the section’s Glyph property), specify a descriptive text (see the section’s Text property) and also specify the text’s horizontal alignment (see the section’s TextAlign property).


TdxBarScreenTip.UseHintAsHeader

TdxBarScreenTip          See Also

Specifies whether header information is provided by the bar item’s Hint property.

property UseHintAsHeader: Boolean;

Description

Generally, information in the ScreenTip’s header section is specified via the ScreenTip’s Header property.

To avoid repetition if there is no specific header information, you can show a hint message here (specified by the bar item’s Hint property).  To do this, set the UseHintAsHeader property to True.

The default value of the UseHintAsHeader property is False.


TdxBarScreenTip.UseStandardFooter

TdxBarScreenTip          See Also

Specifies whether to display footer information provided by the ScreenTip repository’s StandardFooter property.

property UseStandardFooter: Boolean;

Description

Some ScreenTips can contain standard footer information.  In order to avoid repetition, you can specify footer information via the ScreenTip repository’s StandardFooter property for these ScreenTips.

To apply footer details specified by the StandardFooter property to the currently processed ScreenTip, set the UseStandardFooter property to True.

The default value of the UseStandardFooter property is False.


TdxBarScreenTip.Width

TdxBarScreenTip

Specifies the width of the currently processed ScreenTip.

property Width: Integer;

Description

If the Width property is set to 0, the ScreenTip’s width is calculated automatically.  The calculated value depends upon whether an explanatory image in the ScreenTip’s description section is provided.  If so, the ScreenTip’s window is 318 pixels wide.  Otherwise, the window’s width is 210 pixels.

The default value of the Width property is 0.


TdxBarScreenTipBand
TdxBarScreenTipBand Object

Hierarchy          Properties          See Also

The TdxBarScreenTipBand class implements a section in the ScreenTip window.

Unit

dxBar

TdxBarScreenTipBand = class(TdxBarCustomScreenTipBand)

Description

A ScreenTip window can be split into three sections: header (see the ScreenTip’s Header property), description (see the ScreenTip’s Description property) and footer (see the ScreenTip’s Footer property).

Each section is represented by TdxBarScreenTipBand.

With the TdxBarScreenTipBand’s properties, you can specify the following for each section:

•	An explanatory image (see the Glyph property);

•	A descriptive text (see the Text property).

You can also specify the horizontal alignment of text in the section (see the TextAlign property).

Note: to specify common footer information for a number of ScreenTips, use the ScreenTip repository’s StandardFooter property instead of the ScreenTip’s Footer property to avoid replication.  To specify which ScreenTip displays this information, toggle the UseStandardFooter property of the specific ScreenTip.


TdxBarScreenTipBand Hierarchy
Hierarchy

TPersistent

     |

TdxBarCustomScreenTipBand

     |

TdxBarScreenTipBand


Properties for TdxBarScreenTipBand
TdxBarScreenTipBand Properties

TdxBarScreenTipBand          Legend

In TdxBarScreenTipBand

ScreenTip

Derived from TdxBarCustomScreenTipBand

Font

Glyph

Text

TextAlign


TdxBarScreenTipBand.ScreenTip

TdxBarScreenTipBand

References a ScreenTip that contains the currently processed section.

property ScreenTip: TdxBarScreenTip;

Description

The TdxBarScreenTip class implements an enhanced ScreenTip.  A ScreenTip window can contain three sections – header (see the Header property), description (see the Description property) and footer (see the Footer property).

Each section can display an explanatory image (see the section’s Glyph property), a descriptive text (see the section’s Text property) and a keyboard shortcut (see the bar item’s ShortCut property).

To display a common footer in a number of ScreenTips, specify footer information via the ScreenTip repository’s StandardFooter property and toggle the UseStandardFooter property of specific ScreenTips.

If there are no specific details to be shown in the ScreenTip’s header, toggle the ScreenTip’s UseHintAsHeader property to display a hint in this section –specified by the bar item’s Hint property.

To customize the width of the ScreenTip’s window, use the ScreenTip’s Width property.

From the ScreenTip instance, you can access other ScreenTips via the ScreenTip’s Collection property.

Use the ScreenTip property to access the ScreenTip instance.

ReadOnly Property


TdxBarScreenTipCollection
TdxBarScreenTipCollection Object

Hierarchy          Properties          Methods

Represents the ScreenTip collection.

Unit

dxBar

TdxBarScreenTipCollection = class(TcxComponentCollection)

Description

TdxBarScreenTipCollection stores ScreenTips created both at design and run-time.

At design-time (within the Object Inspector) click the ellipsis button next to the ScreenTip repository’s Items property to invoke a design-time editor for adding or removing ScreenTips from the repository (see TdxBarScreenTipRepository).

At run-time, you can add a new ScreenTip to the collection using the collection’s Add method.

Indexed access to an individual ScreenTip can be obtained via the Items property.

The TdxBarScreenTipCollection object is referenced by the ScreenTip repository’s Items property.


TdxBarScreenTipCollection Hierarchy
Hierarchy

TcxComponentCollection

     |

TdxBarScreenTipCollection


Properties for TdxBarScreenTipCollection
TdxBarScreenTipCollection Properties

TdxBarScreenTipCollection          Legend

In TdxBarScreenTipCollection

Items

Repository


Methods for TdxBarScreenTipCollection
TdxBarScreenTipCollection Methods

TdxBarScreenTipCollection          Legend

In TdxBarScreenTipCollection

Add


TdxBarScreenTipCollection.Items

TdxBarScreenTipCollection

Provides indexed access to the ScreenTip at the position specified by the zero-based Index parameter.

property Items[Index: Integer]: TdxBarScreenTip;

Description

The collection contains bar item ScreenTips created both at design and run-time.


TdxBarScreenTipCollection.Repository

TdxBarScreenTipCollection

Represents the ScreenTip repository.

property Repository: TdxBarScreenTipRepository;

Description

A ScreenTip repository is a component used for storing information on bar item ScreenTips.

It wraps the ScreenTip collection (see the repository’s Items property) and provides the following ScreenTip-specific settings:

•	DescriptionFont property – represents font settings for a descriptive string displayed in the ScreenTip window’s description section;

•	FooterFont property – represents font settings for a descriptive string displayed in the ScreenTip window’s footer section;

•	HeaderFont property – represents font settings for a descriptive string displayed in the ScreenTip window’s header section;

•	AssignedFonts property – activates font settings specified by the above properties;

•	ShowDescription property – specifies whether to show an enhanced ScreenTip;

•	StandardFooter property – provides settings for a ScreenTip window’s footer section common to a number of ScreenTips.  To apply settings specified by this property to a particular ScreenTip, set the ScreenTip’s UseStandardFooter property to True.

ReadOnly Property


TdxBarScreenTipCollection.Add

TdxBarScreenTipCollection

Adds a new ScreenTip at the end of the ScreenTip collection.

function Add: TdxBarScreenTip;

Description

The Add method returns a reference to the newly created ScreenTip.


TdxBarScreenTipFooterBand
TdxBarScreenTipFooterBand Object

Hierarchy          Properties

The TdxBarScreenTipFooterBand class implements the ScreenTip’s footer section that can be defined on a set of ScreenTips.

Unit

dxBar

TdxBarScreenTipFooterBand = class(TdxBarCustomScreenTipBand)

Description

A ScreenTip window can be split into three sections – header (see the ScreenTip’s Header property), description (see the ScreenTip’s Description property) and footer (see the ScreenTip’s Footer property).

These sections are of type TdxBarScreenTipBand, and proprietary to each ScreenTip.

If an application needs to display footer information common to a number of ScreenTips, use the ScreenTip repository’s StandardFooter property (instead of the ScreenTip’s Footer property), and toggle the UseStandardFooter property of specific ScreenTips to show this information.


TdxBarScreenTipFooterBand Hierarchy
Hierarchy

TPersistent

     |

TdxBarCustomScreenTipBand

     |

TdxBarScreenTipFooterBand


Properties for TdxBarScreenTipFooterBand
TdxBarScreenTipFooterBand Properties

TdxBarScreenTipFooterBand          Legend

In TdxBarScreenTipFooterBand

Repository

Derived from TdxBarCustomScreenTipBand

Font

Glyph

Text

TextAlign


TdxBarScreenTipFooterBand.Repository

TdxBarScreenTipFooterBand

References the ScreenTip repository.

property Repository: TdxBarScreenTipRepository;

Description

A ScreenTip repository is a component used for storing information on bar item ScreenTips.

It wraps the ScreenTip collection (see the repository’s Items property), and provides the following ScreenTip-specific settings:

•	DescriptionFont property – represents font settings for a descriptive string displayed in the ScreenTip window’s description section;

•	FooterFont property – represents font settings for a descriptive string displayed in the ScreenTip window’s footer section;

•	HeaderFont property – represents font settings for a descriptive string displayed in the ScreenTip window’s header section;

•	AssignedFonts property – activates font settings specified by the above properties;

•	ShowDescription property – specifies whether to show an enhanced ScreenTip;

•	StandardFooter property – provides settings for a ScreenTip window’s footer section common to a number of ScreenTips.  To apply settings specified by this property to a particular ScreenTip, set the ScreenTip’s UseStandardFooter property to True.

ReadOnly Property


TdxBarScreenTipRepository
 TdxBarScreenTipRepository Object

Hierarchy          Properties          See Also

The TdxBarScreenTipRepository class represents the ScreenTip repository component.

Unit

dxBar

TdxBarScreenTipRepository = class(TComponent)

Description

A ScreenTip repository is a component used for storing information on bar item ScreenTips.

It wraps the ScreenTip collection (see the repository’s Items property) and provides the following ScreenTip-specific settings:

•	DescriptionFont property – represents font settings for a descriptive string displayed in the ScreenTip window’s description section;

•	FooterFont property – represents font settings for a descriptive string displayed in the ScreenTip window’s footer section;

•	HeaderFont property – represents font settings for a descriptive string displayed in the ScreenTip window’s header section;

•	AssignedFonts property – activates font settings specified by the above properties;

•	ShowDescription property – specifies whether to show an enhanced ScreenTip;

•	StandardFooter property – provides settings for a ScreenTip window’s footer section common to a number of ScreenTips.  To apply settings specified by this property to a particular ScreenTip, set the ScreenTip’s UseStandardFooter property to True.


TdxBarScreenTipRepository Hierarchy
Hierarchy

TComponent

     |

TdxBarScreenTipRepository


Properties for TdxBarScreenTipRepository
TdxBarScreenTipRepository Properties

TdxBarScreenTipRepository          Legend

In TdxBarScreenTipRepository

AssignedFonts

DescriptionFont

FooterFont

HeaderFont

Items

ShowDescription

StandardFooter


TdxBarScreenTipRepository.AssignedFonts

TdxBarScreenTipRepository

Activates font settings to be applied to a descriptive text shown in the specified sections of the ScreenTip window.

property AssignedFonts: TdxScreenTipRepositoryFonts;

Description

By activating the corresponding flags, specified font settings can be applied to the text contained in the following sections:

•	The header section – contains header information;

•	The description section – contains a description of an associated bar item;

•	The footer section – contains footer information.

Note: if you modify font settings, the corresponding flags are automatically activated on the AssignedFonts property.

The default value of the AssignedFonts property is [].


TdxBarScreenTipRepository.DescriptionFont

TdxBarScreenTipRepository          See Also

Represents font settings for a descriptive string displayed in the ScreenTip window’s description section.

property DescriptionFont: TFont;

Description

The ScreenTip window is split into three sections – header, description and footer (see the ScreenTip’s Description, Footer and Header properties).

A descriptive string to be shown in the description section is specified via the ScreenTip’s Decscription.Text property.

Specified font settings are only applied if the stbDescription flag on the AssignedFonts property is active.  Otherwise, system settings are used instead.


TdxBarScreenTipRepository.FooterFont

TdxBarScreenTipRepository          See Also

Represents font settings for a descriptive string displayed in the ScreenTip window’s footer section.

property FooterFont: TFont;

Description

The ScreenTip window is split into three sections – header, description and footer (see the ScreenTip’s Description, Footer and Header properties).

A descriptive string to be shown in the footer section is specified via the ScreenTip’s Footer.Text property.

Specified font settings are only applied if the stbFooter flag on the AssignedFonts property is active.  Otherwise, system settings are used instead.


TdxBarScreenTipRepository.HeaderFont

TdxBarScreenTipRepository          See Also

Represents font settings for a descriptive string displayed in the ScreenTip window’s header section.

property HeaderFont: TFont;

Description

The ScreenTip window is split into three sections – header, description and footer (see the ScreenTip’s Description, Footer and Header properties).

A descriptive string to be shown in the header section is specified via the ScreenTip’s Header.Text property.

Specified font settings are only applied if the stbHeader flag on the AssignedFonts property is active.  Otherwise, system settings are used instead.


TdxBarScreenTipRepository.Items

TdxBarScreenTipRepository

Represents a collection of ScreenTips defined for bar items.

property Items: TdxBarScreenTipCollection;

Description

This collection stores ScreenTips created both at design and run-time.

At design-time (within the Object Inspector) click the ellipsis button next to the Items property to invoke a design-time editor for adding or removing ScreenTips from the repository.

At run-time, you can add a new ScreenTip to the collection using the collection’s Add method.

Indexed access to an individual ScreenTip can be obtained via the collection’s Items property.


TdxBarScreenTipRepository.ShowDescription

TdxBarScreenTipRepository          See Also

Specifies whether to show an enhanced or a standard ScreenTip.

property ShowDescription: Boolean;

Description

An enhanced ScreenTip can contain three sections – header (see the ScreenTip’s Header property), description (see the ScreenTip’s Description property) and footer (see the ScreenTip’s Footer property).

Each section can display an explanatory image (see the section’s Glyph property), a descriptive text (see the section’s Text property) and a keyboard shortcut (see the bar item’s ShortCut property).

A standard ScreenTip only shows a header section containing a descriptive text and a keyboard shortcut.

Note: if a descriptive text is not specified for a particular bar item or the ScreenTip’s UseHintAsHeader property is set to True, a hint message (see the bar item’s Hint property) will be shown instead.

If the ShowDescription property’s value is True, enhanced ScreenTips appear.

Set the ShowDescription property to False, to show standard ScreenTips.

The ShowDescription property’s value is applied to all ScreenTips defined with the repository.

The default value of the ShowDescription property is True.


TdxBarScreenTipRepository.StandardFooter

TdxBarScreenTipRepository          See Also

Represents ScreenTip footer settings common to a number of ScreenTips.

property StandardFooter: TdxBarScreenTipFooterBand;

Description

Each ScreenTip contains footer information provided by the proprietary Footer property.

Some ScreenTips can contain standard footer information.  In order to avoid repetition, you can specify footer information via the StandardFooter property.  To display this information in specific ScreenTips, set their UseStandardFooter property to True.


TdxCustomBarEdit
TdxCustomBarEdit Object

Hierarchy          Properties          See Also

The TdxCustomBarEdit class is the base class for in-place editors and the editors from the ExpressEditors library.

Unit

dxBar

TdxCustomBarEdit = class(TdxBarWindowItem)

Description

The TdxCustomBarEdit class provides an interface common to in-place editors and the editors from the ExpressEditors Library.

Use the ShowCaption and Width properties to specify the visibility of the editor’s caption and the editor’s width, respectively.  A glyph or an image can be painted on an editor via its Glyph and ImageIndex properties.


TdxCustomBarEdit Hierarchy
Hierarchy

TComponent

     |

TdxBarComponent

     |

TdxBarItem

     |

TdxBarWindowItem

     |

TdxCustomBarEdit


Properties for TdxCustomBarEdit
TdxCustomBarEdit Properties

TdxCustomBarEdit          Legend

In TdxCustomBarEdit

ShowCaption

StyleEdit

Width

Derived from TdxBarWindowItem

CurText

EmptyWindow

FocusedItemLink

Text

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


Methods for TdxCustomBarEdit
TdxCustomBarEdit Methods

TdxCustomBarEdit          Legend

TdxCustomBarEdit

WidthChanged


Events for TdxCustomBarEdit
TdxCustomBarEdit Events

TdxCustomBarEdit          Legend

Derived from TdxBarWindowItem

OnChange

OnCurChange

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TdxCustomBarEdit.ShowCaption

TdxCustomBarEdit          Example

Specifies whether the edit item’s caption is displayed.

property ShowCaption: Boolean;

Description

If the ShowCaption property is set to True, the edit item’s caption will be displayed.

The default value of the ShowCaption property is False.


TdxCustomBarEdit.Width

TdxCustomBarEdit          See Also

Specifies the edit item’s width – in pixels.

property Width: Integer;


TdxCustomBarEdit.StyleEdit

TdxCustomBarEdit            See Also

Specifies the style of the current in-place editor.

property StyleEdit: TcxStyle;

Description

The StyleEdit property allows the background color, bitmap, font settings and text color for the current in-place editor to be specified.  Refer to the description of the TcxStyle class for additional information as to how to change in-place editor styles.

To specify the appearance of its caption, use its Style property.

Once specified for a particular in-place editor, the StyleEdit property’s value can be applied to other items via the Style and StyleEdit properties of these items.

Use the bar manager’s Font property to assign font settings to all the bar manager’s items (including its in-place editors) at the same time.


TdxCustomBarEdit.WidthChanged

TdxBarEdit         See Also

Updates all linked item controls to reflect the current editor’s width changes.

procedure WidthChanged; virtual;

Description

Descendants override this method to perform special actions when an editor’s width has been changed.


TdxCustomBarEditControl
TdxCustomBarEditControl Object

Hierarchy          Properties          Methods

The TdxCustomBarEditControl class is the base class for classes that represent the bar standard text editors and ExpressEditors used as toolbar elements.

Unit

dxBar

TdxCustomBarEditControl = class(TdxBarWinControl)

Description

The derived classes are responsible for creating an instance of a particular editor, painting it and providing information on the editor’s view.


TdxCustomBarEditControl Hierarchy
Hierarchy

TObject

     |

TdxBarItemControl

     |

TdxBarWinControl

     |

TdxCustomBarEditControl


Properties for TdxCustomBarEditControl
TdxCustomBarEditControl Properties

TdxCustomBarEditControl          Legend

In TdxCustomBarEditControl

CaptionWidth

ShowCaption

Derived from TdxBarWinControl

Focused

Handle

Item

Text

WindowRect

Derived from TdxBarItemControl

BarManager

 	Caption

Enabled

Glyph

Height

Hint

IsActive

IsSelected

ImageIndex

Item

ItemLink

PainterClass

Parent

Pressed

ShortCut

Width


Methods for TdxCustomBarEditControl
TdxCustomBarEditControl Methods

TdxCustomBarEditControl          Legend

Derived from TdxBarWinControl

CanClicked

ControlClick

HasWindow

IsDestroyOnClick

WndProc

Derived from TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

HasWindow

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged

WidthChanged


TdxCustomBarEditControl.CaptionWidth

TdxCustomBarEditControl

property CaptionWidth: Integer;

Description

The CaptionWidth property is used internally to obtain the width of an edit item control’s caption - in pixels.

ReadOnly Property


TdxCustomBarEditControl.ShowCaption

TdxCustomBarEditControl          See Also

property ShowCaption: Boolean;

Description

If the ShowCaption property’s value is False, then the edit item control’s caption is hidden.

ReadOnly Property


TdxBarPainter
TdxBarPainter Object

Hierarchy          Methods

Represents a library of drawing primitives.

Unit

dxBar

TdxBarPainter = class(TObject)

Description

The TdxBarPainter class represents a library of drawing primitives used by toolbar controls, submenu controls and item controls to render themselves on a graphic surface.  This class is an ancestor of the TdxBarStandardPainter, TdxBarFlatPainter, TdxBarOffice11Painter, TdxBarXPPainter, and TdxBarSkinnedPainter classes that implement drawing primitives using the Standard, Flat, MSOffice11, Windows XP look & feel, and skin options respectively.

Use the bar manager’s PainterClass property to access the class used by this bar manager for painting toolbars and their items.

The class used by a toolbar control or an item control can be accessed individually via the PainterClass property of the corresponding control.


TdxBarPainter Hierarchy
Hierarchy

TObject

     |

TdxBarPainter


Methods for TdxBarPainter
TdxBarPainter Methods

TdxBarPainter          Legend

In TdxBarPainter

BarFingersSize

BeforeFingersSize


TdxBarPainter.BarFingersSize

TdxCustomBarEditControl          See Also

Returns a drag grip’s size for a particular toolbar.

class function BarFingersSize(ABar: TdxBar): Integer;

Description

The following image shows a toolbar with a drag grip:


TdxBarPainter.BeforeFingersSize

TdxCustomBarEditControl

Returns the indent before a toolbar’s drag grip – in pixels.

class function BeforeFingersSize: Integer; virtual;

Description

When a toolbar can be moved along dock controls, it has a drag grip.  The BeforeFingersSize method is used internally to determine the size of the space before a drag grip displayed in toolbars.  This size varies with a bar manager’s style.

If a particular toolbar cannot be moved, it does not display a drag grip.  If a drag grip is not shown, it has no effect on the BeforeFingersSize method’s return value.

The following image displays the indent before a toolbar’s drag grip.


TdxBarScreenTipBandTextAlign
TdxBarScreenTipBandTextAlign type

See Also

Enumerates available horizontal alignment options for the ScreenTip’s descriptive text.

Unit

dxBar

type

  TdxBarScreenTipBandTextAlign = (stbtaLeft, stbtaRight);

Description

Values include:

Value	Meaning
stbtaLeft	The descriptive text is aligned to the left of the ScreenTip window
stbtaRight	The descriptive text is aligned to the right of the ScreenTip window


TdxScreenTipRepositoryFonts
TdxScreenTipRepositoryFonts type

See Also

Unit

dxBar

type

  TdxBarScreenTipBandType = (stbHeader, stbDescription, stbFooter);

TdxScreenTipRepositoryFonts = set of TdxBarScreenTipBandType;

Description

Values include:

Value	Meaning
stbHeader	The header section of the ScreenTip window
stbDescription	The description section of the ScreenTip window
stbFooter	The footer section of the ScreenTip window


TdxBarManager
 TdxBarManager Object

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


TdxBarManager Properties

TdxBarManager               Legend

In TdxBarManager

AllowCallFromAnotherForm

AllowReset

AlwaysMerge

AlwaysSaveText

AutoAlignBars

AutoDockColor

AutoHideEmptyBars

Backgrounds

BarControlFocused

Bars

BarsLoading

ButtonArrowWidth

ButtonHeight

ButtonWidth

CanCustomize

Categories

CategoryItemsVisible

CategoryVisible

DefaultPainter

Designing

DisabledImages

DisabledLargeImages

DockColor

DockControlCount

DockControls

Dragging

DraggingItem

DraggingItemLink

FlatCloseButton

FocusedBarControl

Font

GlyphSize

GroupCount

Groups

HelpButtonGlyph

HelpContext

HideFloatingBarsWhenInactive

HotImages

ImageOptions

Images

ImageListBkColor

IniFileName

IsCustomizing

IsMDIMaximized

ItemCount

Items

LargeButtonArrowWidth

LargeIcons

LargeImages

LockUpdate

LookAndFeel

MainForm

MainMenuBar

MainMenuControl

MakeDisabledImagesFaded

MasterForm

MenuAnimations

MenusShowRecentItemsFirst

Modified

MostRecentItemsPercents

NotDocking

Owner

PainterClass

ParentBarManager

ParentForm

PopupMenuLinks

RealButtonArrowWidth

RegistryPath

Scaled

SelectedItem

ShowCloseButton

ShowFullMenusAfterDelay

ShowHelpButton

ShowHint

ShowHintForDisabledItems

ShowShortCutInHint

StoreInIniFile

StoreInRegistry

StretchGlyphs

Style

SubMenuBeginGroupIndent

SunkenBorder

UseF10ForMenu

UseFullReset

UseLargeImagesForLargeIcons

UseSystemFont

WaitForDockingTime


TdxBarManager Methods

TdxBarManager               Legend

In TdxBarManager

AddButton

AddItem

AddSubItem

AddToolBar

BarByCaption

BarByComponentName

BarByName

BarByOldName

BeginUpdate

CanShowRecentItems

Create

CreateGroup

Customizing

DeleteToolBar

Destroy

DoBarAfterReset

DoBarBeforeReset

DoBarClose

DoBarDockingStyleChanged

DoClickItem

DoCloseButtonClick

DoDocking

DoHelpButtonClick

DoShowCustomizingPopup

DoShowToolbarsPopup

EndUpdate

ExchangeItems

GetAllItemsByCategory

GetCountByCategory

GetItemByCategory

GetItemByName

GetItemsByCategory

GetPaintStyle

GetRealPaintStyle

GetUniqueItemName

GetUniqueToolbarCaption

GetUniqueToolbarName

HideAll

LoadFromIniFile

LoadFromRegistry

LoadFromStream

Merge

MoveItem

RenameToolBar

ResetToolBar

ResetUsageData

ResetUsageDataWithConfirmation

SaveToIniFile

SaveToRegistry

SaveToStream

Unmerge


TdxBarManager Events

TdxBarManager               Legend

In TdxBarManager

OnBarAdd

OnBarAfterReset

OnBarBeforeReset

OnBarClose

OnBarDelete

OnBarDockingStyleChange

OnBarVisibleChange

OnClickItem

OnCloseButtonClick

OnDocking

OnHelpButtonClick

OnHideCustomizingForm

OnItemLinkAdd

OnItemLinkChange

OnItemLinkDelete

OnMenuMerge

OnMerge

OnMergeItemLink

OnShowCustomizingForm

OnShowCustomizingPopup

OnShowToolbarsPopup


TdxBarManager.AllowReset

TdxBarManager          See Also

Specifies whether an end-user can restore a selected toolbar.

property AllowReset: Boolean;

Description

When a bar manager’s Customization Form is displayed at runtime toolbars can be modified.  By default an end-user can restore the original settings of the selected toolbar by clicking the Reset button on the Customization Form.  This can be prevented if required by setting the AllowReset property to False.  In this instance the Reset button is hidden.

In the following picture the Customization Form with the Reset button is displayed.

The default settings of a toolbar can be restored by clicking the Reset Toolbar button in the toolbar’s Quick Customization popup menu or the Reset button on the Customization Form.  Use the bar’s AllowReset property to prohibit or allow restoring.

If the AllowReset property is set to False a toolbar can be restored via the ResetToolbar method.

The default value of the AllowReset property is True.


TdxBarManager.AutoDockColor

TdxBarManager

Specifies whether a dock control has the color of the parent form’s background.

property AutoDockColor: Boolean;

Description

The color of a dock control is specified by the DockColor property.  The value of this property depends upon the value of the AutoDockColor property.  If the value of the AutoDockColor property is True the DockColor property is set to the background color of the parent form.  In the case of False the DockColor property is set to its previously assigned (or default) value.  The AutoDockColor property is set to False when changing the value of the DockColor property.

The default value of the AutoDockColor property is True.


TdxBarManager.AutoAlignBars

TdxBarManager          See Also

Specifies whether toolbars within the same row are automatically aligned to each other, ensuring no gaps between them.

property AutoAlignBars: Boolean;

Description

Set this property to True to eliminate gaps that appear between toolbars within the same row when removing item controls or hiding intermediate toolbars.  Setting the AutoAlignBars property to False reverts the toolbar layout back, as shown in the following table.

Value	Sample
True
False

The default value of the AutoAlignBars property is False.


TdxBarManager.DefaultPainter

TdxBarManager

Provides access to the default library of drawing primitives used to paint toolbar controls and dock controls on a graphic surface.

property DefaultPainter: TdxBarPainter;

Description

The default library is determined by the GetRealPaintStyle function return value.

The class that corresponds to the default library can be accessed via the PainterClass property.

ReadOnly Property


TdxBarManager.DockColor

TdxBarManager

Specifies the color of dock controls within the current bar manager.

property DockColor: TColor;

Description

Use the DockColor property to specify the color of dock controls within the current bar manager.  In the following picture a dock control is displayed with the clMoneyGreen color.

If the AutoDockColor property is set to True, the background color of the parent form is assigned to the DockColor property.

The default value of the DockColor property is clBtnFace.

Note:	The Office 11 and Widows XP bar manager's styles show the dock control with their specific color.


TdxBarManager.ResetUsageData

TdxBarManager          See Also

Restores the default set of visible item controls to menus and toolbars.

procedure ResetUsageData;

Description

The ResetUsageData method is called when an end-user clicks the Reset My Usage Data button on the Customization Form and then clicks the Yes button on the dialog box with a request message.  This method deletes a record of the commands that have been 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

Displays a dialog box with a request message and in case of a positive answer restores the default data.

procedure ResetUsageDataWithConfirmation;

Description

The ResetUsageDataWithConfirmation method is called when an end-user clicks the Reset My Usage Data button on the Customization Form.  This method displays a generic dialog box with a request message.  In the case of a positive answer the ResetUsageData method is called to undo user customizations.


TdxBarManager.ImageListBkColor

TdxBarManager

This property is obsolete, use the ImageOptions.ImageListBkColor property instead.

property ImageListBkColor: TColor;


TdxBarManager.MenusShowRecentItemsFirst

TdxBarManager          See Also

Determines whether the most recently used items are placed in menus above all others.

property MenusShowRecentItemsFirst: Boolean;

Description

The items in a menu can be displayed in order of creation or according to when they were last used.  If the MenusShowRecentItemsFirst property is set to True (by default), the most recently used items are displayed higher in the menu.  The remaining menu items are suppressed and not displayed.  If the MenusShowRecentItemsFirst property is set to False, all the menu items are displayed in order of creation.

The most recently used items are determined by the MostRecentItemsPercents property, which specifies the border between the most recently used items, which are placed at the menu’s top, and the remaining items, which are hidden.  The hidden items can be automatically displayed in a menu after a delay if the ShowFullMenusAfterDelay property is set to True.

Note:	The MenusShowRecentItemsFirst property is in effect only if the value of the Style property is bmsEnhanced or bmsFlat.

The value of the MenusShowRecentItemsFirst property can be changed when an application is running in the Options page of the toolbar’s Customization Form, via code or at design time.

The default value of the MenusShowRecentItemsFirst property is True.


TdxBarManager.MostRecentItemsPercents

TdxBarManager          See Also

Specifies the border (in percentage) between the most recently used and the remaining menu item controls.

property MostRecentItemsPercents: Byte;

Description

When running an application the number of press events that occur on each of a menu’s items (in percentage) is recorded.  The items which have received more presses than the value of the MostRecentItemsPercents property are added to the list of recently used items and moved to the top of the menu.  The remaining items are hidden.

Note:	For the most recently used items to be displayed at the top of a menu the MenusShowRecentItemsFirst property must be set to True.

The hidden items can be automatically displayed in a menu after a delay if the ShowFullMenusAfterDelay property is set to True.

The default value of the MostRecentItemsPercents property is 95.


TdxBarManager.ShowFullMenusAfterDelay

TdxBarManager          See Also

Determines whether hidden items, which have not been used recently, are automatically displayed in a menu after a delay.

property ShowFullMenusAfterDelay: Boolean;

Description

If the MenusShowRecentItemsFirst property is set to True, the most recently used item controls are placed at the top of the menu and the remaining items are hidden.  If the ShowFullMenusAfterDelay property is set to True (by default), the hidden items are automatically displayed after a menu has been active for 4000 milliseconds.  Otherwise, the menu expands only after its bottom-most button has been clicked or the Ctrl + Down Arrow key combination pressed.

The most recently used items are determined by the MostRecentItemsPercents property.

The value of the ShowFullMenusAfterDelay property can be changed when an application is running in the Options page of the toolbar’s Customization Form, via code or the Object Inspector.

The default value of the ShowFullMenusAfterDelay property is True.


TdxBarManager.ShowHelpButton

TdxBarManager          Example

Specifies whether the Help button is displayed on the Customization Form.

property ShowHelpButton: Boolean;

Description

By default the Help button is invisible on the Customization Form.  Set the ShowHelpButton property to True for the Help button to be displayed in the left-bottom corner of the toolbar’s Customization Form.  Specify the HelpContext property which associates a control with a help topic.

Use the HelpButtonGlyph property to specify a bitmap which will appear on the Help button.

The OnHelpButtonClick event is fired when an end-user clicks the Help button.


TdxBarManager.HelpButtonGlyph

TdxBarManager          See Also

Specifies a bitmap which appears on the Help button in the Customization Form.

property HelpButtonGlyph: TBitmap;

Description

By default the Help button is displayed without an image on the Customization Form.  Assign a bitmap to the HelpButtonGlyph property to specify an image.

The Help button's visibility is specified by the ShowHelpButton property.  Specify a value for the HelpContext property to associate a control with a help topic.


TdxBarManager.HelpContext

TdxBarManager          See Also

Specifies the numeric ID of a context-sensitive help topic for the Help button.

property HelpContext: THelpContext;

Description

To associate a help topic with the Help button, which is displayed on a toolbar’s Customization Form, set the HelpContext property to a context ID that identifies the application’s help topic.

An ID of 0 (default) means that no help topic is provided for the Help button.

The Help button's visibility is specified by the ShowHelpButton property.


TdxBarManager.OnHelpButtonClick

TdxBarManager          See Also          Example

Occurs when clicking the Help button on the current bar manager’s Customization Form.

type

  TNotifyEvent = procedure (Sender: TObject) of object;

property OnHelpButtonClick: TNotifyEvent;

Description

Handle the OnHelpButtonClick event to perform specific actions when the Help button on the Customization Form is clicked.  The Sender parameter specifies the current bar manager.

The OnHelpButtonClick event is fired by the DoHelpButtonClick method.

Please refer to the How to Implement Help for the Customization Form topic which demonstrates how to invoke custom help documentation for the Customization Form.


TdxBarManager.UseF10ForMenu

TdxBarManager

Specifies whether the current bar manager responds to the F10 key press event.

property UseF10ForMenu: Boolean;

Description

By default, when an application is running, an end user can focus the main menu by pressing the F10 key.  To disable this functionality set the UseF10ForMenu property to False.

The default value of the UseF10ForMenu property is True.


TdxBarManager.OnShowCustomizingPopup

TdxBarManager

Occurs before a customizing popup menu is displayed.

type

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

property OnShowCustomizingPopup: TdxBarShowPopupEvent;

Description

By right-clicking a toolbar’s item an end-user can invoke a customizing popup menu at design time.  To implement it at runtime the Customization Form must be opened.  The OnShowCustomizingPopup event is fired after the popup menu’s ItemLinks collection has been populated with item links when creating a customizing popup menu.  The PopupItemLinks parameter specifies this populated collection.

Handle the OnShowCustomizingPopup event to perform specific actions before displaying the customizing popup menu of a toolbar that belongs to the bar manager specified by the Sender parameter.  This event is fired by the DoShowCustomizingPopup method.


TdxBarManager.OnBarClose

TdxBarManager          See Also

Occurs when closing a floating toolbar.

type

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

property OnBarClose: TdxBarEvent;

Description

Handle the OnBarClose event to perform specific actions when clicking the Close button on a floating toolbar specified by the ABar parameter.  The Sender parameter specifies the bar manager to which the toolbar belongs.

This event is fired by the DoBarClose method.

If a floating toolbar represents a main menu handle the OnCloseButtonClick event instead.


TdxBarManager.Modified

TdxBarManager          See Also

Determines whether a user has made changes to the layout of the current bar manager’s toolbars and item controls.

property Modified: Boolean;

Description

The Modified property determines whether the current bar manager’s toolbars and item controls have been modified.  If this property returns True, some changes have been made since the last modification.  Otherwise, its value is False.

Use this property, for instance, to save the current bar manager’s settings when its value is True.  For this purpose call the SaveToIniFile, SaveToRegistry or SaveToStream methods.


TdxBarManager.AllowCallFromAnotherForm

TdxBarManager

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

property AllowCallFromAnotherForm: Boolean;

Description

The AllowCallFromAnotherForm property specifies whether items of the main application form can be activated when another form of the same application has focus.  If the value of the property is set to True, the current bar manager of the main form tracks shortcut press events in different forms of the current application.

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

•	the form is a MDI child form and incorporates either a main menu or a bar manager

or

•	the form is neither a MDI Parent nor a 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.

The default value of the AllowCallFromAnotherForm property is False.


TdxBarManager.AlwaysSaveText

TdxBarManager

Determines whether the text that has been typed in an editor is saved when it loses focus.

property AlwaysSaveText: Boolean;

Description

The ExpressBars Suite allows you to display editor controls within its bars – controls derived from the TdxBarWindowItem class.  For instance, these are the TdxBarEdit and TdxBarCombo controls.  By default, if text is entered in these editors you will then have to press the ENTER key or SHIFT+TAB (or the TAB key if a toolbar contains other controls that can accept focus) to save the text.  Otherwise all changes are lost when the editor loses focus.  This behavior can be changed by setting the AlwaysSaveText property to True.  In this instance, the entered text is saved automatically without the need to press any additional keys.

The default value of the AlwaysSaveText property is False.


TdxBarManager.CreateToolbarsPopupList

TdxBarManager

Populates a collection with items that represent toolbars.

procedure CreateToolbarsPopupList(ItemLinks: TdxBarItemLinks);

Description

By right-clicking a toolbar an end-user can invoke a popup menu that lists all the toolbars whose Hidden property is set to False.  The popup menu contains the items each of which represent a caption of the corresponding toolbar and a check that specifies the toolbar’s visibility state.

When activating the toolbar’s popup menu the CreateToolbarsPopupList method is called.  This method adds the toolbars from the Bars collection to the popup menu by populating the popup menu’s ItemLinks collection passed as the ItemLinks parameter with popup menu items.

The CreateToolbarsPopupList method calls the DoShowToolbarsPopup method that generates the OnShowToolbarsPopup event.  Handle this event to customize the toolbars list.


TdxBarManager.DoBarAfterReset

TdxBarManager            See Also

Fires the OnBarAfterReset event.

procedure DoBarAfterReset(ABar: TdxBar); dynamic;

Description

The DoBarAfterReset method is called after resetting a toolbar specified by the ABar parameter.  The DoBarAfterReset method fires the OnBarAfterReset event.

Override the DoBarAfterReset method to implement specific actions after the default settings of a particular toolbar have been restored.

To implement specific actions before restoring the default settings of a particular toolbar call the DoBarBeforeReset method.


TdxBarManager.DoBarBeforeReset

TdxBarManager            See Also

Fires the OnBarBeforeReset event.

procedure DoBarBeforeReset(ABar: TdxBar); dynamic;

Description

The DoBarBeforeReset method is called before resetting a toolbar specified by the ABar parameter.  The DoBarBeforeReset method fires the OnBarBeforeReset event.

Override the DoBarBeforeReset method to implement specific actions before restoring the default settings of a particular toolbar.

To implement specific actions after restoring the default settings of a particular toolbar call the DoBarAfterReset method.


TdxBarManager.DoBarClose

TdxBarManager

Fires the OnBarClose event.

procedure DoBarClose(ABar: TdxBar); dynamic;

Description

The DoBarClose method is called when clicking the Close button on a floating toolbar specified by the ABar parameter.  This method fires the OnBarClose event.

You can override the DoBarClose method to perform specific actions when closing a floating toolbar.

If a floating toolbar represents a main menu please refer to the DoCloseButtonClick method.


TdxBarManager.DoBarDockingStyleChanged

TdxBarManager            See Also

Fires the OnBarDockingStyleChange event.

procedure DoBarDockingStyleChanged(ABar: TdxBar); dynamic;

Description

The DoBarDockingStyleChanged method is called when changing the docking style.  This method fires the OnBarDockingStyleChange event.

Override the DoBarDockingStyleChanged method to perform specific actions when changing a toolbar’s docking style.


TdxBarManager.DoHelpButtonClick

TdxBarManager          See Also

Fires the OnHelpButtonClick event.

procedure DoHelpButtonClick; dynamic;

Description

The DoHelpButtonClick method is called when clicking the Help button on the Customization Form.  This method fires the OnHelpButtonClick event.

Override the DoHelpButtonClick method to implement specific actions when clicking the Help button.

Please refer to the How to Implement Help for the Customization Form topic which demonstrates how to include custom help for the Customization Form.


TdxBarManager.DoShowCustomizingPopup

TdxBarManager

Fires the OnShowCustomizingPopup event.

procedure DoShowCustomizingPopup(PopupItemLinks: TdxBarItemLinks); dynamic;

Description

By right-clicking a toolbar’s item an end-user can invoke a customizing popup menu at design time.  To implement it at runtime the Customization Form must be opened.  The DoShowCustomizingPopup method is called after populating the popup menu’s ItemLinks collection with item links when creating a customizing popup menu.  The PopupItemLinks parameter specifies this populated collection.  The DoShowCustomizingPopup method fires the OnShowCustomizingPopup event.

Override the DoShowCustomizingPopup method to perform specific actions before a customizing popup menu is displayed.  For instance, specific items of the popup menu can be added, deleted or modified.


TdxBarManager.DoShowToolbarsPopup

TdxBarManager

Fires the OnShowToolbarsPopup event.

procedure DoShowToolbarsPopup(PopupItemLinks: TdxBarItemLinks); dynamic;

Description

By right-clicking a toolbar an end-user can invoke a popup menu that lists all the toolbars whose Hidden property is set to False.  The DoShowToolbarsPopup method is called when creating the toolbar's popup menu after populating the popup menu’s ItemLinks collection with the item links that represent toolbars.  The PopupItemLinks parameter specifies this collection.  The DoShowToolbarsPopup method fires the OnShowToolbarsPopup event.

Override the DoShowToolbarsPopup method to implement specific actions before the toolbar’s popup menu is displayed.  For instance, specific toolbars of the popup menu can be added or deleted.


TdxBarManager.OnBarAfterReset

TdxBarManager          See Also

Occurs after the default settings of a specific toolbar have been restored.

type

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

property OnBarAfterReset: TdxBarEvent;

Description

Handle the OnBarAfterReset event to perform specific actions after the toolbar specified by the ABar parameter has been reset (its default settings restored).  The Sender parameter specifies the bar manager to which the toolbar belongs.

This event is fired by the DoBarAfterReset method.

To perform specific actions before the default settings of a specific toolbar are restored handle the OnBarBeforeReset event.


TdxBarManager.OnBarBeforeReset

TdxBarManager          See Also

Occurs before the default settings of a specific toolbar are restored.

type

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

property OnBarBeforeReset: TdxBarEvent;

Description

Handle the OnBarBeforeReset event to perform specific actions before the toolbar specified by the ABar parameter is reset (its default settings restored).  The Sender parameter specifies the bar manager to which the toolbar belongs.

This event is fired by the DoBarBeforeReset method.

To perform specific actions after the default data of a specific toolbar has been restored handle the OnBarAfterReset event.


TdxBarManager.PopupMenuLinks

TdxBarManager

Specifies a collection of linked controls and toolbar popup menus.

property PopupMenuLinks: TdxBarPopupMenuLinks;

Description

Any control on a form, which is the descendant of the TWinControl class, can be associated with a toolbar popup menu (the dxBarPopupMenu component). This popup menu is activated when an end-user right-clicks a control or presses the Application key ( [image]) or Shift+F10 (the control must be focused).  The PopupMenuLinks property specifies the collection of items which represent links between toolbar popup menus and controls.  To add, delete and access a particular item within the PopupMenuLinks collection use the Add, Delete methods and the Items property respectively, or use the "Editing …" dialog at design time.  To specify the control and the toolbar popup menu of a particular item, use the Control and PopupMenu properties of the collection’s items.

To learn how to create a toolbar popup menu at runtime refer to the How to Create a Popup Menu at Runtime topic.

If the parent form contains a standard TMainMenu or TPopupMenu menu, use the TdxBarConverter component to convert it to ExpressBars menus.  Refer to the How to Convert Standard Menus to ExpressBars Menus topic for details.


TdxBarManager.UseFullReset

TdxBarManager          See Also

Specifies which settings are restored when a toolbar is reset.

property UseFullReset: Boolean;

Description

At runtime a toolbar can be restored after it has been modified.  An end-user can use the Reset button on the Customization Form or in the toolbar’s Quick popup menu to do so.  To restore the toolbar’s settings via code, the bar manager’s ResetToolbar or the toolbar’s Reset method can be used.  By default only the settings concerned with the toolbar's item links will be restored.  To restore the settings of the toolbar itself such as its size, position, docking style, state, etc., set the UseFullReset property to True.

The default value of the UseFullReset property is False.


TdxBarManager.CategoryItemsVisible

TdxBarManager            See Also          Example 1          Example 2

Specifies whether the items of a particular category are visible.

type

  TdxBarItemVisible = (ivNever, ivInCustomizing, ivAlways);

property CategoryItemsVisible [AIndex: Integer]: TdxBarItemVisible;

Description

Use the CategoryItemsVisible property to specify the Visible property of the items which belong to a particular category.  The AIndex parameter identifies the category within the bar manager’s Categories zero-based indexed collection.

There are three possible values for the CategoryItemsVisible property.  They represent three types of item visibility at runtime.

Value	Meaning
ivAlways	Items are visible on toolbars and listed in the Customization Form.
ivNever	Items are not visible both on toolbars and the Customization Form.
ivInCustomizing	Items are visible on toolbars and listed in the Customization Form when customizing.

If the category does not exist, this property returns ivNever.

Refer to the Customization Form - Category Modify topic to find out how to specify the CategoryItemsVisible property at design time.

Note:	At design time all the items are visible and displayed in the Customization Form.


TdxBarManager.CategoryVisible

TdxBarManager            See Also

Specifies whether a particular category is visible.

property CategoryVisible[AIndex: Integer]: Boolean;

Description

A category is contained in the bar manager’s Categories zero-based indexed collection.  An end-user can access a category through the bar manager’s Customization Form.  Use the CategoryVisible property to specify whether the category defined by the AIndex parameter is visible in the Customization Form at runtime.  If the value of this property is True, the category is visible in the list of categories in the Customization Form and can be modified.

If the category does not exist, this property returns False.

Refer to the Customization Form - Category Modify topic to find out how to specify the CategoryVisible property at design time.

At design time all the categories are always visible in the Customization Form.


TdxBarManager.Designing

TdxBarManager            See Also

Indicates whether the bar manager is in design mode.

property Designing: Boolean;

Description

The Designing property is set to True, when the current bar manager is in design-time mode.  If this property is set to False, the bar manager is in runtime mode.

ReadOnly Property


TdxBarManager.DockControlCount

TdxBarManager

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

property DockControlCount: Integer;

Description

Use the DockControlCount property to get the total number of dock controls within the bar manager’s zero-based collection of dock controls.

To access a particular dock control use the bar manager’s DockControls property.

ReadOnly Property


TdxBarManager.DockControls

TdxBarManager

Returns a particular dock control in a bar manager’s collection of dock controls.

property DockControls[Index: Integer]: TdxDockControl;

Description

Use the DockControls property to access a particular dock control in the current bar manager’s zero-based collection of dock controls.  The Index parameter specifies the dock control to be accessed.

To get a count of the dock controls within a collection of dock controls use the DockControlCount property.

ReadOnly Property


TdxBarManager.GroupCount

TdxBarManager          See Also

Returns a count of the groups that belong to the current bar manager.

property GroupCount: Integer;

Description

Use the GroupCount property to get the total number of groups within the bar manager’s zero-based collection of groups.

To access a particular group use the bar manager’s Groups property.

ReadOnly Property


TdxBarManager.Groups

TdxBarManager

Provides access to the item group collection.

property Groups[Index: Integer]: TdxBarGroup;

Description

Use this property to access a particular group in the bar manager’s item group collection by its Index.

To get a count of item groups within this collection, use the GroupCount property.  To create a group, call the bar manager’s CreateGroup function.  Use a group’s Free method to remove it from the collection.

To add a group to a collection and to access or change the information about an individual group, use the methods and properties of the TdxBarGroup class.  For instance, use the Items property to access the items that belong to a group.

Refer to the Customization Form - Groups Page topic for details on creating groups at design time.

ReadOnly Property


TdxBarManager.IsCustomizing

TdxBarManager          See Also

Indicates if the current bar manager is being customized.

property IsCustomizing: Boolean;

Description

Use the IsCustomizing property to determine whether the current bar manager is being customized.  The value of this property is True, when the bar manager is being designed (at design time) or when the toolbar’s Customization Form is opened (at runtime).  Otherwise, its value is False.

To open or close the toolbar’s Customization Form at runtime in code, use the Customizing method.

ReadOnly Property


TdxBarManager.IsMDIMaximized

TdxBarManager

Returns True when the currently active MDI child window is maximized.

property IsMDIMaximized: Boolean;

ReadOnly Property


TdxBarManager.ItemCount

TdxBarManager            Example 1          Example 2

Returns a count of the items which belong to the current bar manager.

property ItemCount: Integer;

Description

Use the ItemCount property to get the total number of items within the bar manager’s zero-based collection of items.

To access a particular item use the bar manager’s Items property.

Call the GetCountByCategory, GetAllItemsByCategory and GetItemsByCategory methods to get a count of the items in a particular category.

ReadOnly Property


TdxBarManager.Items

TdxBarManager            Example

Returns a particular item in a bar manager’s collection of items.

property Items[Index: Integer]: TdxBarItem;

Description

When a user adds an item to a toolbar the item is added to the bar manager’s zero-based collection of items.  Use the Items property to access a particular item in the current bar manager’s collection of items.  The Index parameter specifies the item to be accessed.

To get a count of the items within a collection of items use the ItemCount property.

Call the GetItemByCategory, GetAllItemsByCategory and GetItemsByCategory methods to access a bar manager’s items by the category they belong to.  Use the GetItemByName method to access a bar item by its name.

ReadOnly Property


TdxBarManager.LockUpdate

TdxBarManager         See Also          Example

Enables or disables updating of the current bar manager.

property LockUpdate: Boolean;

Description

This property is obsolete and used for compatibility purposes.  To enclose the code that updates the bar manager, use its BeginUpdate/EndUpdate methods instead.

Note:	Setting the LockUpdate property to False is equivalent to passing False to the EndUpdate method.


TdxBarManager.MainForm

TdxBarManager              Example

Specifies the parent form of the current bar manager.

property MainForm: TCustomForm;

Description

In the Express Bars Suite v6 a bar manager can be placed on any window which is a descendant of the TCustomForm class (form, frame or dialog).  To access the parent window, use the ParentForm property.  The MainForm property, which is now obsolete, also provides access to the parent form.

If the parent window is a child window for another window which is also a child window and so on, use the MasterForm property to determine the current bar manager’s root parent window.

Note:	Only a single bar manager can belong to a window.

To specify the owner of the current bar manager use the Owner property.

ReadOnly Property


TdxBarManager.MainMenuControl

TdxBarManager

Returns the current bar manager’s toolbar control that represents a main menu.

property MainMenuControl: TdxBarControl;

Description

A window with a bar manager can contain only a single toolbar control that represents a main menu.  To access the main menu control, use the MainMenuControl property.

To access a toolbar that represents a main menu, use the MainMenuBar property. To specify whether a particular toolbar is a main menu, use its IsMainMenu property.

ReadOnly Property


TdxBarManager.MainMenuBar

TdxBarManager

Returns the current bar manager’s toolbar that represents a main menu.

property MainMenuBar: TdxBar;

Description

A window with a bar manager can contain only a single toolbar that represents a main menu.  To access the main menu, use the MainMenuBar property.

To specify whether a particular toolbar is a main menu, use the toolbar’s IsMainMenu property.

To access a main menu control, use the MainMenuControl property.

ReadOnly Property


TdxBarManager.MakeDisabledImagesFaded

TdxBarManager

This property is obsolete, use the ImageOptions.MakeDisabledImagesFaded properety instead.

property MakeDisabledImagesFaded: Boolean;


TdxBarManager.SelectedItem

TdxBarManager

Specifies the selected toolbar item control.

property SelectedItem: TdxBarItemControl;

Description

Use the SelectedItem property to access the currently selected item control or to change it in code.  A toolbar can contain several item controls that correspond to an item.  If an item control is selected, its item is selected as well.


TdxBarManager.AlwaysMerge

TdxBarManager          See Also          Concepts

Specifies when a merge mechanism for toolbars and menus of parent and child MDI windows is enabled.

property AlwaysMerge: Boolean;

Description

If this property is set to False, merging only occurs when a child MDI window is maximized.  Otherwise, merging occurs on any transition of a child MDI window’s state.

To manually provide the merging logic, handle the OnMerge and OnMenuMerge events.  The ExpressBars Suite automatically merges main menus provided that the OnMenuMerge event is not handled.

Note:	The AlwaysMerge property is in effect only for a bar manager in a parent form.

You can handle the OnMergeItemLink event to specify how item links are merged on bars and menus.


TdxBarManager.AutoHideEmptyBars

TdxBarManager            Example

Specifies whether the current bar manager’s toolbars with invisible items are visible.

property AutoHideEmptyBars: Boolean;

Description

Using the Modify button on the Customization Form at design time an end-user can change the visibility state of all the items of a particular category.  If the visibility state of all the items of a toolbar is set to ivNever, the toolbar can be displayed as empty or not depending upon the value of the AutoHideEmptyBars property.  Assign True to this property at design time for the empty toolbars to be invisible at runtime.  Otherwise the toolbars are displayed empty.

Note:	Toggling the value of the AutoHideEmptyBars property in code, doesn’t hide empty toolbars.  To do this, set this property to True, and change the visibility state of a category’s items via the CategoryItemsVisible property.

Refer to the Customization Form - Category Modify topic to find out how to specify the CategoryItemsVisible property at design time.


TdxBarManager.Backgrounds

TdxBarManager            See Also

Specifies the background bitmaps used by the current bar manager’s toolbars and sub menus.

property Backgrounds: TdxBarBackgrounds;

Description

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

In the following picture a floating toolbar with a background image is displayed.


TdxBarManager.Bars

TdxBarManager            Example 1          Example 2

Provides access to a collection of the current bar manager’s toolbars.

property Bars: TdxBars;

Description

The Bars property provides indexed access to the current bar manager’s collection of toolbars.

Use the methods and properties of the TdxBars class to add a toolbar to a collection and to access/change the information about the position and configuration of an individual toolbar.  For instance, use the Count property to determine the total number of toolbars within a collection.  A particular toolbar is specified by the Items property.

ReadOnly Property


TdxBarManager.CanCustomize

TdxBarManager

Specifies whether the current bar manager’s toolbars can be customized at runtime.

property CanCustomize: Boolean;

Description

When an application is running, a toolbar can be customized via the Customization Form, which can be invoked with the help of a toolbar’s popup menu or when double-clicking over a dock control.  To prevent such a possibility set the CanCustomize property to False.

The default value of the CanCustomize property is True.


TdxBarManager.Categories

TdxBarManager          See Also          Example

Provides access to the bar manager's categories.

property Categories: TStrings;

Description

Refer to the description of the TStrings class to learn how to manage contents of this property.

Note:	When removing a category all its items are also removed.


TdxBarManager.Font

TdxBarManager            See Also

Specifies the font of the current bar manager’s items, toolbars, popup menus, hints and the Customization Form.

property Font: TFont;

Description

Font color and charset cannot be changed using this property.

Font size and height cannot be changed if the Scaled property is set to True.  In this instance, the system menu font size and height are applied.  Some of the font settings can be applied to individual toolbars (via a toolbar’s Font property), and items (via an item’s Style property).

If a toolbar’s UseOwnFont property or the UseOwnFont property of the toolbar’s popup menu is set to True, the bar manager’s font settings cannot be applied to the corresponding toolbar or popup menu.

The default font is set for the bar manager via the UseSystemFont property.  By default, its value is True.  If the Font property is modified, the UseSystemFont property is set to False.


TdxBarManager.LargeIcons

TdxBarManager

This property is obsolete, use the ImageOptions.LargeIcons property instead.

property LargeIcons: Boolean;


TdxBarManager.MenuAnimations

TdxBarManager

Specifies menu animation effects.

type

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

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

Specifies restrictions on docking toolbars.

type

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

  TdxBarDockingStyles = set of TdxBarDockingStyle;

property NotDocking: TdxBarDockingStyles;

Description

A toolbar can be docked to any side of the parent form or float.  If the value of the NotDocking property is not an empty set, end-users won’t be able to dock toolbars to the form’s edges included in this set.  If the dsNone value is included in the set, the toolbars will not be able to be float.

The default value of the NotDocking property is an empty set.

To prohibit a docking style for one toolbar, use the toolbar’s NotDocking property.


TdxBarManager.RegistryPath

TdxBarManager

Specifies the registry path where the current bar manager’s settings can be stored.

property RegistryPath: string;

Description

The registry key specified by the RegistryPath property is used to store the current bar manager’s settings, 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.

Refer to the description of the StoreInRegistry property for detailed information on storing a bar manager’s settings.


TdxBarManager.ShowCloseButton

TdxBarManager            See Also

Specifies whether the Close button is displayed on the current bar manager’s main menu.

property ShowCloseButton: Boolean;

Description

By default a toolbar that represents a main menu doesn't have a Close button.  Set the ShowCloseButton property to True to include the Close button.  The OnCloseButtonClick event is fired when an end-user clicks this button.  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 a help Hint is displayed when the mouse pointer hovers over the current bar manager’s items.

property ShowHint: Boolean;

Description

When the mouse pointer hovers over a toolbar’s item, the default hint of this item is shown.  Set the ShowHint property to False to prevent the default hint from being displayed.

The hint text of an item is specified by the item’s Hint property.  To include the item control’s shortcut into the hint text use the ShowShortCutInHint property.

Refer to the ShowHintForDisabledItems property for details on hints for disabled items.

The default value of the ShowHint property is True.


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.

The hint text of an item is specified by its Hint property.  To include the item control’s shortcut in the hint's text, use the ShowShortCutInHint property.

The default value of the ShowHintForDisabledItems property is True.


TdxBarManager.ShowShortCutInHint

TdxBarManager            See Also

Determines if an item control's shortcut is displayed along with its hint.

property ShowShortCutInHint: Boolean;

Description

If the ShowShortCutInHint property is set to True, the shortcuts of the current bar manager’s items are displayed along with its hints.  Otherwise, the shortcut is not shown unless the application’s HintShortCuts property is set to True (the default value) since the HintShortCuts property controls the overall appearance of the shortcut within the application’s pop-up hints and thus takes priority.

The hint text of an item is specified by its Hint property.

Note:	An item’s shortcut will be shown if the bar manager’s ShowHint property is set to True.

The default value of the ShowShortCutInHint property is False.


TdxBarManager.Style

TdxBarManager

Specifies bar paint style.

type

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

property Style: TdxBarManagerStyle;

Description

Values include:

Value	Example
bmsStandard
bmsEnhanced
bmsFlat
bmsOffice11
bmsXP
bmsUseLookAndFeel	The applied paint style is specified by the LookAndFeel property of the bar manager or TcxLookAndFeelController component (if active).  Using this component allows you to maintain the same look and feel settings across all controls on your form(s). 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, • lfOffice11 – bmsOffice11, • 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.UseLargeImagesForLargeIcons

TdxBarManager

This property is obsolete, use the ImageOptions.UseLargeImagesForLargeIcons property instead.

property UseLargeImagesForLargeIcons: Boolean;


TdxBarManager.UseSystemFont

TdxBarManager            See Also

Specifies the font used by the current bar manager 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 instance.


TdxBarManager.ButtonArrowWidth

TdxBarManager          See Also

Specifies the width of dropdown buttons which belong to the current bar manager’s buttons in pixels.

property ButtonArrowWidth: Integer;

Description

A user can change the default style of a button via the ButtonStyle property.  If the bsDropDown or bsCheckedDropDown value is set to this property, a dropdown button is drawn on the right of the button.  Use the ButtonArrowWidth property to get or set the width of the dropdown buttons which belong to the buttons of the TdxBarButton type.

In the following table a dropdown button with different values for the ButtonArrowWidth property is displayed.

Value	Image
10
20

If the current bar manager’s buttons are enlarged (the LargeIcons property is set to True), the value of ButtonArrowWidth property is doubled.

When painting, the width of dropdown buttons can be increased or decreased depending upon the bar manager’s style.  Get the actual width of dropdown buttons using the RealButtonArrowWidth property.

Note:	The assigned value must be more than 2.

The default value of the ButtonArrowWidth property is specified by the dxBarDefaultButtonArrowWidth constant.  This constant is equal to 11.


TdxBarManager.FlatCloseButton

TdxBarManager

Specifies the border style of the Close button on the current bar manager’s main menu.

property FlatCloseButton: Boolean;

Description

If the FlatCloseButton property is set to True, the Close button on the current bar manager’s toolbar that represents a main menu is drawn flat.  Otherwise, it has a 3D appearance.

Note:	The value of the FlatCloseButton property influences the appearance of the main menu’s Close button only when the current bar manager’s style is standard or enhanced.

In the following table a main menu with the Close button is displayed with different values for the FlatCloseButton property.

Value	Image
False
True

Use the ShowCloseButton property to show the Close button of the main menu.


TdxBarManager.HotImages

TdxBarManager

This property is obsolete, use the ImageOptions.HotImages property instead.

property HotImages: TImageList;


TdxBarManager.ImageOptions

TdxBarManager

Represents bar item image options.

property ImageOptions: TdxBarImageOptions;

Description

The ImageOptions property provides access to the bar item image options defined with the currently processed bar manager.

These options include:

•	DisabledImages – specifies the source of small images displayed by disabled items;

•	DisabledLargeImages – specifies the source of large images displayed by disabled items;

•	HotImages – specifies the image list whose images can be displayed within large button items when they are hot-tracked;

•	ImageListBkColor – specifies the transparent color of images within the bar manager’s image lists;

•	Images – specifies the image list associated with the current bar manager’s items;

•	LargeIcons – specifies which glyph size to apply to the current bar manager’s items;

•	LargeImages – specifies the image list whose images can be displayed within large button items;

•	MakeDisabledImagesFaded – specifies whether default images are to be painted faded;

•	SmoothGlyphs – specifies whether to draw stretched images in a smooth manner;

•	StretchGlyphs – specifies whether to stretch bar item images so that they fit bar item bounds;

•	UseLargeImagesForLargeIcons – specifies which group of images to use as bar item icons;

•	UseLeftBottomPixelAsTransparent.


TdxBarManager.Images

TdxBarManager

This property is obsolete, use the ImageOptions.Images property instead.

property Images: TCustomImageList;


TdxBarManager.LargeImages

TdxBarManager

This property is obsolete, use the ImageOptions.LargeImages property instead.

property LargeImages: TImageList;


TdxBarManager.LargeButtonArrowWidth

TdxBarManager          See Also

Specifies the width of dropdown buttons which belong to the current bar manager’s large buttons in pixels.

property LargeButtonArrowWidth: Integer;

Description

A user can change the default style of a large button via the ButtonStyle property.  If the bsDropDown or bsCheckedDropDown value is set to this property a dropdown button is drawn on the right of the button.  Use the LargeButtonArrowWidth property to get or set the width of the dropdown buttons which belong to the buttons of the TdxBarLargeButton type.

In the following table a dropdown button with different values for the LargeButtonArrowWidth property is displayed.

Value	Image
15
25

When painting, the width of dropdown buttons can be increased or decreased depending upon the bar manager’s style.

Note:	The assigned value must be more than 2.

The default value of the LargeButtonArrowWidth property is specified by the dxBarDefaultLargeButtonArrowWidth constant.  This constant is equal to 13.


TdxBarManager.Scaled

TdxBarManager

Specifies whether the current bar manager’s font height is defined by the system font size.

property Scaled: Boolean;

Description

By default, the current bar manager’s font height is linked to the system menu font size and cannot be changed.

Set the Scaled property to False to eliminate this dependency and allow end-users to change the bar manager’s font height (the Height attribute of the Font property).

Note: Changing the font height leads to the resizing of the bar manager’s toolbars and items.

System font settings are applied to the bar manager’s font, if the UseSystemFont property is set to True.  The UseSystemFont property is automatically set to False if the Font property’s options were modified.

The default value of the Scaled property is True.


TdxBarManager.StoreInRegistry

TdxBarManager            See Also

Specifies whether the current bar manager’s settings are stored in the registry.

property StoreInRegistry: Boolean;

Description

When a bar manager is destroyed or created, its settings can be saved to or restored from the registry path specified by the RegistryPath property, if the StoreInRegistry property is set to True.  Refer to the description of the SaveToIniFile method for details on which bar manager’s settings are saved to/restored from the registry.

Use this property to preserve bar layout between application runs.

If you don’t want to store the bar manager’s settings in 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.

If you need to save and restore a bar manager’s settings at different points in a program, you can do so by manually calling the SaveToRegistry, LoadFromRegistry, SaveToIniFile and LoadFromIniFile, SaveToStream and LoadFromStream methods.  For instance in MDI applications you can call the SaveToRegistry method from the OnClose event handler of the child form to save the settings of its bar manager.


TdxBarManager.StretchGlyphs

TdxBarManager

This property is obsolete, use the ImageOptions.StretchGlyphs property instead.

property StretchGlyphs: Boolean;


TdxBarManager.SunkenBorder

TdxBarManager            See Also

Specifies the border style of the current bar manager’s dock controls.

property SunkenBorder: Boolean;

Description

Use the SunkenBorder property to switch between two border styles of the current bar manager’s dock controls.  If the SunkenBorder property is set to False, the dock controls are displayed with standard borders.  Otherwise, border lines are sunk.

In the following picture the toolbar is docked to the dock control with a sunken border.


TdxBarManager.WaitForDockingTime

TdxBarManager

Determines how quickly (in milliseconds) a floating toolbar is docked.

property WaitForDockingTime: Integer;

Description

When a floating toolbar is dragged to the place of a dock control an amount of time must pass before it's docked.  This interval, in milliseconds, is specified by the WaitForDockingTime property.  The assigned value must be a positive integer value.

The default value of the WaitForDockingTime property is 21 milliseconds.


TdxBarManager.BarControlFocused

TdxBarManager            See Also

Determines if the current bar manager has a focused toolbar control.

property BarControlFocused: Boolean;

Description

If one of the current bar manager’s toolbar controls is focused, the BarControlFocused property returns True, otherwise it returns False.

To access the focused toolbar use the FocusedBarControl property.

ReadOnly Property


TdxBarManager.FocusedBarControl

TdxBarManager            See Also

Specifies the focused toolbar control.

property FocusedBarControl: TCustomdxBarControl;

Description

Use the FocusedBarControl property to access the currently focused toolbar control.  If none of the current bar manager's toolbars is focused, this property returns nil.

If you need to find out whether one of the current bar manager’s toolbar controls is focused, use the BarControlFocused property.

ReadOnly Property


TdxBarManager.Dragging

TdxBarManager

Indicates whether the current bar manager's item is being dragged.

property Dragging: Boolean;

Description

If the value of the Dragging property is True, the current bar manager’s item is being dragged. This property is used internally.

To specify the toolbar item that is being dragged, use the DraggingItem property.  To get or set the item link of the item control being dragged, use the DraggingItemLink property.

ReadOnly Property


TdxBarManager.DraggingItem

TdxBarManager            See Also

Specifies the current bar manager’s item whose control is being dragged.

property DraggingItem: TdxBarItem;

Description

This property is used internally.  As a bar manager’s item can have several item controls, which can be accessed via the item’s links, use the DraggingItemLink property to specify the item link of the item control, that is being dragged.

To determine whether the current bar manager’s item is being dragged use the Dragging property.


TdxBarManager.DraggingItemLink

TdxBarManager            See Also

Specifies the item link of the item control that is being dragged.

property DraggingItemLink: TdxBarItemLink;

Description

A bar manager’s item can have several item controls, which can be accessed via the item’s links.  Use the DraggingItemLink property to specify the item link of the item control that is being dragged.  This property is used internally.

To specify directly the item whose control is being dragged use the DraggingItem property.

To determine whether the current bar manager’s item is being dragged use the Dragging property.


TdxBarManager.SubMenuBeginGroupIndent

TdxBarManager          See Also

Determines the size of the indent between groups in submenus.

property SubMenuBeginGroupIndent: Integer;

Description

The items in submenu can be divided into groups by a separator.  The SubMenuBeginGroupIndent property is used internally to determine the size of the indent between groups.  The size of an indent varies with the bar manager’s style.

ReadOnly Property


TdxBarManager.GlyphSize

TdxBarManager

This property is obsolete, use the ImageOptions.GlyphSize property instead.

property GlyphSize: Integer;

ReadOnly Property


TdxBarManager.ButtonWidth

TdxBarManager            See Also

Determines the height of the current bar manager’s buttons in pixels.

property ButtonWidth: Integer;

Description

The ButtonWidth property contains the width of the current bar manager’s buttons that includes the border and glyph sizes in pixels.

ReadOnly Property


TdxBarManager.ButtonHeight

TdxBarManager            See Also

Determines the height of the current bar manager’s buttons in pixels.

property ButtonHeight: Integer;

Description

The ButtonHeight property contains the height of the current bar manager’s buttons that includes the border and glyph sizes in pixels.

ReadOnly Property


TdxBarManager.RealButtonArrowWidth

TdxBarManager          See Also

Returns the real width of drop-down buttons that belong to the current bar manager’s buttons.

property RealButtonArrowWidth: Integer;

Description

The default width of the drop-down button that belongs to a TdxBarButton can be changed via the ButtonArrowWidth property.  If the current bar manager’s buttons are enlarged (the LargeIcons property is set to True), the value of the ButtonArrowWidth property is doubled.  When painting, the width of drop-down buttons can be increased or decreased depending upon the bar manager’s style.

Use the RealButtonArrowWidth property to get the real width of the dropdown buttons.

ReadOnly Property


TdxBarManager.AddButton
+ KTdxBarManager.AddButton

TdxBarManager            See Also           Example

Creates a TdxBarButton and adds it to the current bar manager.

function AddButton: TdxBarButton;

Description

This function returns a reference to the newly created toolbar button.


TdxBarManager.AddItem

TdxBarManager            See Also

Creates an instance of the AClass item and adds it to the current bar manager.

type

  TdxBarItemClass = class of TdxBarItem;

function AddItem(AClass: TdxBarItemClass): TdxBarItem;

Description

You can use this method to instantiate any bar item (for example, a button or an editor), which belongs to the TdxBarItem family.

AClass specifies the type of a particular item to be created.

This function returns a reference to the newly created item.


TdxBarManager.AddSubItem

TdxBarManager            See Also

Creates a TdxBarSubItem and adds it to the current bar manager.

function AddSubItem: TdxBarSubItem;

Description

This function returns a reference to the newly created submenu.


TdxBarManager.AddToolBar

TdxBarManager            See Also

Creates a new toolbar instance and adds it to the current bar manager.

function AddToolBar(AIsMainMenu: Boolean = False; ANeedEditCaption: Boolean = False): TdxBar;

Description

The AddToolBar method returns a reference to an instance of the newly created toolbar.

AIsMainMenu specifies whether a new toolbar will represent the main menu.  Set AIsMainMenu to True to make the new toolbar a main menu.

ANeedEditCaption specifies whether the Add Toolbar dialog appears allowing an end-user to decide whether the new toolbar will be created and its caption entered.  Set ANeedEditCaption to True to display the Add Toolbar dialog.  Otherwise, a new toolbar will be created automatically with the default caption.


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 the TdxBarManager to the application’s 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 an item group.

function CreateGroup: TdxBarGroup;

Description

This function

•	creates an instance of the TdxBarGroup class;

•	adds this group to the list of available groups of the current bar manager which can be accessed via the bar manager’s Groups property.

Use a group’s Free method to remove it from the collection.


TdxBarManager.DeleteToolBar

TdxBarManager

Deletes the ABar toolbar.

procedure DeleteToolBar(ABar: TdxBar; AConfirmation: Boolean);

Description

The DeleteToolBar method destroys an instance of the ABar toolbar.

ABar specifies the toolbar to be destroyed.

AConfirmation specifies whether to display a confirmation dialog before the toolbar is deleted. Set AConfirmation to True, to show the dialog.  Otherwise, the toolbar will be removed without confirmation.


TdxBarManager.Destroy

TdxBarManager          See Also

Destroys an instance of the TdxBarManager class.

destructor Destroy; override;

Description

The Destroy method destroys an instance of the TdxBarManager class 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

A caption uniquely represents a toolbar for end-users in visual controls (for instance, the Customization Form, a toolbar’s popup menu, etc.).  Use the BarByCaption method to access a bar by its Caption passed as the ACaption parameter.


TdxBarManager.BarByComponentName

TdxBarManager          See Also

Returns a toolbar by its name.

function BarByComponentName(const AName: string): TdxBar;

Description

The BarByComponentName method matches the AName’s value with the bar’s Name property value.

If the search is successful, the method returns a reference to the bar instance; otherwise it returns nil.

AName specifies the bar’s name.


TdxBarManager.BarByOldName

TdxBarManager          See Also

Returns a toolbar by the name used in previous versions of the ExpressBars Suite.

function BarByOldName(const AName: string): TdxBar;

Description

In older versions of the ExpressBars Suite, the BarByName method was used to access a toolbar by its name (a string).  In the ExpressBars Suite v6, the toolbar’s Name property type is TComponentName, and you can directly refer to a toolbar by its name.  As such, the BarByName method is now obsolete.

For older projects that use the BarByName method, you can use the BarByOldName method when converting to ExpressBars Suite v6.  This method matches the AName’s value with the bar’s OldName property value.  When the old project is opened, this property is set to the value of the bar’s old Name property that was saved in the .dfm file.

If the search is successful, the method returns a reference to the bar instance; otherwise it returns nil.

AName specifies the bar’s old name.


TdxBarManager.BarByName

TdxBarManager          See Also

This method is obsolete.

function BarByName(const AName: string): TdxBar;

Description

Use the BarByOldName method for projects developed prior to the release of ExpressBars Suite v6, or the BarByComponentName method in new projects.


TdxBarManager.GetAllItemsByCategory

TdxBarManager            See Also

Populates a list with the items (both visible and invisible) in a particular category and returns a count of the items in this list.

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

Description

The GetAllItemsByCategory function clears the list passed as the List parameter and populates it with the items (both visible and invisible) in the category specified by the ACategory parameter.  The return value of the method is a count of the items in the list.

If the category does not exist, this method returns a value of 0 and a clear list.

Note:	The bar manager’s Categories property is a zero-based indexed collection.  Use the GetCountByCategory method to get the total number of visible items in a particular category.


TdxBarManager.GetCountByCategory

TdxBarManager            See Also

Returns a count of visible items in a particular category.

function GetCountByCategory(ACategory: Integer): Integer;

Description

The ACategory parameter specifies the index of the category in the bar manager’s Categories zero-based collection.  This function returns the total number of visible items within the specified category.

If the category does not exist, the method returns a value of 0.

To get the total number of all the items (both visible and invisible) within a particular category, use the GetCountByCategory method.


TdxBarManager.GetItemByCategory

TdxBarManager            See Also

Returns a particular item in a specified category.

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

Description

Use this function to get a particular item from the category specified by the ACategory parameter.  The item is identified by its zero-based index within the category as specified by the AIndex parameter.

If the category or the item does not exist, the GetItemByCategory function returns nil.

Note:	The ACategory parameter specifies an index of a category within the bar manager’s Categories property is a zero-based indexed collection.  A count of the items in a particular category is returned by the GetAllItemsByCategory function.  The total number of visible items in a particular category is returned by the GetCountByCategory function.


TdxBarManager.GetItemByName

TdxBarManager            See Also

Returns an item by name.

function GetItemByName(const AName: string): TdxBarItem;

Description

Items of a toolbar are stored in a bar manager’s Items collection.  The GetItemByName function locates an item with the name specified by the AName parameter in this collection and returns it (if found).  Otherwise, the function returns nil.


TdxBarManager.GetItemsByCategory

TdxBarManager            See Also

Populates a list with the items in a particular category and returns a count of the items in the list.

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

Description

The GetItemsByCategory method clears the list passed as the List parameter and then populates it with the items of the category specified by the ACategory parameter.  If the bar manager’s Designing property is set to False, the list is populated only with visible items, otherwise it is populated with all the items (both visible and invisible) of the category.  The return value of the method is a count of the items in the list.

If the category does not exist, this method returns a value of 0 and a clear list.

Note:	Bar manager’s Categories property is a zero-based indexed collection.  Use the GetCountByCategory method to get a count of visible items within a particular category.


TdxBarManager.Merge

TdxBarManager          See Also          Concepts          Example

Incorporates bars of the ABarManager into the current bar manager.

procedure Merge(ABarManager: TdxBarManager; ACanCreateNewBar: Boolean = True);

Description

Use the Merge method to copy the ABarManager’s toolbars into the current bar manager.  You can sequentially merge the current bar manager with any number of bar managers, if required.

The ABarManager parameter specifies the bar manager whose toolbars will be copied into the current bar manager.

The Merge method joins the bars that have matching captions.  The ACanCreateNewBar parameter specifies whether the ABarManager’s toolbars, which have no counterparts, will be imported into the current bar manager.  If the ACanCreateNewBar parameter is set to True, then the ABarManager’s toolbars will be incorporated into the newly created toolbars of the current bar manager.  If the ACanCreateNewBar parameter is set to False, then no new mergers of the current bar manager will be created.  In this instance, only those ABarManager’s toolbars will be imported which have captions identical to the captions of the current bar manager’s toolbars.

Note: when this operation completes, the ABarManager’s toolbars will be hidden in the source form (the TdxBar.Visible property of the toolbars’ instances will be set to False).


TdxBarManager.MoveItem

TdxBarManager

Moves an item to a new position in a bar manager’s Items collection.

procedure MoveItem(CurIndex, NewIndex: Integer);

Description

Bar items are stored in a bar manager’s Items zero-based indexed collection.  The MoveItem method moves an item from its current position specified by the CurIndex parameter to the new position specified by the NewIndex parameter.

The total number of items within the bar manager’s Items collection can be obtained using the Items.Count property.

The MoveItem method is called when an item is dragged from one category to another.


TdxBarManager.RenameToolBar

TdxBarManager          See Also

Displays the Rename Toolbar dialog used for editing the ABar toolbar’s caption.

procedure RenameToolBar(ABar: TdxBar);

Description

Use the IsCustomizing property to make sure that the Customization Form window is active prior to invoking the RenameToolBar method.

ABar specifies the bar to be renamed.


TdxBarManager.ResetToolBar

TdxBarManager          See Also

Restores the original settings of the ABar toolbar.

procedure ResetToolBar(ABar: TdxBar);

Description

When the ResetToolBar method is invoked, a confirmation dialog appears prompting the end-user to select whether to proceed with the operation, or cancel it.  If confirmed, the ABar toolbar gets the original settings.

ABar specifies the bar to be restored.

At runtime, the confirmation dialog box can be invoked by clicking the Reset button within the Toolbars page of the Customization Form.

Note: When the UseFullReset property is set to False (default), not all of a toolbar’s settings are restored. Refer to the description of this property for details.


TdxBarManager.Unmerge

TdxBarManager          See Also          Concepts          Example

Resets the ABarManager and the current bar manager to their previous states (prior to a TdxBarManager.Merge call).

procedure Unmerge(ABarManager: TdxBarManager = nil);


TdxBarManager.ExchangeItems

TdxBarManager

Swaps two items in a bar manager’s Items list.

procedure ExchangeItems(Index1, Index2: Integer);

Description

Items of a toolbar are stored in a bar manager’s Items zero-based indexed collection.  The ExchangeItems method exchanges the positions of the items specified by the Index1 and Index2 parameters in this collection.

The total number of items within the bar manager’s Items collection can be obtained using the Items.Count property.

This method is called when items are moved from one category to another in the Customization Form.


TdxBarManager.Customizing

TdxBarManager          See Also

Displays or closes the toolbar’s Customization Form.

procedure Customizing(Show: Boolean);

Description

To display the toolbar’s Customization Form pass True as the Show parameter.  Otherwise, it will be closed.


TdxBarManager.HideAll

TdxBarManager              Example

Makes inactive the currently active toolbar and all its item controls and popup menu.

procedure HideAll;

Description

Calling this method removes the focus from the currently active toolbar and its item controls.  This also results in hiding all the toolbar’s submenus and popup menu (if active).  The HideAll method assigns False to the IsActive property of the currently active popup menu, item control or subitems and to the IsActive property of the toolbar to which they belong.  For instance, if there is a set of open submenus, the HideAll method closes them.


TdxBarManager.LoadFromRegistry

TdxBarManager            See Also

Loads the bar manager’s settings stored in the registry.

procedure LoadFromRegistry(ARegistryPath: string);

Description

Use the LoadFromRegistry method to load the bar manager’s settings from the registry path specified by the ARegistryPath parameter.  If the specified path is an empty string, the LoadFromRegistry method does nothing.  The bar manager’s settings can be stored using the SaveToRegistry method.

Please refer to the description of the SaveToIniFile method for details on which bar manager’s settings are saved to the registry.

New bar items – which were added to a toolbar after storing its settings to the registry, INI file or stream – will be visible after restoring the settings.


TdxBarManager.SaveToRegistry

TdxBarManager            See Also

Saves the bar manager’s settings to the registry.

procedure SaveToRegistry(ARegistryPath: string);

Description

Use the SaveToRegistry method to save the bar manager’s settings to the registry path specified by the ARegistryPath parameter.  If the specified path is an empty string, the SaveToRegistry method does nothing.

Please refer to the description of the SaveToIniFile method for details on which bar manager’s settings are saved to the registry.

You can restore the bar manager’s settings from the registry using the LoadFromRegistry method.  Also settings can be saved to and restored from a stream or an INI file.  Please refer to the SaveToStream or SaveToIniFile and, LoadfromStream or LoadFromIniFile method pairs.


TdxBarManager.DoClickItem

TdxBarManager

Fires the OnClickItem event.

procedure DoClickItem(AItem: TdxBarItem); virtual;

Description

The DoClickItem method is called when clicking on a toolbar’s item.  The DoClickItem method fires the OnClickItem event.  This method isn’t called when the item specified by the AItem parameter is of the TdxBarControlContainerItem or TdxBarStatic type or a descendant of the TdxBarWindowItem class.

Override the DoClickItem method to perform specific actions when clicking a toolbar’s item.


TdxBarManager.DoDocking

TdxBarManager            See Also

Checks whether a toolbar can be moved and fires the OnDocking event.

function DoDocking(ABar: TdxBar; AStyle: TdxBarDockingStyle; ADockControl: TdxDockControl): Boolean; virtual;

Description

The DoDocking method is called when changing a toolbar’s position.  This method checks if the docking style specified by the AStyle parameter is a valid docking style for the toolbar specified by the ABar parameter or for the current bar manager.  If it is a valid docking style the return value is True and the toolbar’s position can be changed, otherwise the toolbar can’t be moved.  The ADockControl parameter specifies the location of the toolbar (its dock control).

The DoDocking method also fires the OnDocking event.

Override the DoDocking method to perform specific actions when changing a toolbar’s position.


TdxBarManager.DoCloseButtonClick

TdxBarManager            See Also

Fires the OnCloseButtonClick event.

procedure DoCloseButtonClick; dynamic;

Description

The DoCloseButtonClick method is called when clicking the Close button on a toolbar representing a main menu.  This method fires the OnCloseButtonClick event.

Override the DoCloseButtonClick method to perform specific actions when closing a main menu.

If a floating toolbar doesn’t represent a main menu refer to the DoBarClose method.


TdxBarManager.OnBarAdd

TdxBarManager            See Also

Occurs after a new toolbar has been added.

type

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

property OnBarAdd: TdxBarEvent;

Description

Handle the OnBarAdd event to perform specific actions after a new toolbar (specified by the ABar parameter) has been created.  Toolbar creation occurs when it’s added to the toolbars collection of the current bar manager specified by the Sender parameter.


TdxBarManager.OnBarDelete

TdxBarManager            See Also

Occurs before a toolbar is removed from the current bar manager’s collection of toolbars.

type

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

property OnBarDelete: TdxBarEvent;

Description

Handle the OnBarDelete event to perform specific actions before a toolbar (specified by the ABar parameter) is removed from the toolbars collection of the current bar manager specified by the Sender parameter.


TdxBarManager.OnBarDockingStyleChange

TdxBarManager            See Also          Example

Occurs when a toolbar’s docking style is changed.

type

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

property OnBarDockingStyleChange: TdxBarEvent;

Description

Handle the OnBarDockingStyleChange event to perform specific actions when changing the docking style of the toolbar specified by the ABar parameter.  The Sender parameter specifies the bar manager to which the toolbar belongs.  The event is fired by the DoBarDockingStyleChanged method.


TdxBarManager.OnBarVisibleChange

TdxBarManager

Occurs when a toolbar’s visibility state is changed.

type

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

property OnBarVisibleChange: TdxBarVisibleChangeEvent;

Description

Handle the OnBarVisibleChange event to perform specific actions when the visibility state of the toolbar (specified by the ABar parameter) is changed.  The Sender parameter specifies the bar manager to which the toolbar belongs.


TdxBarManager.OnItemLinkAdd

TdxBarManager            See Also

Occurs when creating an item link within a collection of item links.

type

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

property OnItemLinkAdd: TdxBarItemLinkEvent;

Description

Handle the OnItemLinkAdd event to perform specific actions after adding the item link specified by the AItemLink parameter to the ItemLinks collection.  There are several classes that have the ItemLinks property: the TdxBar, TdxBarPopupMenu, TCustomdxBarSubItem and TCustomdxBarControl classes and their descendants.  The Sender parameter specifies the current bar manager.

For instance, the OnItemLinkAdd event is fired when creating a toolbar's popup menu.


TdxBarManager.OnItemLinkChange

TdxBarManager            See Also

Occurs after an item link is modified.

type

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

property OnItemLinkChange: TdxBarItemLinkEvent;

Description

Handle the OnItemLinkChange event to perform specific actions after properties of an item link that belongs to the ItemLinks collection have been changed.  There are several classes that have the ItemLinks property: the TdxBar, TdxBarPopupMenu, TCustomdxBarSubItem and TCustomdxBarControl classes and their descendants.

The item link is specified by the AItemLink parameter.  The Sender parameter specifies the current bar manager.

This event occurs when changing the values of some item link’s properties (UserCaption, BeginGroup, UserGlyph, UserPaintStyle, UserWidth, Visible, Item and MostRecentlyUsed).


TdxBarManager.OnItemLinkDelete

TdxBarManager            See Also

Occurs before an item link is removed from a collection of item links.

type

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

property OnItemLinkDelete: TdxBarItemLinkEvent;

Description

Handle the OnItemLinkDelete event to perform specific actions before an item link specified by the AItemLink parameter is removed from the ItemLinks collection.  There are several classes that have the ItemLinks property: the TdxBar, TdxBarPopupMenu, TCustomdxBarSubItem and TCustomdxBarControl classes and their descendants.

The Sender parameter specifies the current bar manager.

For instance, the OnItemLinkDelete event is fired when a toolbar’s popup menu is modified.


TdxBarManager.OnCloseButtonClick

TdxBarManager            See Also

Occurs when a toolbar that represents a main menu is being closed.

type

  TNotifyEvent = procedure (Sender: TObject) of object;

property OnCloseButtonClick: TNotifyEvent;

Description

Handle the OnCloseButtonClick event to perform specific actions when the Close button on a toolbar, which represents a main menu, is clicked.  The Sender parameter specifies the current bar manager.

This event is fired by the DoCloseButtonClick method.

If a floating toolbar doesn’t represent a main menu handle the OnBarClose event instead.


TdxBarManager.OnDocking

TdxBarManager            See Also

Occurs when an end user changes a toolbar’s position.

type

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

property OnDocking: TdxBarCanDockingEvent;

Description

Handle the OnDocking event to perform specific actions when an end user changes a toolbar’s position.  This event is fired by the DoDocking function.  This function initializes the event’s CanDocking parameter.  Refer to the description of the DoDocking function to learn about the event’s parameters and the conditions which result in the event firing.

The following code prevents a toolbar which represents a main menu from docking to any side of a form except for its 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

Occurs after hiding the current bar manager’s Customization Form.

type

  TNotifyEvent = procedure(Sender: TObject) of object;

property OnHideCustomizingForm: TNotifyEvent;

Description

Handle the OnHideCustomizingForm event to perform specific actions after hiding the Customization Form of the bar manager specified by the Sender parameter.

Handle the OnShowCustomizingForm event to perform specific actions before displaying the Customization Form.


TdxBarManager.OnMerge

TdxBarManager          See Also          Concepts

Fires when one of the MDI child forms changes its state.

type

  TdxBarMergeEvent = procedure(Sender, ChildBarManager: TdxBarManager; AddItems: Boolean) of object;

property OnMerge: TdxBarMergeEvent;


TdxBarManager.OnMergeItemLink

TdxBarManager          See Also          Concepts

Fires before an item link is added to the merging bar.

type

  TdxBarMergeItemLinkEvent = procedure(Sender: TdxBarManager; ADstItemLinks, ASrcItemLinks: TdxBarItemLinks; ASrcItemLink: TdxBarItemLink; var AMergeKind: TdxBarItemMergeKind; var AMergeIndex: Integer) of object;

property OnMergeItemLink: TdxBarMergeItemLinkEvent;

Description

The OnMergeItemLink event fires when the TdxBarManager.Merge or the TdxBar.Merge method is invoked.

Implement the OnMergeItemLink event handler to arrange bar items manually.

Sender specifies the bar manager which will merge the bar items.

ADstItemLinks specifies the item links collection of the merging bar manager.

ASrcItemLinks specifies the item links collection of the source bar manager.

ASrcItemLink specifies the item link of the source bar manager.

AMergeKind specifies the manner in which the bar item is merged into the target bar (see the TdxBarItem.MergeKind property).

AMergeIndex specifies the position of bar items in the target bar (see the TdxBarItem.MergeOrder property).


TdxBarManager.OnMenuMerge

TdxBarManager          See Also          Concepts

Occurs when an MDI child form containing the main menu changes its state.

type

  TdxBarMergeEvent = procedure(Sender, ChildBarManager: TdxBarManager; AddItems: Boolean) of object;

  TdxBarMenuMergeEvent = TdxBarMergeEvent;

property OnMenuMerge: TdxBarMenuMergeEvent;

Description

When a child form changes its state (it’s activated, for instance), its main menu items are added by default to the end of the parent form’s main menu.  To add child menu items to the parent menu in a specific manner, handle the OnMenuMerge event.  For instance, you can insert items to arbitrary positions within the parent menu.

The Sender parameter references the bar manager of the MDI parent form.

The ChildBarManager parameter references the bar manager of the MDI child form.

AddItems indicates the operation being performed.  Since the OnMerge event fires for the complementary states, it's important to know which action is currently running.

The AddItems parameter returns True, if the current MDI child form is activated or maximized.  For these actions, the merge operation can be performed.

The AddItems parameter returns False, if the child form is deactivated, restored or minimized.  These states are opposite to the ones above, and therefore the bars should be unmerged.

Note:	The OnMenuMerge event is fired before the OnMerge event and only when the AlwaysMerge property is set to True.  If the OnMenuMerge event handler is assigned, the parent form’s bar manager does not automatically merge child and parent menus.


TdxBarManager.OnShowCustomizingForm

TdxBarManager            See Also

Occurs before the current bar manager’s Customization Form is displayed.

type

  TNotifyEvent = procedure(Sender: TObject) of object;

property OnShowCustomizingForm: TNotifyEvent;

Description

Handle the OnShowCustomizingForm event to perform specific actions before the Customization Form of the bar manager specified by the Sender parameter is displayed.

Handle the OnHideCustomizingForm event to perform specific actions after the Customization Form has been hidden.


TdxBarManager.OnShowToolbarsPopup

TdxBarManager            See Also          Example

Occurs before a toolbar’s popup menu is displayed.

type

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

property OnShowToolbarsPopup: TdxBarShowToolbarsPopupEvent;

Description

By right-clicking a toolbar an end-user can invoke a popup menu that lists all the toolbars whose Hidden property is set to False.  The OnShowToolbarsPopup event is called when creating the toolbar's popup menu after populating the popup menu’s ItemLinks collection with the item links that represent toolbars.  The PopupItemLinks parameter specifies this collection.

Handle the OnShowToolbarsPopup event to perform specific actions before displaying a toolbar’s popup menu.  The Sender parameter specifies the current bar manager.

This event is fired by the DoShowToolbarsPopup method.


TdxBarManager.OnClickItem

TdxBarManager          See Also

Occurs when clicking a toolbar’s item.

type

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

property OnClickItem: TdxBarClickItemEvent;

Description

Handle the OnClickItem event to perform specific actions when clicking a toolbar’s item control.  This event isn’t called when the item specified by the ClickedItem parameter is of the TdxBarControlContainerItem or TdxBarStatic type or a descendant of the TdxBarWindowItem class.

The Sender parameter specifies the bar manager to which the toolbar belongs.

This event is fired by the DoClickItem method.


TdxBarManager.StoreInIniFile

TdxBarManager            See Also

Specifies whether the current bar manager’s settings should be stored in an INI file.

property StoreInIniFile : Boolean;

Description

When a bar manager is destroyed or created, its settings can be saved to or restored from the INI file specified by the INIFileName property, if the StoreInIniFile property is set to True.  Refer to the description of the SaveToIniFile method for details on which bar manager’s settings are saved to/restored from an INI file.

Use this property to preserve bar layout between application runs.

If you don’t want to store the bar manager’s settings in an INI file, you can store them in the registry.  To do so, set the StoreInRegistry property to True and specify the registry path using the RegistryPath property.

If you need to save and restore a bar manager’s settings at specific points in a program, you can do so by manually calling the SaveToRegistry, LoadFromRegistry, SaveToIniFile LoadFromIniFile, SaveToStream and LoadFromStream methods.  For instance, in MDI applications you can call the SaveToIniFile method from the OnClose event handler of the child form to save the settings of its bar manager.


TdxBarManager.IniFileName

TdxBarManager            See Also

Specifies the name of the INI file in which the current bar manager’s settings are stored.

property IniFileName: string;

Description

The INI file specified by the RegistryPath property is used to store the current bar manager’s settings, when the StoreInIniFile property is set to True.

Refer to the description of the StoreInIniFile property for detailed information on storing a bar manager’s settings.


TdxBarManager.SaveToIniFile

TdxBarManager            See Also

Saves bar manager’s settings to an INI file.

procedure SaveToIniFile(AFileName: string);

Description

Use the SaveToIniFile method to store the bar manager’s settings into the INI file specified by the AFileName parameter.  If the specified file name is an empty string, the SaveToIniFile method does nothing.  The settings saved in an INI file are listed in the following table.

Section	Settings
Bar manager’s properties	Menu settings, hint visibility, a count of toolbars within the current bar manager, etc.
Toolbars’ and subitems’ properties	A toolbar’s caption, docking settings, settings of toolbar items, etc.

You can restore bar manager’s settings from an INI file using the LoadFromINIFile method.  Also settings can be saved to and restored from a stream or the registry.  Please refer to the SaveToStream or SaveToRegistry and, LoadFromStream or LoadfromRegistry method pairs.

Note:	You should call the SaveToIniFile method from a child form’s OnClose event handler to save bar manager’s settings 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 bar manager’s settings from an INI file.

procedure LoadFromIniFile(AFileName: string);

Description

Use the LoadFromIniFile method to load the bar manager’s settings from the INI file specified by the AFileName parameter.  If the specified file name is an empty string, the LoadFromIniFile method does nothing.  To save the settings, call the SaveToIniFile method.

Please refer to the description of the SaveToIniFile method for details on which bar manager’s settings are saved to an INI file.

New bar items – which were added to a toolbar after storing its settings to the registry, INI file or stream – will be visible after restoring the settings.


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

This property is obsolete, use the ImageOptions.DisabledImages property instead.

type

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

property DisabledImages: TCurImageList;


TdxBarManager.DisabledLargeImages

TdxBarManager

This property is obsolete, use the ImageOptions.DisabledLargeImages property instead.

type

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

property DisabledLargeImages: TCurImageList;


TdxBarManager.SaveToStream

TdxBarManager

Saves the bar manager’s settings to a stream.

procedure SaveToStream(AStream: TStream);

Description

Use the SaveToStream method to save the bar manager settings to a stream specified by the AStream parameter.  If nil is passed for the parameter, the SaveToStream method does nothing.

Please refer to the description of the SaveToIniFile method for details on which bar manager’s settings are saved to a stream.

You can restore the bar manager’s settings from a stream using the LoadFromStream method.  Also settings can be saved to and restored from an INI file or the registry.  Please refer to the SaveToIniFile or SaveToRegistry and, LoadFromIniFile or LoadfromRegistry method pairs.

Note:	the SaveToStream method writes information starting from the stream’s current position, which can be specified using the Position property.


TdxBarManager.LoadFromStream

TdxBarManager            See Also

Loads the bar manager’s settings from a stream.

procedure LoadFromStream(AStream: TStream);

Description

Use the LoadFromStream method to load the bar manager’s settings from the stream specified by the AStream parameter.  If nil is passed for the parameter, the LoadFromStream method does nothing.  The bar manager’s settings can be stored in a stream using the SaveToStream method.

Please refer to the description of the SaveToIniFile method for details on which bar manager’s settings are saved to a stream.

New bar items – which were added to a toolbar after storing its settings to the registry, INI file or stream – will be visible after restoring the settings.

Note:	Before loading the settings using the LoadFromStream method ensure that the Position property of the source stream points to the same position as it was prior to calling the SaveToStream method.


TdxBarManager.HideFloatingBarsWhenInactive

TdxBarManager

Specifies whether floating toolbars are hidden when the form which contains the current bar manager is inactive.

property HideFloatingBarsWhenInactive: Boolean;

Description

Set the HideFloatingBarsWhenInactive property to False to make floating toolbars visible when the form which contains the current bar manager is inactive.  If the property’s value is True, they will not be visible.

The default value of the HideFloatingBarsWhenInactive property is True.


TdxBarManager.PainterClass

TdxBarManager            See Also

Provides access to the class used to paint the current bar manager’s toolbars.

type

  TdxBarItemControlPainterClass = class of TdxBarPainter;

property PainterClass: TdxBarItemControlPainterClass;

Description

Use the PainterClass property to access the class that is used for drawing all the current bar manager’s toolbars and their items.  The possible values of this property include: TdxBarStandardPainter, TdxBarFlatPainter, TdxBarOffice11Painter, TdxBarXPPainter, and TdxBarSkinnedPainter.  These classes implement drawing in different styles: the standard, enhanced, flat, Office 2003 and Windows XP styles respectively.

The default value of the PainterClass property is the TdxBarEnhancedPainter class.

Refer to the description of the TdxBarPainter class for details on paint styles.

To specify a toolbars’ paint style use the Style property.

ReadOnly Property


TdxBarManager.ParentForm

TdxBarManager            See Also

Determines the parent window of the current bar manager.

property ParentForm: TCustomForm;

Description

A bar manager can belong to any window such as a form, frame or dialog, that is a window which is a descendant of the TCustomForm class.  Use the ParentForm property to determine the parent widow of the current bar manager.

Note:	Only a single bar manager can belong to a window.

To determine the root parent window for the current bar manager use the MasterForm property.  To indicate the owner of the current bar manager use the Owner property.

If the owner of a bar manager is not a descendant of the TCustomForm class the value of the MasterForm property is nil.

ReadOnly Property


TdxBarManager.MasterForm

TdxBarManager

Determines the root parent window of the current bar manager.

property MasterForm: TCustomForm;

Description

A bar manager can belong to any window such as a form, frame or dialog, that is a window which is a descendant of the TCustomForm class.  This window can be a child window for another window which is also a child window and so forth.  Use the MasterForm property to determine the current bar manager’s root parent window.

To determine the window that contains the current bar manager use the ParentForm property.  To indicate the owner of the current bar manager use the Owner property.

If the owner of a bar manager is not a descendant of the TCustomForm class the value of the MasterForm property is nil.

ReadOnly Property


TdxBarManager.Owner

TdxBarManager            See Also

Indicates the component that is responsible for streaming and freeing the current bar manager.

property Owner: TWinControl;

Description

Use the Owner property to find the owner of the current bar manager.  As a bar manager is a descendant of the TComponent class it uses the Owner property of this class and returns a control of the TWinControl class.

To access the window that contains the current bar manager use the ParentForm property.  To access the root parent window for the current bar manager use the MasterForm property.

ReadOnly Property


TdxBarManager.ParentBarManager

TdxBarManager            See Also

Determines the parent bar manager.

property ParentBarManager: TdxBarManager;

Description

A bar manager can belong to any window of an application: a form, frame, dialog and so forth.  That is it can belong to any descendant of the TCustomForm class.  If the parent window of the current bar manager is a child window for the window that also contains a bar manager, the latter bar manager will be the parent bar manager for the former.  Use the ParentBarManager property to access the parent bar manager.

For example, use this property to process shortcuts.

ReadOnly Property


TdxBarManager.BarsLoading

TdxBarManager

Specifies whether the toolbars of the current bar manager is being loaded.

property BarsLoading: Boolean;

Description

The BarsLoading property is used internally to detect when the toolbars of the current bar manager is in the process of loading.  The value of this property is True when the toolbars and all their items are being loaded.  If the property’s value is False, the bar manager is in a different internal state.

ReadOnly Property


TdxBarManager.GetPaintStyle

TdxBarManager

Returns the paint style of the current bar manager.

type

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

function GetPaintStyle: TdxBarManagerStyle;

Description

Use the GetPaintStyle function to determine the paint style of the current bar manager.  This function returns the value of the Style property except for when its value is bmsUseLookAndFeel.  In this instance if the LookAndFeel.NativeStyle property is set to True, the bmsXP value is returned, otherwise the value corresponding to the LookAndFeel.Kind or LookAndFeel.SkinName property is returned.  Refer to the Style property to see the differences between the possible paint styles.

If the currently installed operating system is not Windows XP or XP theme is not available, use the GetRealPaintStyle function.


TdxBarManager.GetRealPaintStyle

TdxBarManager

Returns the real paint style of the current bar manager.

type

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

function GetRealPaintStyle: TdxBarManagerStyle;

Description

The GetRealPaintStyle function is used when the currently installed operating system is not Windows XP or XP theme is not available.  The Windows XP style can still be set using one of two methods:

•	set the Style property to bmsXP;

•	set the Style property to bmsUseLookAndFeel and set the LookAndFeel.NativeStyle property to True.

In this instance toolbars will be painted using the bmsEnhanced paint style.  The GetPaintStyle function will return the bmsXP value whereas the GetRealPaintStyle function will return the bmsEnhanced value, that is the real value of the display style.

In the case when the currently installed operating system is Windows XP, XP theme is available and the Windows XP style is set both the GetRealPaintStyle and GetPaintStyle functions return the bmsXP value.


TdxBarManager.CanShowRecentItems

TdxBarManager

Determines whether the recently used items of the current bar manager‘s toolbars can be displayed.

function CanShowRecentItems: Boolean;

Description

If the return value of the CanShowRecentItems function is True the recently used items can be displayed first on the corresponding toolbars.  Otherwise, bar items are displayed in order of creation.

The value of the CanShowRecentItems function depends on the paint style of the current bar manager.  When the style is standard (bmsStandard) the function’s value is False.


TdxBarManager.GetUniqueItemName

TdxBarManager

Generates a unique name for a bar manager’s item whose type is specified by the ABarItemClass parameter.

type

  TdxBarItemClass = class of TdxBarItem;

function GetUniqueItemName(ABarItemClass: TdxBarItemClass);

Description

Use the GetUniqueItemName function to rename an existing item of the current bar manager or to generate a name for an item which has been created via code.  In both cases the return value of this function must be assigned to the Name property of the item.

The GetUniqueItemName function assigns a name based upon the item’s type specified by the ABarItemClass parameter.  For example, if the TdxBarButton class is passed by the parameter the GetUniqueItemName function will generate the "dxBarButtonN" name, where N is the index given. So that the name is unique but it still shares the majority of its name with other items in the current bar manager’s Items collection.

An item can be found in the bar manager’s Items collection by its name via the GetItemByName method.

Note:	An item’s name is case sensitive.


TdxBarManager.GetUniqueToolbarName

TdxBarManager

Generates a unique name for the bar manager’s toolbar adding an index to the string passed by the ABaseName parameter.

function GetUniqueToolbarName(const ABaseName: string): string;

Description

Use the GetUniqueToolbarName function to rename an existing toolbar or to generate a name for a toolbar which has been created via code.  In both cases the return value of this function must be assigned to the Name property of the toolbar.

The GetUniqueToolbarName function assigns a name based upon the string passed by the ABaseName parameter.

For example, if the "dxBarManagerBar" string is passed by the parameter the GetUniqueToolbarName function will generate the "dxBarManagerBarN" name, where N is the index that is given. So that the name is unique but it still shares the majority of its name with other toolbars in the current bar manager’s Bars collection.

Note:	A toolbar’s name is case sensitive.

A toolbar can be found in the bar manager’s Bars collection by its name via the BarByComponentName method.


TdxBarManager.GetUniqueToolbarCaption

TdxBarManager

Generates a unique caption for a bar manager’s toolbar adding an index to the string passed by the ABaseName parameter.

function GetUniqueToolbarCaption(const ABaseName: string): string;

Description

Use the GetUniqueToolbarCaption function to give a new caption to an existing toolbar or to generate a caption for a toolbar which has been created via code.  In both cases the return value of this function must be assigned to the Caption property of the toolbar.

This function assigns a name based on the string passed by the ABaseName parameter.

For example, if the "Bar" string is passed by the parameter the GetUniqueToolbarCaption function will generate the "BarN" caption, where N is the index that is given. So that the name is unique but it still shares the majority of its name with other toolbars in the current bar manager’s Bars collection.

Note:	The toolbar’s caption is case sensitive.

A toolbar can be found in the bar manager’s Bars collection by its caption via the BarByCaption method.


TdxBarManager.BeginUpdate

TdxBarManager            See Also

Prevents a bar manager from being updated until the EndUpdate method is called.

procedure BeginUpdate;

Description

Each time you modify a bar manager’s property which influences the appearance of toolbars and their items, the bar manager is updated to reflect these changes.  If you need to change several properties at once, flickering may occur.  In this instance you can wrap the code that makes the changes in calls to the BeginUpdate/EndUpdate methods to prevent this.

The BeginUpdate method postpones updates.  To apply the changes made, you should call the EndUpdate method.

Ensure that every call to BeginUpdate has a corresponding call to the EndUpdate method, even if an exception occurs.

Instead of the BeginUpdate and the EndUpdate methods you can use the LockUpdate property.


TdxBarManager.EndUpdate

TdxBarManager            See Also

Enables updating of a bar manager after a call to the BeginUpdate method.

procedure EndUpdate(ACheckBarsChanges: Boolean = True);

Description

Each time you modify a bar manager’s property which influences the appearance of toolbars and their items, bar manager is updated to reflect these changes.  If you need to change several properties at once, flickering may occur.  In this instance you can wrap the code that makes the changes in calls to the BeginUpdate/EndUpdate methods to prevent this.

The BeginUpdate method postpones updates.  To apply the changes made, you should call the EndUpdate method.

Ensure that every call to BeginUpdate has a corresponding call to the EndUpdate method, even if an exception occurs.

Instead of the BeginUpdate and EndUpdate methods you can use the LockUpdate property.

ACheckBarsChanges specifies whether to repaint bars if they were changed.  Set ACheckBarsChanges to True, to redraw bars.


TdxBarManagerList
TdxBarManagerList Object

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 the bar managers available within an application.  To access this list, use the dxBarManagerList global constant.


Hierarchy

TObject

|

TdxBarManagerList


TdxBarManagerList Properties

TdxBarManagerList               Legend

In 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 indexed zero-based collection which contains the reference to these TdxBarManager objects.

ReadOnly Property


TdxBarManagerList.Count

TdxBarManagerList

Returns the number of TdxBarManager objects in a TdxBarManagerList.

property Count: Integer;

Description

The Count property contains the number of the TdxBarManager objects in the BarManagers indexed zero-based collection.

ReadOnly Property


TdxBarManagerList.CustomizingBarManager

TdxBarManagerList

Returns the TdxBarManager object being customized.

property CustomizingBarManager: TdxBarManager;

Description

The CustomizingBarManager property returns the TdxBarManager which is currently being customized, that is, its Customization Form is open and IsCustomizing property is set to True.

ReadOnly Property


TCustomdxBarCombo
TCustomdxBarCombo Object

Hierarchy          Properties           Methods           Events           See Also             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):

// Delphi

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

     |

TdxBarComponent

     |

TdxBarItem

     |

TdxBarWindowItem

     |

TdxBarEdit

     |

TCustomdxBarCombo


TCustomdxBarCombo Properties

TCustomdxBarCombo               Legend

In TCustomdxBarCombo

DropDownWindow

DroppedDown

ShowEditor

Derived from TdxBarEdit

MaxLength

ReadOnly

Derived from TdxCustomBarEdit

ShowCaption

StyleEdit

Width

Derived from TdxBarWindowItem

CurText

EmptyWindow

FocusedItemLink

Text

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


TCustomdxBarCombo Methods

TCustomdxBarCombo               Legend

In TCustomdxBarCombo

AfterDropDown

CheckKeyForDropDownWindow

CloseUp

DropDown

GetDropDownWindow

Derived from TdxCustomBarEdit

WidthChanged

Derived from TdxBarWindowItem

Change

CurChange

DoEnter

DoExit

KeyDown

KeyPress

KeyUp

SetFocus

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TCustomdxBarCombo Events

TCustomdxBarCombo               Legend

In 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.

type

  TNotifyEvent = procedure(Sender : TObject) of object;

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.

type

  TNotifyEvent = procedure(Sender : TObject) of object;

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 property.

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 generates an OnDropDown event.


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.


TCustomdxBarContainerItem
TCustomdxBarContainerItem Object

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

     |

TdxBarComponent

     |

TdxBarItem

     |

TCustomdxBarSubItem

     |

TCustomdxBarContainerItem


TCustomdxBarContainerItem Properties

TCustomdxBarContainerItem               Legend

Derived from TCustomdxBarSubItem

BarSize

Detachable

DetachingBar

ItemLinks

ItemOptions

ShowCaption

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


TCustomdxBarContainerItem Methods

TCustomdxBarContainerItem               Legend

In TCustomdxBarContainerItem

AddListedItemLinks

DeleteListedItemLinks

ClearItemList

Derived from TCustomdxBarSubItem

CanContainItem

DoCloseUp

DoPopup

DropDown

GetDetachingBar

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TCustomdxBarContainerItem Events

TCustomdxBarContainerItem               Legend

In 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 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.  TCustomdxBarContainerItem 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.

type

  TNotifyEvent = procedure(Sender : TObject) of object;

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.


TCustomdxBarSubItem
TCustomdxBarSubItem Object

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, IdxBarLinksOwner, IdxBarSubMenuOwner);

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

     |

TdxBarComponent

     |

TdxBarItem

     |

TCustomdxBarSubItem


TCustomdxBarSubItem Properties

TCustomdxBarSubItem               Legend

In TCustomdxBarSubItem

BarSize

Detachable

DetachingBar

ItemLinks

ItemOptions

ShowCaption

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


TCustomdxBarSubItem Methods

TCustomdxBarSubItem               Legend

In TCustomdxBarSubItem

CanContainItem

DoCloseUp

DoPopup

DropDown

GetDetachingBar

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TCustomdxBarSubItem Events

TCustomdxBarSubItem               Legend

In 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.

Note: Detachable submenus are disabled in the Ribbon control.

The default value of the Detachable property 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 of the DetachingBar property is -1.


TCustomdxBarSubItem.ItemOptions

TCustomdxBarSubItem

Provides access to appearance settings of items in the submenu.

property ItemOptions: TdxBarItemOptions;

Description

This property uses the ItemLinks.ItemOptions property to provide the required functionality.


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.

type

  TNotifyEvent = procedure(Sender : TObject) of object;

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 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; otherwise, it returns False.  Self-reference is not available.


TdxBarButton
TdxBarButton Object

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, IdxBarLinksOwner);

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

     |

TdxBarComponent

     |

TdxBarItem

     |

TdxBarButton


TdxBarButton Properties

TdxBarButton               Legend

In TdxBarButton

AllowAllUp

ButtonStyle

CloseSubMenuOnClick

Down

DropDownEnabled

DropDownMenu

GroupIndex

Lowered

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


TdxBarButton Methods

TdxBarButton               Legend

In TdxBarButton

ButtonStyleChanged

CanChangePaintStyle

Click

DownChanged

DoDropDown

DropDownEnabledChanged

PaintStyleChanged

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

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 instance, the sub menu buttons function as check buttons.  In this instance, 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 or bsCheckedDropDown.


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 or bsCheckedDropDown) if they are grouped with the GroupIndex property.  If AllowAllUp is True, 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, bsCheckedDropDown);

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 (a button with a dropdown menu).
bsCheckedDropDown	A toggle button with a dropdown menu.

The default value of the ButtonStyle property is bsDefault.


TdxBarButton.DropDownEnabled

TdxBarButton            See Also

Specifies whether the dropdown menu can be activated.

property DropDownEnabled: Boolean;

Description

DropDownEnabled applies only if the ButtonStyle is bsDropDown or bsCheckedDropDown.  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.

The default value of the DropDownEnabled property is 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 or bsCheckedDropDown).  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 or bsCheckedDropDown).  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 or bsCheckedDropDown).  It specifies the popup menu of the TdxBarPopupMenu type that drops down when the arrow button is pressed.


TdxBarItem.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 and bsCheckedDropDown).  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 and bsCheckedDropDown 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.


TdxBarButton.Click

TdxBarButton            See Also

Emulates mouse clicks over the current toolbar button.

procedure Click; override;

Description

Use the Click method for toolbar buttons whose style is bsChecked or bsCheckedDropDown.  This method changes their state using the Down property, and then fires the OnClick event and the bar managar’s OnClickItem event.

If a button style is not bsChecked or bsCheckedDropDown, the Click method only fires the OnClick and OnClickItem events (in doing this it calls the inherited Click method).


TdxBarCombo
TdxBarCombo Object

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

     |

TdxBarComponent

     |

TdxBarItem

     |

TdxBarWindowItem

     |

TdxBarEdit

     |

TCustomdxBarCombo

     |

TdxBarCustomCombo

     |

TdxBarCombo


TdxBarCombo Properties

TdxBarCombo               Legend

Derived from TdxBarCustomCombo

Canvas

CurItemIndex

DropDownCount

DropDownWidth

ItemHeight

ItemIndex

Items

ItemsHeight

ListBox

Sorted

Derived from TCustomdxBarCombo

DropDownWindow

DroppedDown

ShowEditor

Derived from TdxBarEdit

MaxLength

ReadOnly

Derived from TdxCustomBarEdit

ShowCaption

StyleEdit

Width

Derived from TdxBarWindowItem

CurText

EmptyWindow

FocusedItemLink

Text

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


TdxBarCombo Methods

TdxBarCombo               Legend

Derived from TdxBarCustomCombo

DrawItem

GetDropDownWidth

MeasureItem

MeasureItemWidth

Derived from TCustomdxBarCombo

AfterDropDown

CheckKeyForDropDownWindow

CloseUp

DropDown

GetDropDownWindow

Derived from TdxCustomBarEdit

WidthChanged

Derived from TdxBarWindowItem

Change

CurChange

DoEnter

DoExit

KeyDown

KeyPress

KeyUp

SetFocus

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

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


TdxBarComponent
TdxBarComponent Object

Hierarchy          Properties

The TdxBarComponent class is the special base class for such classes as TdxBarItem, TdxBarGroup and TdxBarCustomPopupMenu.

Unit

dxBar

TdxBarComponent = class(TComponent)

Description

The TdxBarComponent class provides a common behavior to the above classes – the current component’s visible states (see the Visible property) and its availability to end-users (see the Enabled property).


TdxBarComponent Hierarchy
Hierarchy

TComponent

     |

TdxBarComponent


Properties for TdxBarComponent
TdxBarComponent Properties

TdxBarComponent          Legend

In TdxBarComponent

BarManager

Enabled

Visible


TdxBarComponent.BarManager

TdxBarComponent

Provides access to the bar manager which the current component belongs to.

property BarManager: TdxBarManager;

Description

Use the BarManager property to access the bar manager to which the current component belongs.

ReadOnly Property


TdxBarComponent.Enabled

TdxBarComponent

Specifies whether the current component responds to the mouse, keyboard, and timer events.

property Enabled: Boolean;

Description

Use the Enabled property to change the component’s availability to the end-users.  To disable a component, set the Enabled property to False.


TdxBarComponent.Visible

TdxBarComponent

Specifies the visible state of the current component.

type

  TdxBarItemVisible = (ivNever, ivInCustomizing, ivAlways);

property Visible: TdxBarItemVisible;

Description

The following table provides description of the states available:

Value	Meaning
ivAlways	A component is visible at design time and runtime.
ivNever	A component is not visible at runtime.
ivInCustomizing	A component is visible only during toolbar customization.


TdxBarContainerItem
TdxBarContainerItem Object

Hierarchy            Properties           Methods           Events           See Also            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 populating 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

|

TdxBarComponent

|

TdxBarItem

|

TdxBarButton

|

TdxBarWindowItem

|

TdxBarEdit

|

TcustomdxBarCombo

|

TdxBarCombo

|

TCustomdxBarSubItem

|

TCustomdxBarContainerItem

|

TdxBarContainerItem


TdxBarContainerItem Properties

TdxBarContainerItem               Legend

Derived from TCustomdxBarSubItem

BarSize

Detachable

DetachingBar

ItemLinks

ItemOptions

ShowCaption

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


TdxBarContainerItem Methods

TdxBarContainerItem               Legend

In TdxBarContainerItem

AddListedItemLinks

DeleteListedItemLinks

Derived from TCustomdxBarContainerItem

AddListedItemLinks

DeleteListedItemLinks

ClearItemList

Derived from TCustomdxBarSubItem

CanContainItem

DoCloseUp

DoPopup

DropDown

GetDetachingBar

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

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 current container item’s ItemLinks.Items property.

AIndex specifies the position in the destination item links at which the addition starts.

FirstCall specifies whether the OnGetData event is generated.

Note:	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 TdxBarItemLinks collection 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.


TdxBarCustomCombo
TdxBarCustomCombo Object

Hierarchy          Properties           Methods           Events          See Also

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

     |

TdxBarComponent

     |

TdxBarItem

     |

TdxBarWindowItem

     |

TdxBarEdit

     |

TCustomdxBarCombo

     |

TdxBarCustomCombo


TdxBarCustomCombo Properties

TdxBarCustomCombo               Legend

In TdxBarCustomCombo

Canvas

CurItemIndex

DropDownCount

DropDownWidth

ItemHeight

ItemIndex

Items

ItemsHeight

ListBox

Sorted

Derived from TCustomdxBarCombo

DropDownWindow

DroppedDown

ShowEditor

Derived from TdxBarEdit

MaxLength

ReadOnly

Derived from TdxCustomBarEdit

ShowCaption

StyleEdit

Width

Derived from TdxBarWindowItem

CurText

EmptyWindow

FocusedItemLink

Text

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


TdxBarCustomCombo Methods

TdxBarCustomCombo               Legend

In TdxBarCustomCombo

DrawItem

GetDropDownWidth

MeasureItem

MeasureItemWidth

Derived from TCustomdxBarCombo

AfterDropDown

CheckKeyForDropDownWindow

CloseUp

DropDown

GetDropDownWindow

Derived from TdxCustomBarEdit

WidthChanged

Derived from TdxBarWindowItem

Change

CurChange

DoEnter

DoExit

KeyDown

KeyPress

KeyUp

SetFocus

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarCustomCombo Events

TdxBarCustomCombo               Legend

In 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; oterwise, 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; otherwise 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 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 Items array.  AWidth corresponds to the width of the listbox item.  The 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 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.


TdxBarEdit
TdxBarEdit Object

Hierarchy          Properties           Methods           Events           See Also            Example

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

Unit

dxBar

TdxBarEdit = class(TdxCustomBarEdit);

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

     |

TdxBarComponent

     |

TdxBarItem

     |

TdxBarWindowItem

     |

TdxCustomBarEdit

     |

TdxBarEdit


TdxBarEdit Properties

TdxBarEdit               Legend

In TdxBarEdit

MaxLength

ReadOnly

Derived from TdxCustomBarEdit

ShowCaption

StyleEdit

Width

Derived from TdxBarWindowItem

CurText

EmptyWindow

FocusedItemLink

Text

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


TdxBarEdit Methods

TdxBarEdit               Legend

Derived from TdxCustomBarEdit

WidthChanged

Derived from TdxBarWindowItem

Change

CurChange

DoEnter

DoExit

KeyDown

KeyPress

KeyUp

SetFocus

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

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

TdxBarEditTdxBarEdit>Main          See Also!AL("TdxBarItemLink.UserWidth",0,’’,’’)

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.


TdxBarItem
TdxBarItem Object

Hierarchy          Properties           Methods           Events           See Also            Example

Represents a generic bar item.

Unit

dxBar

TdxBarItem = class(TdxBarComponent);

Description

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

To customize the appearance of each item, use the item’s Style property.  The style of editors embedded into the bar can be modified via the editor’s StyleEdit property.

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

     |

TdxBarComponent

     |

TdxBarItem


TdxBarItem Properties

TdxBarItem               Legend

In TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

ShowCaption

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


TdxBarItem Methods

TdxBarItem               Legend

In TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarItem Events

TdxBarItem               Legend

In 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.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 SelectedControl 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          See Also

Specifies an object that contains arbitrary data associated with the item.

property Data: TObject;

Description

You can handle an item’s OnCreate and OnDestroy events to initialize this property before creating the item and dispose of this property before destroying the item.


TdxBarItem.Glyph

TdxBarItem          See Also

Specifies the glyph that is displayed when this item’s link represents a standard size (16 by 16 pixels) item control.

property Glyph: TBitmap;

Description

If the glyph is specified, the ImageIndex property is ignored.  Changing the Glyph property calls the GlyphChanged method.

Note:	The specified glyph is also used for enlarged standard size buttons if the following conditions are met:

•	large icons are not assigned to these buttons via their LargeGlyph property;

•	a bar manager’s ImageOptions.UseLargeImagesForLargeIcons option is disabled.


TdxBarItem.ImageIndex

TdxBarItem            See Also

Specifies the image that is displayed when the item’s link represents a standard size (16 by 16 pixels) item control.

property ImageIndex: Integer;

Description

Use this property to associate an item with an image in the bar manager’s ImageOptions.Images, ImageOptions.LargeImages or ImageOptions.HotImages properties.  The specified image is displayed, provided that the Glyph property is unassigned.

Note:	The specified image is also used for enlarged standard size buttons if the following conditions are met:

•	large icons are not assigned to these buttons via their LargeGlyph and LargeImageIndex properties;

•	a bar manager’s ImageOptions.UseLargeImagesForLargeIcons option is disabled.


TdxBarItem.Index

TdxBarItem            See Also

Specifies item index in a bar manager’s item list.

property Index: Integer;

Description

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


TdxBarItem.KeyTip

TdxBarItem

Specifies a KeyTip for the current item’s links.

property KeyTip: string;

Description


TdxBarItem.LargeGlyph

TdxBarItem          See Also

Specifies the glyph that is displayed when this item’s link represents a large button, enlarged standard size button, or large size menu item.

property LargeGlyph: TBitmap;

Description

If the glyph is specified, the LargeImageIndex property is ignored.  Changing the LargeGlyph property calls the LargeGlyphChanged method.

The specified glyph is used for enlarged standard size buttons, if a bar manager’s ImageOptions.UseLargeImagesForLargeIcons option is enabled.

Use the Glyph property to specify a standard size glyph (16 by 16 pixels) for the current bar item.

Note:	The suggested size of large glyphs is 32 by 32 pixels.


TdxBarItem.LargeImageIndex

TdxBarLargeButton            See Also

Specifies the image that is displayed when this item’s link represents a large button, enlarged standard size button, or large size menu item.

property LargeImageIndex: Integer;

Description

The property value corresponds to an image index within a bar manager’s ImageOptions.LargeImages collection of large images.  The specified image is displayed, provided that the LargeGlyph property is unassigned.  For enlarged standard size buttons, this image is displayed if a bar manager’s ImageOptions.UseLargeImagesForLargeIcons option is enabled.

Use the ImageIndex property to specify a standard size image (16 by 16 pixels) for the current bar item.

For large buttons, if the LargeImageIndex property is set to –1, the image displayed by the link is determined by the HotImageIndex property.  If the HotImageIndex property is also set to –1, no image is displayed by the item control.

The default value of the LargeImageIndex property is –1.


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 Links array to specify an item link between this TdxBarItem and the item control on the toolbar.


TdxBarItem.MergeKind

TdxBarItem          See Also          Concepts

Specifies how the current bar item will be merged into another bar.

type

  TdxBarItemMergeKind = (mkAdd, mkMergeByCaption, mkNone);

property MergeKind: TdxBarItemMergeKind;

Description

Refer to the description of TdxBarItemMergeKind to learn about the available placement options.

The default value of the MergeKind property is mkAdd.


TdxBarItem.MergeOrder

TdxBarItem          See Also          Concepts

Specifies the relative visual position of the item among items in the merging bar.

property MergeOrder: Integer;

Description

The original and merged items are arranged in the bar in ascending order (based upon the MergeOrder property values of those items), provided that the MergeKind property of that items is set to mkAdd.

The default value of the MergeOrder property is 0.


TdxBarItem.ScreenTip

TdxBarItem          See Also

References a ScreenTip associated with the currently processed bar item.

property ScreenTip: TdxBarScreenTip;

Description

The TdxBarScreenTip class implements an enhanced ScreenTip.  A ScreenTip window can contain three sections – header (see the Header property), description (see the Description property) and footer (see the Footer property).

Each section can display an explanatory image (see the section’s Glyph property), descriptive text (see the section’s Text property) and keyboard shortcut (see the bar item’s ShortCut property).

To display a common footer across a number of ScreenTips, specify footer information via the ScreenTip repository’s StandardFooter property, and toggle the UseStandardFooter property of specific ScreenTips.

If there are no specific details to be shown in the ScreenTip’s header, toggle the ScreenTip’s UseHintAsHeader property to display a hint in this section specified by the bar item’s Hint property.

To customize the width of the ScreenTip’s window, use the ScreenTip’s Width property.

From the ScreenTip instance you can access other ScreenTips through the ScreenTip’s Collection property.

Note: the specified ScreenTip is only applied in Ribbon.

Use the ScreenTip property to set an associated ScreenTip.


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.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          Example

Determines the category to which a given TdxBarItem belongs.

property Category: Integer;

Description

The category is identified by its name and zero-based index in a bar manager’s Categories collection.


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.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 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 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          See Also

Called after a source of images for the current bar item has been changed.

procedure GlyphChanged; virtual;

Description

This method is called when one of the following properties has been changed:

•	the item’s Glyph property;

•	a bar manager’s ImageOptions.Images or ImageOptions.DisabledImages property (provided that the item’s ImageIndex is set to a value other than –1).


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

Called after a source of hot images for the current bar item has been changed.

procedure HotGlyphChanged; virtual;

Description

This method is called when a bar manager’s ImageOptions.HotImages property has been changed (provided that the item’s UseHotImages function returns True).


TdxBarItem.LargeGlyphChanged

TdxBarItem            See Also

Called after a source of large images for the current bar item has been changed.

procedure LargeGlyphChanged; virtual;

Description

This method is called when one of the following properties has been changed:

•	the item’s LargeGlyph property;

•	a bar manager’s ImageOptions.LargeImages or ImageOptions.DisabledLargeImages property (provided that the item’s UseLargeImages function returns True).


TdxBarItem.ShortCutChanged

TdxBarItem            See Also

This procedure is called when a shortcut changes.

procedure ShortCutChanged; virtual;

Description

Keyboard shortcuts enable users to perform actions without directly accessing the control via key combinations.  Each time a 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’s LargeImages list.

function UseLargeImages: Boolean; virtual;

Description

For this class UseLargeImages returns False.


TdxBarItem.VisibleChanged

TdxBarItem

This procedure is called when the 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 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 the bar item belongs to a TdxBarManager category.

function HasParent: Boolean; override;

Description

This property returns True when the item’s 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.

type

  TNotifyEvent = procedure(Sender : TObject) of object;

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.

type

  TNotifyEvent = procedure(Sender : TObject) of object;

property OnClick: TNotifyEvent;

Description

Handle this event to respond to click events.  This event is fired after a bar manager’s OnClickItem event.

Note for TdxBarWindowItem descendants: Being placed on a vertical toolbar, whose RotateWhenVertical is set to 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.  Otherwise, this event is not fired.


TdxBarItem.OnDestroy

TdxBarItem            See Also

This event occurs before a TdxBarItem object is destroyed.

type

  TNotifyEvent = procedure(Sender : TObject) of object;

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.


TdxBarItem.Style

TdxBarItem            See Also

Specifies the appearance of the current toolbar item.

property Style: TcxStyle;

Description

The Style property provides look & feel options for the current toolbar item.  It allows you to specify the background color (bitmap), font settings and text color.

Refer to the description of the TcxStyle class, for detailed information on how to change the appearance of a particular item.

A style can be applied to other items via the Style property of each item.  To assign font settings to all bar manager’s items at the same time, use the bar manager’s Font property.

The value of the Style property can be assigned to the StyleEdit property of in-place editors.


TdxBarItem.GetCurImages

TdxBarItem          See Also

Returns the image list that is used when the current toolbar item is painted.

type

  TCurImageList = TCustomImageList;

function GetCurImages: TCurImageList; virtual;

Description

By default, the GetCurImages function returns an image list associated with the bar manager that owns the current bar item.  You can override this function to provide a custom image list for the item.  Use the ImageIndex property to associate the item with an image from the specified image list.


TdxBarListItem
TdxBarListItem Object

Hierarchy          Properties           Methods          Events           See Also          Example 1          Example 2          Example 3

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

     |

TdxBarComponent

     |

TdxBarItem

     |

TCustomdxBarSubItem

     |

TCustomdxBarContainerItem

     |

TdxBarListItem


TdxBarListItem Properties

TdxBarListItem               Legend

In TdxBarListItem

DataIndex

ItemIndex

ItemList

Items

ShowCheck

ShowNumbers

Derived from TCustomdxBarSubItem

BarSize

Detachable

DetachingBar

ItemLinks

ItemOptions

ShowCaption

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


TdxBarListItem Methods

TdxBarListItem               Legend

In TdxBarListItem

DirectClick

Derived from TCustomdxBarContainerItem

AddListedItemLinks

DeleteListedItemLinks

ClearItemList

Derived from TCustomdxBarSubItem

CanContainItem

DoCloseUp

DoPopup

DropDown

GetDetachingBar

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

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 group 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.


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.


TdxBarListItem.DirectClick

TdxBarListItem            See Also

Processes mouse clicks over the list item located in a submenu.

procedure DirectClick; override;

Description

A list item can be placed on a toolbar and a submenu.  Use the DirectClick method to process mouse clicks over the current list item placed in a submenu.

The DirectClick method fires a bar manager’s OnClickItem event, and calls the DoClick method to fire the OnClick event.

If a list item is placed on a toolbar, the DirectClick method doesn’t implement any actions.


TdxBarListItem.ItemList

TdxBarListItem            See Also

Returns a list of item controls that represent items in the current item list, and items located in the item list control.

property ItemList: TList;

Description

By right-clicking either a submenu that contains a list item, or a list item on a toolbar, an end-user can invoke a popup menu that contains strings (items of the item list).  These strings are represented by toolbar buttons whose captions are the values of the Items property.

The ItemList property provides access to the list of these toolbar buttons.

ReadOnly Property


TdxBarSubItem
TdxBarSubItem Object

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.

In addition to publishing properties inherited from the base TCustomdxBarSubItem class, the TdxBarSubItem class introduces the AllowCustomizing property that allows you to control the availability of sub item customization for end-users.


Hierarchy

TComponent

     |

TdxBarComponent

     |

TdxBarItem

     |

TCustomdxBarSubItem

     |

TdxBarSubItem


TdxBarSubItem Properties

TdxBarSubItem               Legend

In TdxBarSubItem

AllowCustomizing

Derived from TCustomdxBarSubItem

BarSize

Detachable

DetachingBar

ItemLinks

ItemOptions

ShowCaption

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


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

GetCurImages

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.


TdxBarWindowItem
TdxBarWindowItem Object

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

     |

TdxBarComponent

     |

TdxBarItem

     |

TdxBarWindowItem


TdxBarWindowItem Properties

TdxBarWindowItem               Legend

In TdxBarWindowItem

CurText

EmptyWindow

FocusedItemLink

Text

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


TdxBarWindowItem Methods

TdxBarWindowItem               Legend

In TdxBarWindowItem

Change

CurChange

DoEnter

DoExit

KeyDown

KeyPress

KeyUp

SetFocus

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarWindowItem Events

TdxBarWindowItem               Legend

In 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 for internal use only.  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 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.

type

  TNotifyEvent = procedure(Sender : TObject) of object;

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.

type

  TNotifyEvent = procedure(Sender : TObject) of object;

property OnCurChange: TNotifyEvent;

Description

This event occurs after modifying text in an active item control - text is defined by the CurText 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.


TdxBarWindowItem.SetFocus

TdxBarWindowItem

Focuses an item control associated with the current windowed item.

procedure SetFocus(ACheckBarControlVisibility: Boolean = False); virtual;

Description

A toobar item can have several item controls that can be accessed through the Links property.  The SetFocus method focuses the item control that corresponds to the first item link within the item links collection of the current windowed item.  The toolbar (that owns it) is focused as well.

The item control that corresponds to the current item is not focused when the ACheckBarControlVisibility parameter is set to False, and the toolbar to which the item control belongs is not visible.

To refer to the focused item control, use the FocusedItemLink property.


TdxBarLabel
TdxBarLabel Object

Hierarchy          Properties           Methods           Events          See Also

Represents a label in toolbars and menus.

Unit

dxBar

TdxBarLabel = class(TdxBarItem);

Description

Labels cannot receive focus in a running application, and only used for informational purposes.

The TdxBarLabel class introduces a ShowCaption property, which controls the visibility of the label’s text, and enables this property by default.

This class is the base class for the TdxBarSeparator class.


Hierarchy

TComponent

     |

TdxBarComponent

     |

TdxBarItem

     |

TdxBarLabel


Properties for TdxBarLabel
TdxBarLabel Properties

TdxBarLabel               Legend

In TdxBarLabel

ShowCaption

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


Methods for TdxBarLabel
TdxBarLabel Methods

TdxBarLabel               Legend

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


Events for TdxBarLabel
TdxBarLabel Events

TdxBarLabel               Legend

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TdxBarLabel.ShowCaption

TdxBarLabel

Toggles the visibility of the label item’s caption.

property ShowCaption: Boolean;

Description

Set this property to True to display the label item’s caption specified via the Caption property.  Otherwise, it will be hidden.

The default value of the ShowCaption property is True.


TdxBarSeparator
TdxBarSeparator Object

Hierarchy          Properties           Methods           Events          See Also

Represents an item separator in toolbar and Ribbon context menus (see TdxBarPopupMenu, TdxRibbonPopupMenu and TdxBarApplicationMenu) and toolbar subitems (see TCustomdxBarSubItem).

Unit

dxBar

TdxBarSeparator = class(TdxBarLabel);

Description

Compared with a group separator, an item separator is displayed as a label, providing additional information on menu items that follow it.

This class does not introduce any new functionality, but instead publishes the ShowCaption property, which is inherited from the base class.


Hierarchy

TComponent

     |

TdxBarComponent

     |

TdxBarItem

     |

TdxBarLabel

     |

TdxBarSeparator


Properties for TdxBarSeparator
TdxBarSeparator Properties

TdxBarSeparator               Legend

Derived from TdxBarLabel

ShowCaption

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

ShowCaption

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


Methods for TdxBarSeparator
TdxBarSeparator Methods

TdxBarSeparator               Legend

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


Events for TdxBarSeparator
TdxBarSeparator Events

TdxBarSeparator               Legend

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TCustomdxBarComboControl
TCustomdxBarComboControl Object

Hierarchy          Properties           Methods          See Also

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 TdxBarComboControl or TdxBarDateComboControl (item controls for the TdxBarCombo and TdxBarDateCombo items).


Hierarchy

TObject

     |

TdxBarItemControl

     |

TdxBarWinControl

     |

TdxCustomBarEditControl

     |

TdxBarEditControl

     |

TCustomdxBarComboControl


TCustomdxBarComboControl Properties

TCustomdxBarComboControl               Legend

In TCustomdxBarComboControl

DropDownButtonRect

DropDownWindow

DroppedDown

Item

Derived from TdxBarEditControl

Item

MaxLength

ReadOnly

Derived from TdxCustomBarEditControl

CaptionWidth

ShowCaption

Derived from TdxBarWinControl

Focused

Handle

Item

Text

WindowRect

Derived from TdxBarItemControl

BarManager

 	Caption

Enabled

Glyph

Height

Hint

IsActive

IsSelected

ImageIndex

Item

ItemLink

PainterClass

Parent

Pressed

ShortCut

Width


TCustomdxBarComboControl Methods

TCustomdxBarComboControl               Legend

In TCustomdxBarComboControl

ControlInactivate

Derived from TdxBarWinControl

CanClicked

ControlClick

HasWindow

IsDestroyOnClick

WndProc

Derived from TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

HasWindow

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged

WidthChanged


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.


TdxBarButtonControl
TdxBarButtonControl Object

Hierarchy          Properties           Methods          See Also

Represents a button control on the toolbar.

Unit

dxBar

TdxBarButtonControl = class(TdxBarButtonLikeControl);

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

     |

TdxBarButtonLikeControl

     |

TdxBarButtonControl


TdxBarButtonControl Properties

TdxBarButtonControl               Legend

In TdxBarButtonControl

ButtonStyle

Down

DropDownEnabled

DroppedDown

GroupIndex

Item

PaintStyle

Derived from TdxBarButtonLikeControl

SubMenuControl

Derived from TdxBarItemControl

BarManager

 	Caption

Enabled

Glyph

Height

Hint

IsActive

IsSelected

ImageIndex

Item

ItemLink

PainterClass

Parent

Pressed

ShortCut

Width


TdxBarButtonControl Methods

TdxBarButtonControl               Legend

In 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

HasWindow

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged

WidthChanged


TdxBarButtonControl.ButtonStyle

TdxBarButtonControl            See Also

Returns the style of a given button control.

type

  TdxBarButtonStyle = (bsDefault, bsChecked, bsDropDown, bsCheckedDropDown);

property ButtonStyle: TdxBarButtonStyle;

Description

The 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 or bsCheckedDropDown, this property returns the Down property of the underlying TdxBarButton item.  Otherwise, the Down property returns 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 returns True, if a bsDropDown or bsCheckedDropDown style button dropdown window is active (see the TdxBarButton.ButtonStyle topic for details).  Otherwise, this property 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 or bsCheckedDropDown, 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 (for instance, 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 and bsCheckedDropDown style buttons.  If ButtonStyle is not equal to bsDropDown or bsCheckedDropDown 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 and bsCheckedDropDown 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 or bsCheckedDropDown, 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.


TdxBarComboControl
TdxBarComboControl Object

Hierarchy          Properties           Methods          See Also

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

     |

TdxCustomBarEditControl

     |

TdxBarEditControl

     |

TCustomdxBarComboControl

     |

TdxBarComboControl


TdxBarComboControl Properties

TdxBarComboControl               Legend

In TdxBarComboControl

ItemIndex

Item

Items

LocalItemIndex

Sorted

Derived from TCustomdxBarComboControl

DropDownButtonRect

DropDownWindow

DroppedDown

Item

Derived from TdxBarEditControl

Item

MaxLength

ReadOnly

Derived from TdxCustomBarEditControl

CaptionWidth

ShowCaption

Derived from TdxBarWinControl

Focused

Handle

Item

Text

WindowRect

Derived from TdxBarItemControl

BarManager

 	Caption

Enabled

Glyph

Height

Hint

IsActive

IsSelected

ImageIndex

Item

ItemLink

PainterClass

Parent

Pressed

ShortCut

Width


TdxBarComboControl Methods

TdxBarComboControl               Legend

Derived from TCustomdxBarComboControl

ControlInactivate

Derived from TdxBarWinControl

CanClicked

ControlClick

HasWindow

IsDestroyOnClick

WndProc

Derived from TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

HasWindow

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged

WidthChanged


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.  The 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.


TdxBarContainerItemControl
TdxBarContainerItemControl Object

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


TdxBarContainerItemControl Properties

TdxBarContainerItemControl               Legend

In TdxBarContainerItemControl

Item

Derived from TdxBarSubMenuControl

Item

Derived from TdxBarButtonLikeControl

SubMenuControl

Derived from TdxBarItemControl

BarManager

 	Caption

Enabled

Glyph

Height

Hint

IsActive

IsSelected

ImageIndex

Item

ItemLink

PainterClass

Parent

Pressed

ShortCut

Width


TdxBarContainerItemControl Methods

TdxBarContainerItemControl               Legend

In TdxBarContainerItemControl

CreateSubMenuControl

Derived from TdxBarSubMenuControl

GlyphChanged

CanClicked

ControlClick

CreateSubMenuControl

GetDefaultHeight

GetDefaultWidth

Derived from TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

HasWindow

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged

WidthChanged


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.


TdxBarEditControl
TdxBarEditControl Object

Hierarchy          Properties           Methods          See Also

Represents a toolbar edit control.

Unit

dxBar

TdxBarEditControl = class(TdxCustomBarEditControl);

Description

TdxBarEditControl represents TdxBarEdit items on toolbars.  TdxBarEditControl is the ancestor for TCustomdxBarCombo.


Hierarchy

TObject

     |

TdxBarItemControl

     |

TdxBarWinControl

     |

TdxCustomBarEditControl

     |

TdxBarEditControl


TdxBarEditControl Properties

TdxBarEditControl               Legend

In TdxBarEditControl

Item

MaxLength

ReadOnly

Derived from TdxCustomBarEditControl

CaptionWidth

ShowCaption

Derived from TdxBarWinControl

Focused

Handle

Item

Text

WindowRect

Derived from TdxBarItemControl

BarManager

 	Caption

Enabled

Glyph

Height

Hint

IsActive

IsSelected

ImageIndex

Item

ItemLink

PainterClass

Parent

Pressed

ShortCut

Width


TdxBarEditControl Methods

TdxBarEditControl               Legend

Derived from TdxBarWinControl

CanClicked

ControlClick

HasWindow

IsDestroyOnClick

WndProc

Derived from TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

HasWindow

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged

WidthChanged


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.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


TdxBarItemControl.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.


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


TdxBarItemControl Properties

TdxBarItemControl               Legend

In TdxBarItemControl

BarManager

 	Caption

Enabled

Glyph

Height

Hint

IsActive

IsSelected

ImageIndex

Item

ItemLink

PainterClass

Parent

Pressed

ShortCut

Width


TdxBarItemControl Methods

TdxBarItemControl               Legend

In TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

HasWindow

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged

WidthChanged


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

Returns the index of a picture associated with an item from an image list.  This picture is drawn on the item control.

property ImageIndex: Integer;

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.


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 the item control’s caption.

property Caption: string;

Description

Use the item link’s 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 the Enabled property of the underlying item to False to disable an item control.  In this instance, 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

Returns the item control’s hint text.

property Hint: string;

Description

This property refers to the Hint property of an underlying item.

ReadOnly Property


TdxBarItemControl.Glyph

TdxBarItemControl            See Also

Returns the item control’s glyph.

property Glyph: TBitmap;

Description

This property depends upon the Glyph property of the underlying item, and the UserGlyph property of the item link associated with the item control.

The appearance of the glyph on the item control depends upon the TdxBarItemLink.PaintStyle property.

ReadOnly Property


TdxBarItemControl.ShortCut

TdxBarItemControl            See Also

Returns the item control’s shortcut.

property ShortCut: TShortCut;

Description

This property refers to the ShortCut property of an 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

Provides access to a bar manager to which the item control belongs.

property BarManager: TdxBarManager;

ReadOnly Property


TdxBarItemControl.HasWindow

TdxBarItemControl            See Also

Determines whether the current item control is a windowed control.

class function HasWindow: Boolean; virtual;

Description

The HasWindow property returns False for this class.  Some descendants of this class represent windowed item controls (the TdxBarWinControl’s family).  For them, the HasWindow property returns False.

Some actions can be implemented only with windowed items.  Use this function to determine whether the currently processed item control can perform these actions.


TdxBarItemControl.IsActive

TdxBarItemControl          See Also

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 move 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:

Use the dxBarMakeInactiveImagesDingy global variable, to specify how icons in inactive item controls are displayed.

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.  The IsSelected is a ReadOnly property.  As shown in the following diagrams, IsSelected is not the same as the IsActive property:


TdxBarItemControl.Item

TdxBarItemControl

Provides access to an underlying item associated with the item control.

property Item: TdxBarItem;

Description

You can also access the underlying item via 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

This method 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 SelectedControl property of the TCustomdxBarControl 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 RepaintBar 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; otherwise, the item control is inactive.  The 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 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. The 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.  The IsDestroyOnClick method always returns True.


TdxBarItemControl.Paint

TdxBarItemControl           Example

Paints an item control.

type

  TdxBarPaintType = (ptHorz, ptMenu, ptVert);

procedure Paint(ACanvas: TcxCanvas; ARect: TRect; PaintType: TdxBarPaintType);

Description

Descendants can override the DoPaint method, which is called by the Paint method to draw bar items that they represent on ACanvas.

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 SelectedControl 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.


TdxBarItemControl.PainterClass

TdxBarItemControl          See Also

Provides access to the class used to paint the current item control.

type

  TdxBarItemControlPainterClass = class of TdxBarPainter;

property PainterClass: TdxBarItemControlPainterClass;

Description

The possible values of this property include: TdxBarStandardPainter, TdxBarFlatPainter, TdxBarOffice11Painter, TdxBarXPPainter, and TdxBarSkinnedPainter.

These classes implement drawing primitives using the Standard, Flat, MSOffice11, Windows XP look & feel, and skin options respectively.

Refer to the description of the TdxBarPainter class for more information on paint styles.

Note: To access the class used to draw all of the bar manager’s toolbars and their items, use the bar manager’s PainterClass property.

ReadOnly Property


TdxBarButtonLikeControl
TdxBarButtonLikeControl Object

Hierarchy          Properties           Methods          See Also

Represents the base class for clickable item controls, such as buttons and submenu items.

Unit

dxBar

TdxBarButtonLikeControl = class(TdxBarItemControl);

Description

This class is the base class for buttons and submenu items represented by the TdxBarButtonControl and TdxBarSubItemControl classes.

The TdxBarButtonLikeControl class introduces a SubMenuControl property, which provides access to the submenu that appears when the item control is clicked.


Hierarchy

TObject

     |

TdxBarItemControl

     |

TdxBarButtonLikeControl


TdxBarButtonLikeControl Properties

TdxBarSubItemControl               Legend

In TdxBarButtonLikeControl

SubMenuControl

Derived from TdxBarItemControl

BarManager

Caption

Enabled

Glyph

Height

Hint

IsActive

IsSelected

ImageIndex

Item

ItemLink

PainterClass

Parent

Pressed

ShortCut

Width


TdxBarButtonLikeControl Methods

TdxBarSubItemControl               Legend

Derived from TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

HasWindow

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged

WidthChanged


TdxBarButtonLikeControl.SubMenuControl

TdxBarSubItemControl            See Also

Provides access to the submenu that appears when the item control is clicked.

property SubMenuControl: TdxBarSubMenuControl;

Description

By default, this property returns nil.  TdxBarButtonLikeControl descendants that represent submenus initialize this property to return a submenu associated with the item control.

ReadOnly Property


TdxBarSubItemControl
TdxBarSubItemControl Object

Hierarchy          Properties           Methods          See Also

Represents a subitem on a toolbar.

Unit

dxBar

TdxBarSubItemControl = class(TdxBarButtonLikeControl);

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 and TdxBarToolbarsListItemControl classes.


Hierarchy

TObject

     |

TdxBarItemControl

     |

TdxBarButtonLikeControl

     |

TdxBarSubItemControl


TdxBarSubItemControl Properties

TdxBarSubItemControl               Legend

In TdxBarSubItemControl

Item

Derived from TdxBarButtonLikeControl

SubMenuControl

Derived from TdxBarItemControl

BarManager

 	Caption

Enabled

Glyph

Height

Hint

IsActive

IsSelected

ImageIndex

Item

ItemLink

PainterClass

Parent

Pressed

ShortCut

Width


TdxBarSubItemControl Methods

TdxBarSubItemControl               Legend

In TdxBarSubItemControl

GlyphChanged

CanClicked

ControlClick

CreateSubMenuControl

GetDefaultHeight

GetDefaultWidth

Derived from TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

HasWindow

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged

WidthChanged


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.GlyphChanged

TdxBarSubItemControl            See Also

This method is called when the glyph drawn on an item control is changed.

procedure GlyphChanged; override;

Description

The 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 TCustomdxBarSubItem 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.


TdxBarWinControl
TdxBarWinControl Object

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, TCustomdxBarComboControl, TdxBarComboControl classes derive methods and properties from the TdxBarWinControl class.


Hierarchy

TObject

     |

TdxBarItemControl

     |

TdxBarWinControl


TdxBarWinControl Properties

TdxBarWinControl               Legend

In TdxBarWinControl

Focused

Handle

Item

Text

WindowRect

Derived from TdxBarItemControl

BarManager

 	Caption

Enabled

Glyph

Height

Hint

IsActive

IsSelected

ImageIndex

Item

ItemLink

PainterClass

Parent

Pressed

ShortCut

Width


TdxBarWinControl Methods

TdxBarWinControl               Legend

In TdxBarWinControl

CanClicked

ControlClick

HasWindow

IsDestroyOnClick

WndProc

Derived from TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

HasWindow

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged

WidthChanged


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.


TdxBarWinControl.HasWindow

TdxBarWinControl            See Also

Determines whether the current item control is a windowed control.

class function HasWindow: Boolean; override;

Description

This function returns True if the current item control is a windowed control (the TdxBarWinControl class and its descendants).  For other item controls (TdxBarItemControl descendants), the HasWindow function returns False.

Some actions can be implemented only with windowed items.  Use this function to determine whether actions specific to windowed items can be implemented.


dxBarExtItems Unit Overview
dxBarExtItems Unit

Items

TdxBarColorCombo

TdxBarControlContainerItem

TdxBarDateCombo

TdxBarFontNameCombo

TdxBarImageCombo

TdxBarInPlaceSubItem

TdxBarLargeButton

TdxBarMRUListItem

TdxBarProgressItem

TdxBarSpinEdit

TdxBarStatic

TdxBarToolbarsListItem

TdxBarTreeViewCombo

Item Controls

TdxBarColorComboControl

TdxBarControlContainerControl

TdxBarDateComboControl

TdxBarImageComboControl

TdxBarInPlaceSubItemControl

TdxBarLargeButtonControl

TdxBarProgressControl

TdxBarSpinEditControl

TdxBarStaticControl

TdxBarToolbarsListItemControl

TdxBarTreeViewComboControl

Classes

TdxBarDateNavigator

TdxBarTreeView

Routines

dxBarColorDialog

dxBarFontDialog


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

     |

TdxBarCustomCalendar

     |

TdxBarDateNavigator


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


TdxBarTreeView Properties

TdxBarTreeView

In TdxBarTreeView

Combo

Derived from TCustomTreeView

Items


TdxBarTreeView Events

TdxBarTreeView

Derived from TCustomTreeView

OnDeletion


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.


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.


TdxBarColorComboControl
TdxBarColorComboControl Object

Hierarchy          Properties          Methods          See Also

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

     |

TdxCustomBarEditControl

     |

TdxBarEditControl

     |

TCustomdxBarComboControl

     |

TdxBarComboControl

     |

TdxBarColorComboControl


TdxBarColorComboControl Properties

TdxBarColorComboControl           Legend

In TdxBarColorComboControl

Item

Derived from TdxBarComboControl

ItemIndex

Item

Items

LocalItemIndex

Sorted

Derived from TCustomdxBarComboControl

DropDownButtonRect

DropDownWindow

DroppedDown

Item

Derived from TdxBarEditControl

Item

MaxLength

ReadOnly

Derived from TdxCustomBarEditControl

CaptionWidth

ShowCaption

Derived from TdxBarWinControl

Focused

Handle

Item

Text

WindowRect

Derived from TdxBarItemControl

BarManager

 	Caption

Enabled

Glyph

Height

Hint

IsActive

IsSelected

ImageIndex

Item

ItemLink

PainterClass

Parent

Pressed

ShortCut

Width


TdxBarColorComboControl Methods

TdxBarColorComboControl           Legend

Derived from TCustomdxBarComboControl

ControlInactivate

Derived from TdxBarWinControl

CanClicked

ControlClick

HasWindow

IsDestroyOnClick

WndProc

Derived from TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

HasWindow

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged

WidthChanged


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


TdxBarControlContainerControl
TdxBarControlContainerControl Object

Hierarchy          Properties          Methods          See Also

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


TdxBarControlContainerControl Properties

TdxBarControlContainerControl          Legend

In TdxBarControlContainerControl

Item

Derived from TdxBarItemControl

BarManager

 	Caption

Enabled

Glyph

Height

Hint

IsActive

IsSelected

ImageIndex

Item

ItemLink

PainterClass

Parent

Pressed

ShortCut

Width


TdxBarControlContainerControl Methods

TdxBarControlContainerControl          Legend

Derived from TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

HasWindow

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged

WidthChanged


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 appropriate TdxBarItemLink object.

ReadOnly Property


TdxBarDateComboControl
TdxBarDateComboControl Object

Hierarchy          Properties          Methods          See Also

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

     |

TdxCustomBarEditControl

     |

TdxBarEditControl

     |

TCustomdxBarComboControl

     |

TdxBarDateComboControl


TdxBarDateComboControl Properties

TdxBarDateComboControl           Legend

In TdxBarDateComboControl

Date

Item

Derived from TCustomdxBarComboControl

DropDownButtonRect

DropDownWindow

DroppedDown

Item

Derived from TdxBarEditControl

Item

MaxLength

ReadOnly

Derived from TdxCustomBarEditControl

CaptionWidth

ShowCaption

Derived from TdxBarWinControl

Focused

Handle

Item

Text

WindowRect

Derived from TdxBarItemControl

BarManager

 	Caption

Enabled

Glyph

Height

Hint

IsActive

IsSelected

ImageIndex

Item

ItemLink

PainterClass

Parent

Pressed

ShortCut

Width


TdxBarDateComboControl Methods

TdxBarDateComboControl           Legend

Derived from TCustomdxBarComboControl

ControlInactivate

Derived from TdxBarWinControl

CanClicked

ControlClick

HasWindow

IsDestroyOnClick

WndProc

Derived from TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

HasWindow

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged

WidthChanged


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 appropriate TdxBarItemLink object.

ReadOnly Property


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

     |

TdxCustomBarEditControl

     |

TdxBarEditControl

     |

TCustomdxBarComboControl

     |

TdxBarComboControl

     |

TdxBarImageComboControl


TdxBarImageComboControl Properties

TdxBarImageComboControl               Legend

Derived from TdxBarComboControl

ItemIndex

Item

Items

LocalItemIndex

Sorted

Derived from TCustomdxBarComboControl

DropDownButtonRect

DropDownWindow

DroppedDown

Item

Derived from TdxBarEditControl

Item

MaxLength

ReadOnly

Derived from TdxCustomBarEditControl

CaptionWidth

ShowCaption

Derived from TdxBarWinControl

Focused

Handle

Item

Text

WindowRect

Derived from TdxBarItemControl

BarManager

 	Caption

Enabled

Glyph

Height

Hint

IsActive

IsSelected

ImageIndex

Item

ItemLink

PainterClass

Parent

Pressed

ShortCut

Width


TdxBarImageComboControl Methods

TdxBarImageComboControl               Legend

TdxBarImageComboControl

GetHeight

ImagesChanged

Derived from TCustomdxBarComboControl

ControlInactivate

Derived from TdxBarWinControl

CanClicked

ControlClick

HasWindow

IsDestroyOnClick

WndProc

Derived from TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

HasWindow

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged

WidthChanged


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.


TdxBarInPlaceSubItemControl
TdxBarInPlaceSubItemControl Object

Hierarchy          Properties          Methods          See Also

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

     |

TdxBarButtonLikeControl

     |

TdxBarSubItemControl

     |

TdxBarContainerItemControl

     |

TdxBarInPlaceSubItemControl


TdxBarInPlaceSubItemControl Properties

TdxBarInPlaceSubItemControl          Legend

In TdxBarInPlaceSubItemControl

Item

Derived from TdxBarContainerItemControl

Item

Derived from TdxBarSubMenuControl

Item

Derived from TdxBarButtonLikeControl

SubMenuControl

Derived from TdxBarItemControl

BarManager

 	Caption

Enabled

Glyph

Height

Hint

IsActive

IsSelected

ImageIndex

Item

ItemLink

PainterClass

Parent

Pressed

ShortCut

Width


TdxBarInPlaceSubItemControl Methods

TdxBarInPlaceSubItemControl          Legend

Derived from TdxBarContainerItemControl

CreateSubMenuControl

Derived from TdxBarSubMenuControl

GlyphChanged

CanClicked

ControlClick

CreateSubMenuControl

GetDefaultHeight

GetDefaultWidth

Derived from TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

HasWindow

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged

WidthChanged


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 Item property returns the in-place subitem of the appropriate TdxBarItemLink object.

ReadOnly Property


TdxBarLargeButtonControl
TdxBarLargeButtonControl Object

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

     |

TdxBarButtonLikeControl

     |

TdxBarButtonControl

     |

TdxBarLargeButtonControl


TdxBarLargeButtonControl Properties

TdxBarLargeButtonControl               Legend

In TdxBarLargeButtonControl

HotGlyph

Item

Derived from TdxBarButtonControl

ButtonStyle

Down

DropDownEnabled

DroppedDown

GroupIndex

Item

PaintStyle

Derived from TdxBarButtonLikeControl

SubMenuControl

Derived from TdxBarItemControl

BarManager

 	Caption

Enabled

Glyph

Height

Hint

IsActive

IsSelected

ImageIndex

Item

ItemLink

PainterClass

Parent

Pressed

ShortCut

Width


TdxBarLargeButtonControl Methods

TdxBarLargeButtonControl               Legend

In TdxBarLargeButtonControl

GlyphLayoutChanged

HeightChanged

HotGlyphChanged

ShowCaptionChanged

Derived from 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

HasWindow

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged

WidthChanged


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 class’s HotGlyph or HotImageIndex 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.

ReadOnly 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.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.


TdxBarProgressControl
TdxBarProgressControl Object

Hierarchy          Properties          Methods          See Also

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


TdxBarProgressControl Properties

TdxBarProgressControl           Legend

In TdxBarProgressControl

Item

Derived from TdxBarStaticControl

Item

Derived from TdxBarItemControl

BarManager

 	Caption

Enabled

Glyph

Height

Hint

IsActive

IsSelected

ImageIndex

Item

ItemLink

PainterClass

Parent

Pressed

ShortCut

Width


TdxBarProgressControl Methods

TdxBarProgressControl           Legend

Derived from TdxBarStaticControl

CanClicked

GetHeight

GetWidth

IsDestroyOnClick

Derived from TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

HasWindow

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged

WidthChanged


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 appropriate TdxBarItemLink object.

ReadOnly Property


TdxBarSpinEditControl
TdxBarSpinEditControl Object

Hierarchy          Properties          Methods          See Also

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

|

TdxCustomBarEditControl

     |

TdxBarEditControl

|

TdxBarSpinEditControl


TdxBarSpinEditControl Properties

TdxBarSpinEditControl          Legend

TdxBarSpinEditControl

ActiveButton

ButtonPressed

ButtonsRect

Item

Derived from TdxBarEditControl

Item

MaxLength

ReadOnly

Derived from TdxCustomBarEditControl

CaptionWidth

ShowCaption

Derived from TdxBarWinControl

Focused

Handle

Item

Text

WindowRect

Derived from TdxBarItemControl

BarManager

 	Caption

Enabled

Glyph

Height

Hint

IsActive

IsSelected

ImageIndex

Item

ItemLink

PainterClass

Parent

Pressed

ShortCut

Width


TdxBarSpinEditControl Methods

TdxBarSpinEditControl          Legend

Derived from TdxBarWinControl

CanClicked

ControlClick

HasWindow

IsDestroyOnClick

WndProc

Derived from TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

HasWindow

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged

WidthChanged


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


TdxBarStaticControl
TdxBarStaticControl Object

Hierarchy          Properties           Methods            See Also

Unit

dxBarExtItems

TdxBarStaticControl = class(TdxBarCustomStaticControl);

Description

This control represents the TdxBarStatic type item on screen.


Hierarchy

TObject

     |

TdxBarItemControl

     |

TdxBarCustomStaticControl

     |

TdxBarStaticControl


TdxBarStaticControl Properties

TdxBarStaticControl

In TdxBarStaticControl

Item

Derived from TdxBarItemControl

BarManager

 	Caption

Enabled

Glyph

Height

Hint

IsActive

IsSelected

ImageIndex

Item

ItemLink

PainterClass

Parent

Pressed

ShortCut

Width


TdxBarStaticControl Methods

TdxBarStaticControl               Legend

In TdxBarStaticControl

CanClicked

GetHeight

GetWidth

IsDestroyOnClick

Derived from TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

HasWindow

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged

WidthChanged


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.


TdxBarToolbarsListItemControl
TdxBarToolbarsListItemControl Object

Hierarchy          Properties          Methods          See Also

Represents TdxBarToolbarsListItem on toolbars and in submenus.

TdxBarToolbarsListItemControl = class(TdxBarSubItemControl);

Description

TdxBarToolbarsListItemControl contains a list of accessible toolbars and allows a user to hide/display a toolbar on screen.


Hierarchy

TObject

     |

TdxBarItemControl

     |

TdxBarSubItemControl

     |

TdxBarToolbarsListItemControl


TdxBarToolbarsListItemControl Properties

TdxBarToolbarsListItemControl          Legend

Derived from TdxBarSubItemControl

Item

Derived from TdxBarButtonLikeControl

SubMenuControl

Derived from TdxBarItemControl

BarManager

 	Caption

Enabled

Glyph

Height

Hint

IsActive

IsSelected

ImageIndex

Item

ItemLink

PainterClass

Parent

Pressed

ShortCut

Width


TdxBarToolbarsListItemControl Methods

TdxBarToolbarsListItemControl          Legend

Derived from TdxBarSubItemControl

GlyphChanged

CanClicked

ControlClick

CreateSubMenuControl

GetDefaultHeight

GetDefaultWidth

Derived from TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

HasWindow

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged

WidthChanged


TdxBarTreeViewComboControl
TdxBarTreeViewComboControl Object

Hierarchy          Properties           Methods          See Also

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

     |

TdxCustomBarEditControl

     |

TdxBarEditControl

     |

TCustomdxBarComboControl

     |

TdxBarTreeViewComboControl


TdxBarTreeViewComboControl Properties

TdxBarTreeViewComboControl               Legend

TdxBarTreeViewComboControl

Item

Derived from TCustomdxBarComboControl

DropDownButtonRect

DropDownWindow

DroppedDown

Item

Derived from TdxBarEditControl

Item

MaxLength

ReadOnly

Derived from TdxCustomBarEditControl

CaptionWidth

ShowCaption

Derived from TdxBarWinControl

Focused

Handle

Item

Text

WindowRect

Derived from TdxBarItemControl

BarManager

 	Caption

Enabled

Glyph

Height

Hint

IsActive

IsSelected

ImageIndex

Item

ItemLink

PainterClass

Parent

Pressed

ShortCut

Width


TdxBarTreeViewComboControl Methods

TdxBarTreeViewComboControl               Legend

In TdxBarTreeViewComboControl

GetHeight

Derived from TCustomdxBarComboControl

ControlInactivate

Derived from TdxBarWinControl

CanClicked

ControlClick

HasWindow

IsDestroyOnClick

WndProc

Derived from TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

HasWindow

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged

WidthChanged


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.


TdxBarColorCombo
TdxBarColorCombo Object

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

     |

TdxBarComponent

     |

TdxBarItem

     |

TdxBarWindowItem

     |

TdxBarEdit

     |

TCustomdxBarCombo

     |

TdxBarCustomCombo

     |

TdxBarColorCombo


TdxBarColorCombo Properties

TdxBarColorCombo               Legend

In TdxBarColorCombo

AutoColor

AutoColorText

Color

CurColor

CustomColorText

ShowAutoColor

ShowCustomColorButton

Derived from TdxBarCustomCombo

Canvas

CurItemIndex

DropDownCount

DropDownWidth

ItemHeight

ItemIndex

Items

ItemsHeight

ListBox

Sorted

Derived from TCustomdxBarCombo

DropDownWindow

DroppedDown

ShowEditor

Derived from TdxBarEdit

MaxLength

ReadOnly

Derived from TdxCustomBarEdit

ShowCaption

StyleEdit

Width

Derived from TdxBarWindowItem

CurText

EmptyWindow

FocusedItemLink

Text

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


TdxBarColorCombo Methods

TdxBarColorCombo               Legend

In TdxBarColorCombo

Change

Create

DoClick

Derived from TdxBarCustomCombo

DrawItem

GetDropDownWidth

MeasureItem

MeasureItemWidth

Derived from TCustomdxBarCombo

AfterDropDown

CheckKeyForDropDownWindow

CloseUp

DropDown

GetDropDownWindow

Derived from TdxCustomBarEdit

WidthChanged

Derived from TdxBarWindowItem

Change

CurChange

DoEnter

DoExit

KeyDown

KeyPress

KeyUp

SetFocus

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

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.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.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.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.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.


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

Set this property to True to display a custom color button.

Clicking this button activates the color dialog, which allows end-users to select any color not displayed in the dropdown list.


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.


TdxBarControlContainerItem
TdxBarControlContainerItem Object

Hierarchy          Properties          Methods          Events          See Also

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

     |

TdxBarComponent

     |

TdxBarItem

     |

TdxBarControlContainerItem


TdxBarControlContainerItem Properties

TdxBarControlContainerItem          Legend

In TdxBarControlContainerItem

Control

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


TdxBarControlContainerItem Methods

TdxBarControlContainerItem          Legend

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarControlContainerItem Events

TdxBarControlContainerItem          Legend

Derived from 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.


TdxBarDateCombo
TdxBarDateCombo Object

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

     |

TdxBarComponent

     |

TdxBarItem

     |

TdxBarWindowItem

     |

TdxBarEdit

     |

TCustomdxBarCombo

     |

TdxBarDateCombo


TdxBarDateCombo Properties

TdxBarDateCombo               Legend

In TdxBarDateCombo

CurDate

Date

DateOnStart

DatePopup

MaxDate

MinDate

ShowClearButton

ShowDayText

ShowTodayButton

Derived from TCustomdxBarCombo

DropDownWindow

DroppedDown

ShowEditor

Derived from TdxBarEdit

MaxLength

ReadOnly

Derived from TdxCustomBarEdit

ShowCaption

StyleEdit

Width

Derived from TdxBarWindowItem

CurText

EmptyWindow

FocusedItemLink

Text

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


TdxBarDateCombo Methods

TdxBarDateCombo               Legend

In TdxBarDateCombo

Create

Destroy

DoClick

DropDown

CheckDate

Derived from TCustomdxBarCombo

AfterDropDown

CheckKeyForDropDownWindow

CloseUp

DropDown

GetDropDownWindow

Derived from TdxCustomBarEdit

WidthChanged

Derived from TdxBarWindowItem

Change

CurChange

DoEnter

DoExit

KeyDown

KeyPress

KeyUp

SetFocus

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarDateCombo Events

TdxBarDateCombo               Legend

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.


TdxBarDateCombo.CheckDate

TdxBarDateCombo

Determines whether a specified date is within the MinDate to MaxDate range.

function CheckDate(ADate: TDateTime): TDateTime;

Description

If the date specified by ADate is out of this range, this method returns the value of MinDate or MaxDate – based upon what bound is closer to the specified date.  Otherwise, the CheckDate method returns the ADate parameter’s value.


TdxBarFontNameCombo
TdxBarFontNameCombo Object

Hierarchy          Properties           Methods          Events           See Also         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

     |

TdxBarComponent

     |

TdxBarItem

     |

TdxBarWindowItem

     |

TdxBarEdit

     |

TCustomdxBarCombo

     |

TdxBarCustomCombo

     |

TdxBarFontNameCombo


TdxBarFontNameCombo Properties

TdxBarFontNameCombo               Legend

Derived from TdxBarCustomCombo

Canvas

CurItemIndex

DropDownCount

DropDownWidth

ItemHeight

ItemIndex

Items

ItemsHeight

ListBox

Sorted

Derived from TCustomdxBarCombo

DropDownWindow

DroppedDown

ShowEditor

Derived from TdxBarEdit

MaxLength

ReadOnly

Derived from TdxCustomBarEdit

ShowCaption

StyleEdit

Width

Derived from TdxBarWindowItem

CurText

EmptyWindow

FocusedItemLink

Text

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


TdxBarFontNameCombo Methods

TdxBarFontNameCombo               Legend

In TdxBarFontNameCombo

Create

DoClick

Derived from TdxBarCustomCombo

DrawItem

GetDropDownWidth

MeasureItem

MeasureItemWidth

Derived from TCustomdxBarCombo

AfterDropDown

CheckKeyForDropDownWindow

CloseUp

DropDown

GetDropDownWindow

Derived from TdxCustomBarEdit

WidthChanged

Derived from TdxBarWindowItem

Change

CurChange

DoEnter

DoExit

KeyDown

KeyPress

KeyUp

SetFocus

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

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.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
TdxBarImageCombo Object

Hierarchy          Properties           Methods           Events          See Also

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

     |

TdxBarComponent

     |

TdxBarItem

     |

TdxBarWindowItem

     |

TdxBarEdit

     |

TCustomdxBarCombo

     |

TdxBarCustomCombo

     |

TdxBarImageCombo


TdxBarImageCombo Properties

TdxBarImageCombo               Legend

In TdxBarImageCombo

ImageIndexes

Images

ShowText

Derived from TdxBarCustomCombo

Canvas

CurItemIndex

DropDownCount

DropDownWidth

ItemHeight

ItemIndex

Items

ItemsHeight

ListBox

Sorted

Derived from TCustomdxBarCombo

DropDownWindow

DroppedDown

ShowEditor

Derived from TdxBarEdit

MaxLength

ReadOnly

Derived from TdxCustomBarEdit

ShowCaption

StyleEdit

Width

Derived from TdxBarWindowItem

CurText

EmptyWindow

FocusedItemLink

Text

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


TdxBarImageCombo Methods

TdxBarImageCombo               Legend

In TdxBarImageCombo

Create

DoClick

ImagesChanged

Derived from TdxBarCustomCombo

DrawItem

GetDropDownWidth

MeasureItem

MeasureItemWidth

Derived from TCustomdxBarCombo

AfterDropDown

CheckKeyForDropDownWindow

CloseUp

DropDown

GetDropDownWindow

Derived from TdxCustomBarEdit

WidthChanged

Derived from TdxBarWindowItem

Change

CurChange

DoEnter

DoExit

KeyDown

KeyPress

KeyUp

SetFocus

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

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 Images property. The Index parameter is the index of the dropdown list item in the 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: TCustomImageList;

Description

Every dropdown item consists of text and an image.  The Images contains the bitmaps to display next to text for a dropdown item.


TdxBarImageCombo.ImagesChanged

TdxBarImageCombo

Called on changing the Images property.

procedure ImagesChanged; virtual;

Description

Each time a change is made to the TdxBarImageCombo Images property, the ImageChanged method is called.  Override it to perform special actions when changing the Images 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.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.


TdxBarInPlaceSubItem
TdxBarInPlaceSubItem Object

Hierarchy          Properties          Methods          Events          See Also

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

|

TdxBarComponent

|

TdxBarItem

|

TCustomdxBarSubItem

|

TCustomdxBarContainerItem

|

TdxBarContainerItem

|

TdxBarInPlaceSubItem


TdxBarInPlaceSubItem Properties

TdxBarInPlaceSubItem          Legend

In TdxBarInPlaceSubItem

Expanded

KeepBeginGroupWhileExpanded

Derived from TCustomdxBarSubItem

BarSize

Detachable

DetachingBar

ItemLinks

ItemOptions

ShowCaption

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


TdxBarInPlaceSubItem Methods

TdxBarInPlaceSubItem          Legend

Derived from TdxBarContainerItem

AddListedItemLinks

DeleteListedItemLinks

Derived from TCustomdxBarContainerItem

AddListedItemLinks

DeleteListedItemLinks

ClearItemList

Derived from TCustomdxBarSubItem

CanContainItem

DoCloseUp

DoPopup

DropDown

GetDetachingBar

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

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            See Also

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.


TdxBarMRUListItem
TdxBarMRUListItem Object

Hierarchy          Properties          Methods          Events          See Also

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

     |

TdxBarComponent

     |

TdxBarItem

     |

TCustomdxBarSubItem

     |

TCustomdxBarContainerItem

     |

TdxBarListItem

     |

TdxBarMRUListItem


TdxBarMRUListItem Properties

TdxBarMRUListItem           Legend

In TdxBarMRUListItem

MaxItemCount

RemoveItemOnClick

Derived from TdxBarListItem

DataIndex

ItemIndex

ItemList

Items

ShowCheck

ShowNumbers

Derived from TCustomdxBarSubItem

BarSize

Detachable

DetachingBar

ItemLinks

ItemOptions

ShowCaption

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


TdxBarMRUListItem Methods

TdxBarMRUListItem           Legend

In TdxBarMRUListItem

AddItem

RemoveItem

DirectClick

Derived from TdxBarListItem

DirectClick

Derived from TCustomdxBarContainerItem

AddListedItemLinks

DeleteListedItemLinks

ClearItemList

Derived from TCustomdxBarSubItem

CanContainItem

DoCloseUp

DoPopup

DropDown

GetDetachingBar

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

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 this property to limit the number of displayed items.

The default value of the MaxItemCount property is 5.


TdxBarMRUListItem.RemoveItemOnClick

TdxBarMRUListItem

Specifies whether to delete an item from the list of displayed items when clicked.

property RemoveItemOnClick: Boolean;

Description

Set this property to True to remove the clicked item from the list of the most recently used (MRU) items.

The default value of the RemoveItemOnClick property 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.


TdxBarMRUListItem.DirectClick

TdxBarMRUListItem

Processes mouse clicks over the MRU list item located in a submenu.

procedure DirectClick; override;

Description

An MRU list item can be placed either on a toobar or in a submenu.  Use the DirectClick method to process mouse clicks over the current MRU list item located in a submenu.

The DirectClick method calls the inherited DirectClick method and then, if the RemoveItemOnClick property is set to True, deletes the item that has been clicked from the Items list.

If an MRU list item is placed on a toolbar, the DirectClick method doesn’t perform any actions.

Use this method to emulate mouse clicks.


TdxBarLargeButton
TdxBarLargeButton Object

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

     |

TdxBarComponent

     |

TdxBarItem

     |

TdxBarButton

     |

TdxBarLargeButton


TdxBarLargeButton Properties

TdxBarLargeButton               Legend

In TdxBarLargeButton

AutoGrayScale

GlyphLayout

Height

HotGlyph

HotImageIndex

ShowCaption

SyncImageIndex

Width

Derived from TdxBarButton

AllowAllUp

ButtonStyle

CloseSubMenuOnClick

Down

DropDownEnabled

DropDownMenu

GroupIndex

Lowered

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


TdxBarLargeButton Methods

TdxBarLargeButton               Legend

In TdxBarLargeButton

GlyphLayoutChanged

HeightChanged

ShowCaptionChanged

WidthChanged

Derived from TdxBarButton

ButtonStyleChanged

CanChangePaintStyle

Click

DownChanged

DoDropDown

DropDownEnabledChanged

PaintStyleChanged

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

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 the AutoGrayScale property is set to 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.  If this property is set to False, button images will appear normal when the bmsStandard, bmsEnhanced, or bmsOffice11 style is applied, and dingy (according to the dxBarMakeInactiveImagesDingy variable value) when the bmsFlat or bmsXP style is applied.


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 Customization Form 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.

If the HotImageIndex property is set to –1, the image displayed by the hot-tracked button is determined by the LargeImageIndex property.  If the LargeImageIndex property is also set to –1, no image is displayed.


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 indicates that button’s width is 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 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.


TdxBarProgressItem
TdxBarProgressItem Object

Hierarchy          Properties          Methods          Events          See Also

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

     |

TdxBarComponent

     |

TdxBarItem

     |

TdxBarStatic

     |

TdxBarProgressItem


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

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


TdxBarProgressItem Methods

TdxBarProgressItem           Legend

In TdxBarProgressItem

SetParams

StepBy

StepIt

Derived from TdxBarStatic

CanClicked

HasAccel

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

GetParentComponent

GlyphChanged

HasAccel

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).

Value	Example
False
True

The default value of the Smooth property is False.


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.


TdxBarSpinEdit
TdxBarSpinEdit Object

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

TComponent

|

TdxBarComponent

|

TdxBarItem

|

TdxBarWindowItem

|

TdxBarEdit

|

TdxBarSpinEdit


TdxBarSpinEdit Properties

TdxBarSpinEdit          Legend

In TdxBarSpinEdit

CurValue

Increment

IntCurValue

IntValue

MinValue

MaxValue

Prefix

PrefixPlace

Value

ValueType

Derived from TdxBarEdit

MaxLength

ReadOnly

Derived from TdxCustomBarEdit

ShowCaption

StyleEdit

Width

Derived from TdxBarWindowItem

CurText

EmptyWindow

FocusedItemLink

Text

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


TdxBarSpinEdit Methods

TdxBarSpinEdit          Legend

Derived from TdxCustomBarEdit

WidthChanged

Derived from TdxBarWindowItem

Change

CurChange

DoEnter

DoExit

KeyDown

KeyPress

KeyUp

SetFocus

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarSpinEdit Events

TdxBarSpinEdit          Legend

In 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:

Value	Description
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 the spin edit, 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 %".


TdxBarStatic
TdxBarStatic Object

Hierarchy           Properties          Methods              Events           See Also         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

     |

TdxBarComponent

     |

TdxBarItem

     |

TdxBarStatic


TdxBarStatic Properties

TdxBarStatic               Legend

In TdxBarStatic

Alignment

AllowClick

BorderStyle

Height

LeftIndent

RightIndent

ShowCaption

Width

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


TdxBarStatic Methods

TdxBarStatic               Legend

In TdxBarStatic

CanClicked

HasAccel

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarStatic Events

TdxBarStatic               Legend

Derived from 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.

Value	Example
0
5
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.

Value	Example
0
5
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.

Value	Example
True
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.


TdxBarToolbarsListItem
TdxBarToolbarsListItem Object

Hierarchy          Properties          Methods          Events          See Also

Unit

dxBarExtItems

TdxBarToolbarsListItem = class(TCustomdxBarSubItem);

Description

This item is presented 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.

This list doesn’t display toolbars with the Hidden property set to False.

Note:	This bar item is not intended for use in the Ribbon control.


Hierarchy

TComponent

     |

TdxBarComponent

     |

TdxBarItem

     |

TCustomdxBarSubItem

     |

TdxBarToolbarsListItem


TdxBarToolbarsListItem Properties

TdxBarToolbarsListItem          Legend

Derived from TCustomdxBarSubItem

BarSize

Detachable

DetachingBar

ItemLinks

ItemOptions

ShowCaption

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


TdxBarToolbarsListItem Methods

TdxBarToolbarsListItem          Legend

Derived from TCustomdxBarSubItem

CanContainItem

DoCloseUp

DoPopup

DropDown

GetDetachingBar

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

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


TdxBarTreeViewCombo
TdxBarTreeViewCombo Object

Hierarchy          Properties           Methods           Events           See Also            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

     |

TdxBarComponent

     |

TdxBarItem

     |

TdxBarWindowItem

     |

TdxBarEdit

     |

TCustomdxBarCombo

     |

TdxBarTreeViewCombo


TdxBarTreeViewCombo Properties

TdxBarTreeViewCombo               Legend

In TdxBarTreeViewCombo

AllowResizing

ChooseByDblClick

DropDownHeight

DropDownWidth

FullExpand

Images

Indent

Items

SelectedNode

ShowButtons

ShowImageInEdit

ShowLines

ShowRoot

SortType

StateImages

TreeView

Derived from TCustomdxBarCombo

DropDownWindow

DroppedDown

ShowEditor

Derived from TdxBarEdit

MaxLength

ReadOnly

Derived from TdxCustomBarEdit

ShowCaption

StyleEdit

Width

Derived from TdxBarWindowItem

CurText

EmptyWindow

FocusedItemLink

Text

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


TdxBarTreeViewCombo Methods

TdxBarTreeViewCombo               Legend

In TdxBartreeViewCombo

Create

Destroy

DoClick

DoSelectedNodeChanged

DropDown

Derived from TCustomdxBarCombo

AfterDropDown

CheckKeyForDropDownWindow

CloseUp

DropDown

GetDropDownWindow

Derived from TdxCustomBarEdit

WidthChanged

Derived from TdxBarWindowItem

Change

CurChange

DoEnter

DoExit

KeyDown

KeyPress

KeyUp

SetFocus

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


TdxBarTreeViewCombo Events

TdxBarTreeViewCombo               Legend

In TdxBarTreeViewCombo

OnCanSelectNode

OnChanging

OnCollapsed

OnCollapsing

OnCompare

OnExpanded

OnExpanding

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; otherwise, 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 of 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: 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.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 appear 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 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.


Overview
ExpressBars Overview

Basics

The ExpressBars Suite allows you to bring the user interface elements and customization features introduced in Microsoft® Office® to your next application – easily and without having to write a single line of code.  With v6, you can build ribbon interfaces similar to those found in Microsoft Office® 2007.

Important Note: Our Ribbon implementation requires the Microsoft GDI+ library to be installed.  Gdiplus.dll is included with Windows XP and Vista.  GDI+ is available as a redistributable file for Windows NT 4.0 SP6, Windows 2000, Windows 98, and Windows Me.  To download the latest redistributable, see http://www.microsoft.com/downloads/details.aspx?FamilyID=6a63ab9c-df12-4d41-933c-be590feaa05a&DisplayLang=en.


ExpressBars Basics

Fundamentals

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.

The ExpressBars Suite allows you to organize items into logical groups, using the ‘category’ and ‘item group’ metaphors.  Grouping items 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 Suite 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.


What's New in v6

Known Issues and Important Changes List

This topic provides a brief overview of the new features and enhancements introduced in the ExpressBars Suite v6.  Click a link below to jump to the corresponding section.

Ribbon UI

In-Place Editors Extension

Form Inheritance Enhancements

Improved Support for Images and Image Lists

Extended Appearance Control

Context Menus and Submenus Enhancements

Runtime Usability Improvements

Merging Mechanism Improvements

Design-Time Improvements

Bug Fixes

Ribbon UI

With the TdxRibbon, TdxRibbonForm, TdxBarApplicationMenu, TdxRibbonPopupMenu, TdxBarScreenTipRepository, TdxRibbonStatusBar, and TdxRibbonDropDownGallery components, you can build ribbon interfaces similar to those found in Microsoft Office® 2007.

Important Note:	These components require the Microsoft GDI+ library to be installed.  Gdiplus.dll is included with Windows XP.  GDI+ is available as a redistributable file for Windows NT 4.0 SP6, Windows 2000, Windows 98, and Windows Me.  To download the latest redistributable, see http://www.microsoft.com/downloads/details.aspx?FamilyID=6a63ab9c-df12-4d41-933c-be590feaa05a&DisplayLang=en

Refer to the Ribbon User Interface topic for more information on our Ribbon implementation.

The Converting Bars to Ribbon topic provides tips on converting a legacy toolbar/menu system to Ribbon.

In-Place Editors Extension

All in-place editors from the ExpressEditors Library can be used within toolbar and submenu items.  Use the TcxBarEditItem class to create this type of item.  Refer to the In-place Editors topic, to learn about this feature.

Important Note:	The ExpressEditors Library is not shipped as part of the ExpressBars Suite and must be acquired separately.

The following images demonstrate the use of ExpressEditors within toolbars.

For the complete list of available bar items and embeddable editors, refer to the List of Bar Item Types help topic.

Form Inheritance Enhancements

•	TdxBar is now a TComponent descendant (was a TCollectionItem descendant in previous versions).  This eliminates problems when changes applied to the base form are not reflected in changes to inherited forms after modifying a toolbar on the inherited form.  Forms/applications that use older versions of the ExpressBars are fully supported.

•	Toolbars on both the base and inherited forms can be reset.

Improved Support for Images and Image Lists

•	Use our TcxImageList component to display 32-bit icons using alpha blending.

•	You can now optionally use a glyph's left-bottom pixel to determine its transparent color.  Refer to the description of a bar manager’s ImageOptions.UseLeftBottomPixelAsTransparent property for more information.

•	The image mask of a transparent glyph is now taken into account when painting an image from an image list.

Extended Appearance Control

Added the capability to apply custom color and font settings to a bar item’s caption and in-place editor (via the item’s Style and StyleEdit properties).

Context Menus and Submenus Enhancements

•	Separator Items.  A new bar item type has been implemented – TdxBarSeparator.  You can use this item type to break context menus into logical groups or provide a label for menu items.

•	Item Options.  All popup menus and submenus now support large size items, and can optionally display item descriptions and shortcuts.  Use the ItemOptions property to toggle the desired option.

Runtime Usability Improvements

•	A centralized way to postpone painting and calculation of toolbars has been introduced via a bar manager’s BeginUpdate/EndUpdate methods.

•	New specially designed methods to simplify the creation, modification and repositioning of toolbars have been introduced as follows:

o	a bar manager’s AddButton, AddItem, and AddSubItem methods;

o	a toolbar’s Move, ItemLinks.Add, ItemLinks.Insert, ItemLinks.Move, ItemLinks.AddButton, ItemLinks.AddItem, and ItemLinks.AddSubItem methods.

Merging Mechanism Improvements

•	More than two toolbars can be merged.

•	You can now merge bar managers.

•	You can use the specially designed MergeKind and MergeOrder properties of a bar item to control merging.

Refer to the Merging Bars and Menus in MDI Applications topic to learn about these features.

Design-Time Improvements

•	Toolbars can now be selected using the mouse.

•	You can also select multiple items and toolbars by holding down the Shift and Ctrl keys.

•	It’s much easier to delete selected links, items, and toolbars using the Del and Ctrl+Del keys.

•	You can press the Esc key to access the selected object’s parent component (for instance, press the Esc key to move to the parent toolbar of a bar item that is currently selected).

Refer to the Accessing Ribbon UI and Bar Elements and Using Drag and Drop help topics for more information on available design-time capabilities.

Bug Fixes

•	Parented forms and frames are fully supported.  Problems with common keyboard shortcuts, accelerator keys, tab navigation, and hints in parented forms have been addressed.

•	Several bugs related to the position of a toolbar which was not correctly saved/restored after the toolbar was hidden/shown have now been fixed.

•	New items – which were added to a toolbar after storing its settings to the registry, INI file or stream – will be visible after restoring the settings.


Known Issues and Important Changes List

What's New in v6

All entries in the following list are grouped by Builds, in reverse order.

Build 34

The EqualMethods global function and the TdxEventHandlerCollection and TdxEventHandler classes have been moved from the dxBar unit to the cxClasses unit.  The classes were renamed to TcxEventHandlerCollection and TcxEventHandler.

Build 32

1. The TdxBarApplicationMenu class has been moved from the dxBar unit to the dxRibbon unit.

2. A bar manager’s ImageOptions.UseLargeImagesForLargeIcons option now specifies which images to use as icons for enlarged standard size buttons, if both standard size and large size icons are specified for these buttons.

3. The AInToolbar parameter has been removed from the TdxBarItemControl.GetImageList function declaration.

Build 31

An AFormat parameter has been added to the TdxBarPainter.ButtonLikeControlDoDrawCaption method.

Build 30

There was an issue with popup menus displayed for buttons, whose ButtonStyle property is set to bsDefault or bsChecked.  Keyboard shortcuts assigned to popup menu items didn’t work.  This issue has now been fixed.

Build 28

1. In TdxBarWindowItem, the Text and CurText properties are now protected.

2. A Ribbon gallery’s Options.ShowScrollbar property is now obsolete.  The scrollbar’s visibility is determined automatically, based on the RowCount property value.

Build 27

1. The TdxBarItemControl.Paint method is no longer virtual.  Override the TdxBarItemControl.DoPaint method instead.

2. Instead of the Application Menu’s ExtraPaneHeader, ExtraPaneItems, ExtraPaneSize, ExtraPaneWidthRatio properties and the OnExtraPaneItemClick event use new ones – the menu’s ExtraPane.Header, ExtraPane.Items, ExtraPane.Size, ExtraPane.WidthRatio properties and the ExtraPane.OnItemClick event.

Build 24

1. A bar manager's DisabledImages, DisabledLargeImages, GlyphSize, HotImages, ImageListBkColor, Images, LargeIcons, LargeImages, MakeDisabledImagesFaded, StretchGlyphs, and UseLargeImagesForLargeIcons properties are now obsolete.  Use the bar manager's ImageOptions property to access these properties.

2. The TdxBarManager.BarByName function is now obsolete.  Use the TdxBarManager.BarByOldName method for projects developed prior to the release of ExpressBars Suite v6, or the TdxBarManager.BarByComponentName method in new projects.

3. Instead of the IsVertical(ABarControl: TCustomdxBarControl) global function, use a bar control's IsVertical function (TCustomdxBarControl.IsVertical).

4. The TdxBarHintWindow.ActivateHint procedure is now a function.  Its parameter list has been changed.  Please refer to the description of this function for more information on these changes.

5. Instead of a bar item control's GetHeight and GetWidth virtual functions, use the GetDefaultHeight and GetDefaultWidth functions.

6. A bar item’s Data property now stores an object instead of a pointer to an object.

7. The OnKeyDown event is raised prior to updating the Text property.  This allows you to handle all keyboard events before applying any changes to a bar editor.  To access the editor's value in the OnKeyDown event handler, use the CurText property.

8. The TdxBarItemLinks.HasItem function is now obsolete.  Use the TdxBarItemLinks.IsReferencedBy function instead.

9. The TdxBarPopupMenuLink.Control property now supports TControl descendants (previously, TWinControl descendants).

10. Now, invoking a TdxBarPopupMenu as a context menu doesn’t focus controls that cannot normally receive focus (such as TPanel and TScrollBox controls).


Bar Dock Controls

See Also

ExpressBars supports built-in docking capability for toolbars.  A toolbar can float, or can be docked to any side of a container (see a toolbar’s DockingStyle property).  This is possible because when a bar manager is created, it automatically creates dock controls at the edges of the parent form or frame (see TdxDockControl).

Traditionally, a toolbar’s dock sites are limited by the parent form’s or frame's sides.  If you are designing a more advanced docking layout for toolbars and you want to provide additional dock areas for them (within a panel, for instance), use the TdxBarDockControl component.  This component allows you to make any child container in your application a dock area for toolbars.


Appearance Customization

See Also

The ExpressBars Suite allows you to customize the appearance of a toolbar/menu system’s elements in different ways.

Look and Feel

The ExpressBars Suite fully supports our shared painting library, and provides the same look and feel options as other controls.  In addition, this makes it possible for you to have centralized control over the look and feel of all controls in your application.

To change the bars' paint style, use the bar manager’s LookAndFeel.Kind, LookAndFeel.NativeStyle, and LookAndFeel.SkinName properties.  Note that these properties are in effect only when a bar manager’s Style property is set to bmsUseLookAndFeel.

Built-in Skins

This feature only applies to the Ribbon UI.  A skinned interface not only changes the color and visual styles of application elements, but also changes their shapes (see Ribbon Form).

ExpressBars provides three built-in styles for the Ribbon – Black, Blue and Silver.  To choose the desired skin, use the Ribbon’s ColorSchemeName property.

Customization levels

You can change the appearance of elements at different levels:

•	The application-level appearance is modified via a bar manager’s options.

•	The appearance of a specific toolbar and its elements is customized by using a toolbar’s options.

•	Customization of an individual item is made via the item’s settings.

Appearance settings

The following tables contain a complete list of appearance options.

Bar Manager

Member	Description
Backgrounds	Specifies background bitmaps for toolbars and submenus.
Font	Specifies font settings for toolbar/menu system entries.
ImageOptions	Holds bar item image options.
LookAndFeel	Specifies toolbar paint style.
Style	Specifies toolbar paint style.
SunkenBorder	Specifies a dock control sunken border’s visibility.
Toolbar

Member	Description
AlphaBlendValue	Specifies a floating toolbar’s transparency.
BorderStyle	Specifies a toolbar’s border style.
BackgroundBitmap	Specifies a toolbar’s background image.
Color	Specifies a toolbar’s background color.
Font	Specifies font settings for toolbar’s items.
UseOwnFont	Specifies whether the toolbar’s font settings or the bar manager’s font settings are applied to bar items.

Toolbar item

Member	Description
ItemOptions	Holds appearance settings for a menu item.


Alpha Blending and Background Images

See Also

Since version 6, the ExpressBars Suite supports alpha channels in 32-bit images.

With this technique, edges look much smoother, which improves element appearance.

If you plan to use transparent images or images with alpha channel in your applications, you need to know the following:

•	Blending is applied to images assigned either via the Glyph property, or using the TcxImageList component.

•	Images of BMP and PNG formats are supported.

•	Non-transparent background of an item image is automatically transformed into transparent (if the TdxBarImageOptions.UseLeftBottomPixelAsTransparent property is set to True).

Alpha blending management

The following API allows you to control some aspects of alpha blending for a toolbar/menu system:

Member	Description
TdxBar.AlphaBlendValue	Specifies a floating toolbar’s transparency
TdxBarImageOptions.ImageListBkColor	Specifies the transparent color of images within the bar manager’s image lists.
TdxBarImageOptions.UseLeftBottomPixelAsTransparent	Specifies whether the color of the image’s bottom-left pixel is not rendered on the entire image.
TcxImageList.AlphaBlending	Specifies whether alpha channel information is used to draw images.


Bar Editor Inheritance Diagram

See Also

This topic provides a description on the bar editor class hierarchy.

The class structure contains two branches.  The first branch contains only a TcxBarEditItem class.  Items of this type are containers for embeddable editors that come from the ExpressEditors library.  (Embeddable in-place editors is a new feature in the ExpressBars Suite v6.  Prior to this version, developers were limited by using built-in editors in applications.)

Built-in editors (that are the part of the ExpressBars Suite) are shown in the second branch rooted at the TdxBarEdit class.

The following image demonstrates the bar editor class diagram:


Bar Item Options

Toolbar item options include:

Appearance Options

Member	Description
Align	Specifies a bar item’s horizontal alignment within a toolbar.
Caption	Specifies a bar item’s caption.
Description	Specifies a bar item’s description in the Customization Form.
Glyph	Specifies a bar item’s glyph.
ItemOptions	Represents appearance settings for a menu item.

Behavior Options

Member	Description
UnclickAfterDoing	Specifies a bar item’s state for a click action.

Merging Options

Member	Description
MergeKind	Specifies a bar item’s merging behavior.
MergeOrder	Specifies a bar item’s position in a merging toolbar.

Visibility Options

Member	Description
ActuallyVisible	Determines bar item’s on-screen visibility.
VisibleForUser	Determines whether a bar item can be visible.


Bar Manager Options

Bar Manager options include:

Appearance Options

Member	Description
AutoDockColor	Specifies whether a dock control and its parent form colors can be synchronized.
Backgrounds	Specifies background bitmaps for toolbars and submenus.
Font	Specifies font settings for toolbar/menu system entries.
ImageOptions	Represents bar item image options.
LookAndFeel	Specifies toolbar paint styles.
Behavior Options

Member	Description
AllowCallFromAnotherForm	Specifies whether actions performed in an active additional form can be handled in an inactive parent form.
AlwaysSaveText	Specifies whether changes made to the built-in editor’s contents are saved automatically upon exiting the edit mode.
MenuAnimations	Specifies menu animation styles.
MostRecentItemsPercents	Specifies a value that is used to calculate frequently used items.
Scaled	Specifies whether the system’s font settings or the bar manager’s font settings are applied to toolbar/menu system entries.
ShowFullMenusAfterDelay	Specifies whether hidden items are automatically displayed after a delay.
StretchGlyphs	Specifies whether an item’s glyph is scaled if an item is resized.
UseF10ForMenu	Specifies whether a bar manager responds to the F10 key press event.
UseFullReset	Specifies whose default settings are to be restored – bar items only or both bar items and toolbars.
UseSystemFont	Specifies that only system font settings are applied to toolbar/menu system entries.

User Customization Options

Member	Description
AllowReset	Specifies whether toolbar default settings can be restored by end-users in the Customization Form.
CanCustomize	Specifies toolbar run-time customization capability.

Docking Options

Member	Description
NotDocking	Specifies dock constraints for toolbars.
WaitForDockingTime	Specifies the delay after which a dragged toolbar can be docked.
Hint Options

Member	Description
ShowHint	Specifies an item hint’s visibility.
ShowHintForDisabledItems	Specifies a disabled item hint’s visibility.
ShowShortCutInHint	Specifies a shortcut’s visibility in a hint window.
Layout Options

Member	Description
MenusShowRecentItemsFirst	Specifies whether recently used items are displayed first in menus.

Merging Options

Member	Description
AlwaysMerge	Specifies whether merging is only allowed for an MDI child window maximization, or it is allowed for any operation performed on this window.

Visibility Options

Member	Description
AutoHideEmptyBars	Specifies empty toolbars’ visibility.
CategoryItemsVisible	Specifies visibility for items of a particular category.
CategoryVisible	Specifies visibility for a specified category.
HideFloatingBarsWhenInactive	Specifies visibility for floating toolbars of an inactive form.
ShowCloseButton	Specifies visibility for a main menu’s Close button.
ShowHelpButton	Specifies visibility for the Customization Form‘s Help button.
SunkenBorder	Specifies a dock control sunken border’s visibility.


Toolbar Options

Toolbar options include:

Appearance Options

Member	Description
AlphaBlendValue	Specifies a floating toolbar’s opacity.
BorderStyle	Specifies a toolbar’s border style.
Caption	Specifies a toolbar’s caption.
BackgroundBitmap	Specifies a toolbar’s background image.
Color	Specifies a toolbar’s background color.
Font	Specifies font settings for toolbar’s items.
Behavior Options

Member	Description
AllowClose	Specifies whether a toolbar can be hidden by an end-user.
IsMainMenu	Specifies whether a toolbar represents a main menu.
UseOwnFont	Specifies whether the toolbar’s font settings or the bar manager’s font settings are applied to bar items.

Customize Options

Member	Description
AllowCustomizing	Specifies a toolbar’s customization capability.
AllowQuickCustomizing	Specifies whether a Customize button is displayed in a toolbar.
AllowReset	Specifies whether a toolbar can be restored to its default settings.

Docking Options

Member	Description
DockingStyle	Specifies a toolbar’s dock position within a form.
NotDocking	Specifies a toolbar’s dock constraints.

Layout Options

Member	Description
MultiLine	Specifies whether items can occupy a single row or multiple rows within a toolbar.
RotateWhenVertical	Specifies whether items are rotated clockwise within a toolbar, if it is docked vertically.
UseRecentItems	Specifies whether recently used items are displayed first within a toolbar.
UseRestSpace	Specifies whether a toolbar entirely occupies a space between a form’s opposite edges, or it is clipped after the last bar item.
WholeRow	Specifies whether a specified toolbar is only displayed in a row, or multiple toolbars are allowed in it.
Visibility Options

Member	Description
Hidden	Specifies a toolbar’s visibility in a toolbar list.
Visible	Specifies a toolbar’s on-screen visibility.


dxBar Unit Overview
dxBar Unit

Components

TdxBarApplicationMenuExtraPane

TdxBarManager

TdxBarPopupMenu

TdxBarScreenTipRepository

Items

TCustomdxBarCombo

TCustomdxBarContainerItem

TCustomdxBarSubItem

TdxBarButton

TdxBarCombo

TdxBarComponent

TdxBarContainerItem

TdxBarCustomCombo

TdxBarEdit

TdxBarItem

TdxBarListItem

TdxBarSeparator

TdxBarSubItem

TdxBarWindowItem

TdxCustomBarEdit

Item Controls

TCustomdxBarComboControl

TdxBarButtonLikeControl

TdxBarButtonControl

TdxBarComboControl

TdxBarContainerItemControl

TdxBarEditControl

TdxBarItemControl

TdxBarSubItemControl

TdxBarWinControl

TdxCustomBarEditControl

Classes

TCustomdxBarControl

TdxBar

TdxBarApplicationMenuButton

TdxBarApplicationMenuButtons

TdxBarBackgrounds

TdxBarCaptionButton

TdxBarCaptionButtons

TdxBarControl

TdxBarCustomPopupMenu

TdxBarCustomScreenTipBand

TdxBarDockControl

TdxBarGroup

TdxBarExtraPaneItem

TdxBarExtraPaneItems

TdxBarImageOptions

TdxBarItemActionLink

TdxBarItemLink

TdxBarItemLinks

TdxBarItemOptions

TdxBarLabel

TdxBarManagerList

TdxBarPainter

TdxBarPersistent

TdxBarPopupMenuLinks

TdxBarPopupMenuLink

TdxBars

TdxBarScreenTip

TdxBarScreenTipBand

TdxBarScreenTipCollection

TdxBarScreenTipFooterBand

TdxBarSubMenuControl

TdxDockCol

TdxDockControl

TdxDockRow

Other Types

TdxBarBorderStyle

TdxBarButtonGroupPosition

TdxBarButtonStyle

TdxBarDockAlign

TdxBarGlyphLayout

TdxBarItemAlign

TdxBarItemPosition

TdxBarItemViewLevels

TdxBarItemMergeKind

TdxBarItemOptionValues

TdxBarKind

TdxBarMarkState

TdxBarPaintStyle

TdxBarScreenTipBandTextAlign

TdxBarScreenTipBandType

TdxBarSpinEditButton

TdxBarStaticBorderStyle

TdxBarUserDefine

TdxBarUserDefines

TdxScreenTipRepositoryFonts

Routines

ActiveBarControl

dxBarRegisterItem

dxBarUnregisterItem

GetBarManagerByForm

Variables

dxBarHintWindowClass

dxBarMakeInactiveImagesDingy

dxBarManagerList

dxBarPlaySound

Global Constants

dxBarDefaultButtonArrowWidth

dxBarDefaultLargeButtonArrowWidth


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; Otherwise, 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.


dxBarHintWindowClass

See Also          Example

Unit

dxBar

type

  TdxBarHintWindowClass = class of TdxBarHintWindow;

var

  dxBarHintWindowClass: TdxBarHintWindowClass = TdxBarHintWindow;

Description

This global variable is designed to specify the window class used to display hints.  By default, the dxBarHintWindowClass refers to the TdxBarHintWindow class.


dxBarMakeInactiveImagesDingy

See Also

Enables the fade effect for icons in inactive bar item controls.

Unit

dxBar

var

  dxBarMakeInactiveImagesDingy: Boolean;

Description

Set this global variable to False, to display icons in inactive bar item controls as is.  Otherwise, these icons will appear faded.

Value	Sample
True
False

To disable the fade effect for all bar item controls on a form, assign False to the global variable in the form’s OnCreate event handler.

The default value of the dxBarMakeInactiveImagesDingy global variable is True.


dxBarPlaySound

Enables sounds when a submenu is opened.

Unit

dxBar

var

  dxBarPlaySound: Boolean;

Description

To disable sounds when submenus are opened, set this global variable to False.

The default value of the dxBarPlaySound global variable is True.


TdxBarHintWindow
TdxBarHintWindow Object

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


TdxBarHintWindow Methods

TdxBarHintWindow          Legend

In TdxBarHintWindow

Paint

ActivateHint


TdxBarHintWindow.Paint

TdxBarHintWindow          Example

procedure Paint; override;

Description

This procedure draws a hint window on screen.


TdxBarHintWindow.ActivateHint

TdxBarHintWindow          Example

Displays a hint window for an element controlled by ABarManager.

function ActivateHint(ABarManager: TdxBarManager; const AHintText, AShortCut: string): Boolean; virtual;

Description

The AHintText and AShortCut parameters return the text string and shortcut displayed in a hint.  For bar items, the AShortCut parameter is initialized using a shortcut specified by the corresponding bar item control’s ShortCut property.

Return True as the function’s result to display the hint window.  Otherwise, this window won’t be displayed.

Note:	Compared to the previous version of ExpressBars, the ActivateHint function doesn’t require the screen coordinate of a hint window to be passed as a parameter.  This coordinate is determined automatically.


TdxBarItemMergeKind
TdxBarItemMergeKind type

See Also

Unit

dxBar

type

  TdxBarItemMergeKind = (mkAdd, mkMergeByCaption, mkNone);

Description

Values include:

Value	Meaning
mkAdd	An item is added to the bar-merger at the position specified by the item’s MergeOrder property.  If the item’s MergeOrder property’s values of the original and merged items are identical, then the merged item will be placed after the original which has the same ordinal number.
mkMergeByCaption	When being merged into the bar, the merged item is combined with the original bar item if captions (see the TdxBarItemLink.Caption property) and types match (only performed for the following types: TdxBarContainerItem, TdxBarSubItem, TdxBarToolbarsListItem, TdxBarInPlaceSubItem).  Note that both items should have their mkMergeByCaption flag on the MergeKind property active.
mkNone	An item won’t be added to the bar.


TdxBarPopupMenuLinks
TdxBarPopupMenuLinks Object

Hierarchy          Properties          Methods          See Also

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

Unit

dxBar

TdxBarPopupMenuLinks = class(TCollection);


Hierarchy

TCollection

|

TdxBarPopupMenuLinks


TdxBarPopupMenuLinks Properties

TdxBarPopupMenuLinks          Legend

TdxBarPopupMenuLinks

BarManager

Items


TdxBarPopupMenuLinks Methods

TdxBarPopupMenuLinks          Legend

TdxBarPopupMenuLinks

Add

Create

DoAction


TdxBarPopupMenuLinks.Create

TdxBarPopupMenuLinks

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

constructor Create(ABarManager: TdxBarManager);


TdxBarPopupMenuLinks.Add

TdxBarPopupMenuLinks

Adds a new menu link to a TdxBarPopupMenuLinks collection.

function Add: TdxBarPopupMenuLink;


TdxBarPopupMenuLinks.DoAction

TdxBarPopupMenuLinks          See Also

Called when a user presses the right mouse button on a control.

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

Description

If DoAction returns True, then the popup menu was called for the control.  Otherwise, DoAction returns False.


TdxBarPopupMenuLinks.BarManager

TdxBarPopupMenuLinks

Provides access to bar manager which handles a given menu links collection.

property BarManager: TdxBarManager;

ReadOnly Property


TdxBarPopupMenuLinks.Items

TdxBarPopupMenuLinks          See Also

Includes a list of menu links in a given TdxBarPopupMenuLinks 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
TdxBarPopupMenuLink Object

Hierarchy          Properties          Methods          Events

Represents a separate menu link that connects a control on a form with a TdxBarPopupMenu.  This popup menu is activated upon pressing the right mouse button on a control.

Unit

dxBar

TdxBarPopupMenuLink = class(TCollectionItem);


Hierarchy

TCollectionItem

|

TdxBarPopupMenuLink


TdxBarPopupMenuLink Properties

TdxBarPopupMenuLink          Legend

In TdxBarPopupMenuLink

BarManager

Control

PopupMenu

ProcessChildren


TdxBarPopupMenuLink Methods

TdxBarPopupMenuLink          Legend

In TdxBarPopupMenuLink

Assign

DoAction


TdxBarPopupMenuLink Events

TdxBarPopupMenuLink          Legend

In TdxBarPopupMenuLink

OnAction


TdxBarPopupMenuLink.DoAction

TdxBarPopupMenuLink          See Also

Prepares a popup menu to be displayed on screen and generates an OnAction event.

function DoAction(Wnd: HWND; const P: TPoint): Boolean; overload;

Description

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

Specifies a TdxBarManager that controls a given menu link.

property BarManager: TdxBarManager;

ReadOnly Property


TdxBarPopupMenuLink.Control

TdxBarPopupMenuLink          See Also

Specifies the control associated with a popup menu.

property Control: TControl;


TdxBarPopupMenuLink.PopupMenu

TdxBarPopupMenuLink          See Also

Specifies the popup menu associated with a control.

property PopupMenu: TdxBarPopupMenu;


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, a parent control’s popup menu won’t be displayed for child controls.

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 determine 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.


TdxBarPopupMenuLink.Assign

TdxBarPopupMenuLink

Copies properties of another menu link.

procedure Assign(Source: TPersistent); override;

Description

Call the Assign method to set the popup menu link’s published properties to the values specified by Source.

If Source is another TdxBarPopupMenuLink object, the Assign method matches the popup menu link properties with the source.

If not, the Assign method calls the inherited method to copy item link properties from any object that can assign them through the AssignTo method.


 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(TdxBarCustomPopupMenu);

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

|

TdxBarComponent

|

TdxBarCustomPopupMenu

|

TdxBarPopupMenu


Properties for TdxBarPopupMenu
TdxBarPopupMenu Properties

TdxBarPopupMenu               Legend

Derived from TdxBarCustomPopupMenu

BackgroundBitmap

BarManager

BarSize

Font

ItemLinks

ItemOptions

SubMenuControl

UseOwnFont

UseRecentItems

Derived from TdxBarComponent

BarManager

Enabled

Visible


Methods for TdxBarPopupMenu
TdxBarPopupMenu Methods

TdxBarPopupMenu               Legend

Derived from TdxBarCustomPopupMenu

Create

Destroy

Popup

PopupEx

PopupFromCursorPos


Events for TdxBarPopupMenu
TdxBarPopupMenu Events

TdxBarPopupMenu               Legend

Derived from TdxBarCustomPopupMenu

OnCloseUp

OnPaintBar

OnPopup


TdxBar
TdxBar Object

Hierarchy          Properties           Methods          See Also          Example 1          Example 2

Represents the non-visual portion of a toolbar.

Unit

dxBar

TdxBar = class(TcxComponentCollectionItem, IdxBarSelectableItem, IdxBarLinksOwner);

Description

This object stores all the information, which is required for a toolbar’s existence and for its visual representation.  Objects of the TdxBar type are stored within objects of the TdxBars type.  The properties of a toolbar can be stored in the registry or an INI file (as specified in a corresponding TdxBarManager).


Hierarchy

TcxComponentCollectionItem

|

TdxBar


TdxBar Properties

TdxBar               Legend

In TdxBar

AllowClose

AllowCustomizing

AllowQuickCustomizing

AllowReset

AlphaBlendValue

BackgroundBitmap

BarManager

Bars

BorderStyle

Caption

CaptionButtons

Color

Control

DockControl

DockedDockControl

DockedDockingStyle

DockedLeft

DockedTop

DockingStyle

DockRow

FloatClientHeight

FloatClientWidth

FloatLeft

FloatTop

Font

Glyph

Hidden

IsMainMenu

IsPredefined

ItemLinks

KeyTip

MultiLine

Name

NotDocking

LockUpdate

OneOnRow

RealDockControl

RotateWhenVertical

Row

ShowMark

SizeGrip

UseOwnFont

UseRecentItems

UseRestSpace

Visible

WholeRow

Derived from TComponent

Name

Tag


TdxBar Methods

TdxBar               Legend

In TdxBar

Assign

ChangeDockingStyle

Create

Destroy

GetCollectionFromParent

Merge

Move

Reset

ResetWithConfirmation

SetParentComponent

Unmerge


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 to the right of the toolbar.  Set the ShowMark property to True to enable it:

or False to disable it.

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 an end-user or was defined programmatically.

property IsPredefined: Boolean;

Description

The IsPredefined property returns True if the settings of the current toolbar were defined programmatically and were not loaded from the registry or an INI file.  In this instance, the current toolbar cannot be deleted or renamed.  If the settings of the current toolbar were loaded from the registry or an INI file, its IsPredefined property returns False.

ReadOnly Property


TdxBar.AllowClose

TdxBar

Specifies whether an end-user can hide a toolbar.

property AllowClose: Boolean;

Description

If the AllowClose property is set to True, an end-user can hide the current toolbar.  Otherwise, an end-user cannot hide it.  Additionally, if the AllowClose property is set to False, the current toolbar isn't displayed in the list of existing toolbars (which is represented by the TdxBarToolbarsListItem), nor in the toolbar popup menu which appears every time an end-user presses the right mouse button over a docking area.


TdxBar.AllowCustomizing

TdxBar          See Also          Example

Specifies whether the current toolbar has general customization capabilities.

property AllowCustomizing: Boolean;

Description

If the AllowCustomizing property is set to True, end-users can add, move and remove items on the current toolbar at runtime.  Otherwise, these capabilities are unavailable to end-users.

The default value of the AllowCustomizing property is True.


TdxBar.AllowQuickCustomizing

TdxBar          See Also          Example

Specifies whether the current toolbar has the quick customization capability.

property AllowQuickCustomizing: Boolean;

Description

If the AllowQuickCustomizing property is set to True, the quick customization button is displayed in place of the items that do not fit in the toolbar for a docked toolbar, and on the caption title for a floating toolbar.

A click on the quick customization button activates the Quick Customization Popup Menu, which contains a list of buttons available for the corresponding toolbar.  End-users can select the buttons they wish to display and uncheck the ones they want to visually suppress.  Refer to the Using Context Menus topic to learn about the Quick Customization Popup Menu.

If the AllowQuickCustomizing property is set to False, the quick customization button is not displayed.

The default value of the AllowQuickCustomizing property is True.


TdxBar.AllowReset

TdxBar          See Also

Specifies whether a toolbar can be restored by end-users.

property AllowReset: Boolean;

Description

If the AllowReset property is set to True, end-users can restore the original settings for the current toolbar by clicking the ‘Reset…’ button on the toolbar customization form or using the Quick Customization popup.  Set the AllowReset property to False to prevent the current toolbar from being restored.  In such an instance, the ‘Reset…’ button is disabled.

The default value of the AllowReset property is True.


TdxBar.AlphaBlendValue

TdxBar

Specifies the opacity of the current toolbar when it floats.

property AlphaBlendValue: Byte;

Description

When a toolbar floats, the opacity specified by the AlphaBlendValue property is applied to it.  This property accepts 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 current toolbar’s background.

property BackgroundBitmap: TBitmap;

Description

Use the BackgroundBitmap property to assign a background image to the current toolbar.  The specified image is used independently of the position or state of the toolbar.  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 the bars owned by a bar manager.  Use the Backgrounds.Bar property of the bar manager for this purpose.

If a toolbar 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 the current toolbar’s borders.

type

  TdxBarBorderStyle = (bbsNone, bbsSingle);

property BorderStyle: TdxBarBorderStyle;

Description

Use the BorderStyle property to specify the border style of the current toolbar.  All the possible values are listed in the following table.

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

The default value of the BorderStyle property is bbsSingle.


TdxBar.BarManager

TdxBar

Provides access to the bar manager which the current toolbar belongs to.

property BarManager: TdxBarManager;

Description

Use the BarManager property to access the bar manager to which the current toolbar belongs.  Each toolbar can be accessed using the corresponding bar manager’s Bars property.

ReadOnly Property


TdxBar.Caption

TdxBar          Example

Specifies the text string that identifies a toolbar to an end-user.

property Caption: string;

Description

Use this property to specify the caption which is displayed in the following elements:

•	the header of a movable bar control accessible via the Control property;

•	the toolbars list within the customization form;

•	the toolbar popup menu, which appears every time an end-user presses the right mouse button over a docking area.


TdxBar.CaptionButtons

TdxBar

Represents a collection of toolbar title buttons.

property CaptionButtons: TdxBarCaptionButtons;

Description

TdxBarCaptionButton class represents a toolbar title button.  This type of button can serve as a link to advanced functionality (or options) of a toolbar.  For instance, it can be used as a dialog launcher button in a Ribbon tab group.

Any number of buttons can be specified for a particular toolbar.  These buttons can be created both at design (using the bar’s CaptionButtons property) and run-time (using the collection’s Add method).

Once created, all of them are stored in the CaptionButtons collection.


TdxBar.Control

TdxBar

Returns the bar control which corresponds to the current toolbar.

property Control: TdxBarControl;

Description

Use this property to access the bar control that has been created using the information from the current toolbar.  If the toolbar’s Visible property is set to False, then the Control property returns nil.

ReadOnly Property


TdxBar.Color

TdxBar

Specifies the current toolbar’s background color.

property Color: TColor;

Description

Use the Color property to change the background color of the current toolbar.  Individual links residing within the bar are also painted using the specified background color.  Note that submenus do not use the color specified.

The default value of the Color property is clDefault.


TdxBar.LockUpdate

TdxBar

Toggles the updating of the current bar.

property LockUpdate: Boolean;

Description

This property is obsolete and used for compatibility purposes.  To enclose the code that updates a bar, use a bar manager’s BeginUpdate/EndUpdate methods instead.

Note:	Setting the LockUpdate property to False is equivalent to passing True to the bar manager’s EndUpdate method.


TdxBar.DockControl

TdxBar          See Also

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

property DockControl: TdxBarDockControl;

Description

The ExpressBars Suite 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 current toolbar.


TdxBar.DockedDockControl

TdxBar          See Also

Specifies the external dock control to which the current toolbar was previously 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 was previously docked.  If this property’s value is not nil, a double-click moves the toolbar back to the dock control as specified by the DockedDockControl property.


TdxBar.DockingStyle

TdxBar            See Also                 Example 1          Example 2

Specifies the layout of the current bar.

type

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

property DockingStyle: TdxBarDockingStyle;

Description

Specifies the side of the form to which the current toolbar is docked.  If the DockingStyle property is set to dsNone, the toolbar floats.

If the toolbar’s Visible is set to True, then assigning the DockingStyle 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.Glyph

TdxBar            See Also

Specifies the icon that is displayed within a collapsed Ribbon tab group bound to the current toolbar.

property Glyph: TBitmap;

Description

The specified icon is displayed when the tab group is collapsed into one bar item.  Use the tab group’s CanCollapse property to control how the group can be scaled down.


TdxBar.Hidden

TdxBar            See Also

Determines the visibility state of the current toolbar in the toolbars list.

property Hidden: Boolean;

Description

If the Hidden property is set to True, the current toolbar is not displayed in the toolbars list of the customization form or in the toolbar popup menu which appears every time an end-user presses the right mouse button over a docking area.

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

The default value of the Hidden property is False.


TdxBar.IsMainMenu

TdxBar

Determines whether the current toolbar is the main menu.

property IsMainMenu: Boolean;

Description

If the IsMainMenu property returns True, the current toolbar performs the role of a main menu.  In this instance, the bar manager’s MainMenuBar property refers to this toolbar and the bar manager’s MainMenuControl property refers to the current bar’s Control property.  You can set the IsMainMenu property programmatically or within the customization form.

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


TdxBar.ItemLinks

TdxBar            See Also

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

property ItemLinks: TdxBarItemLinks;

Description

This property specifies an array of links to bar manager’s items.  The toolbar’s item controls are created using the information from these item links.


TdxBar.KeyTip

TdxBar

Specifies a KeyTip for the current toolbar.

property KeyTip: string;

Description

Note:	The specified KeyTip only appears if the tab is bound to a collapsed ribbon tab group.


TdxBar.MultiLine

TdxBar

Specifies whether items can be placed across several lines within the current 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

Specifies the name of the current toolbar.

property Name: TComponentName;

Description

Prior to ExpressBars Suite v6, the Name property type was string and the BarByName method was used to access a toolbar by its name.

With ExpressBars Suite v6, the Name property type is TComponentName.  As a result, you can directly refer to a toolbar by its name.  The BarByName method is now obsolete.

Use the manager’s BarByOldName method or the bar’s OldName property if you were using an older version of the ExpressBars Suite and your project refers to the obsolete BarByName method.

To find a toolbar by its name in new projects, use the BarByComponentName method instead.


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 the current toolbar cannot be docked.

Note:	If dsNone is included into the value of the NotDocking property, a toolbar cannot be floating.  Pay attention to the state of the bar manager’s NotDocking property.


TdxBar.Visible

TdxBar            See Also          Example

Specifies whether the current toolbar is visible.

property Visible: Boolean;

Description

Use the Visible property to hide or display the current toolbar.  If this property is set to True, the Control property returns the visible bar control.  Otherwise, the current toolbar is not displayed and the Control property returns nil.

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

Provides access to the TdxBars object to which a given toolbar belongs.

property Bars: TdxBars;

Description

Use the Bars property to access all the toolbars which are controlled by the bar manager.  The current 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 specifies the left coordinate of a docked toolbar.  This property’s value is presented in the dock control’s coordinates.  For example, if there is one toolbar docked to the right side of a form, then the value of its DockedLeft property is equal to 0.


TdxBar.DockedTop

TdxBar            See Also          Example

Specifies the top coordinate of a docked toolbar.

property DockedTop: Integer;

Description

The DockedTop property specifies the top coordinate of a docked toolbar.  This property’s value is presented in the dock control’s coordinates.  For example, if there is one toolbar docked to the bottom of a form, then the value of its DockedTop property is equal to 0.


TdxBar.FloatLeft

TdxBar            See Also          Example

Determines the left coordinate of a floating toolbar.

property FloatLeft: Integer;

Description

The FloatLeft property specifies the left coordinate of a toolbar whose DockingStyle property is set to dsNone.  The FloatLeft property’s value is given as a screen coordinate.


TdxBar.FloatTop

TdxBar            See Also          Example

Determines the top coordinate of a floating toolbar.

property FloatTop: Integer;

Description

The FloatTop property specifies the top coordinate of a toolbar whose DockingStyle property is set to dsNone.  The FloatTop property’s value is given as a screen coordinate.


TdxBar.FloatClientWidth

TdxBar            See Also

Specifies the width of a floating toolbar.

property FloatClientWidth: Integer;

Description

Use the FloatClientWidth property to specify the width of a toolbar whose DockingStyle property is set to dsNone.


TdxBar.FloatClientHeight

TdxBar            See Also

Specifies the height of a floating toolbar.

property FloatClientHeight: Integer;

Description

Use the FloatClientHeight property to specify the height of a toolbar whose DockingStyle property is set to dsNone.


TdxBar.Font

TdxBar          See Also

Specifies the item’s font settings.

property Font: TFont;

Description

Specifies the font settings used to display all the items that belong to the current toolbar.

Note:	If the Font property’s value is modified, the UseOwnFont property is set to True.


TdxBar.OneOnRow

TdxBar          Example

Determines whether the current toolbar is the only toolbar within the dock control’s row.

property OneOnRow: Boolean;

Description

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


TdxBar.RotateWhenVertical

TdxBar            See Also

Specifies the drawing style of a docked toolbar.

property RotateWhenVertical: Boolean;

Description

If the RotateWhenVertical property is set to True, when the current toolbar is docked to the left or right side of a form, all item controls on it are rotated 90 degrees clockwise.  Otherwise, the orientation of the item controls is unaffected.

The default value of the RotateWhenVertical property is True.


TdxBar.RealDockControl

TdxBar          See Also

Provides access to the dock control onto which the current toolbar is placed.

property RealDockControl: TdxDockControl;

Description

Along with external dock controls the ExpressBars Suite contains four default internal dock controls.  Use the RealDockControl property to access the dock control for the current toolbar.

ReadOnly Property


TdxBar.Row

TdxBar            See Also          Example

Specifies the row on which the current toolbar is located.

property Row: Integer;

Description

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


TdxBar.SizeGrip

TdxBar

Specifies whether to display a sizing grip at the current toolbar's bottom-right corner.

property SizeGrip: Boolean;

Description

Set the SizeGrip property to True to display a sizing grip at the current toolbar's bottom-right corner.  This grip can be used to resize a form.

Note:	This property is in effect only when the current toolbar visually represents a status bar, i.e. when:

•	it has no border (its BorderStyle property is set to bbsNone);

•	it occupies a whole row;

•	it’s docked at the bottom position and there are no other controls under this bar.

The default value of the SizeGrip property is True.


TdxBar.UseOwnFont

TdxBar          See Also

Specifies the font settings used to draw controls on the current toolbar.

property UseOwnFont: Boolean;

Description

When the UseOwnFont property is set to False, then the font settings of the bar manager are used to draw controls on the current toolbar (as specified by the bar manager’s Font property).  Otherwise, the toolbar’s font settings are used.

The default value of the UseOwnFont property is False.


TdxBar.UseRecentItems

TdxBar          See Also

Specifies whether the current toolbar displays the most frequently used controls first.

property UseRecentItems: Boolean;

Description

If the UseRecentItems property is set to True, the most frequently used controls are placed first and other item controls follow accordingly.  Otherwise, item controls will be displayed on the current toolbar in a fixed order.

The default value of the UseRecentItems property is True.


TdxBar.UseRestSpace

TdxBar          See Also          Example

Specifies the drawing style for the current toolbar.

property UseRestSpace: Boolean;

Description

If the UseRestSpace property is set to True, the current toolbar extends to the opposite edge of a form.  Otherwise, the toolbar terminates after the last item control.

The default value of the UseRestSpace property is False.


TdxBar.WholeRow

TdxBar            See Also

Specifies how the current toolbar is drawn on the row.

property WholeRow: Boolean;

Description

If the WholeRow property is set to True, the current toolbar is the only toolbar in the row and it occupies all the free space in the row.  All other toolbars within this row are automatically moved to the next row.

Changing the value of the WholeRow property causes the current toolbar to be redrawn based on the property value.

The default value of the WholeRow property is False.


TdxBar.DockedDockingStyle

TdxBar            See Also          Example

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

type

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

property DockedDockingStyle: TdxBarDockingStyle;

Description

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


TdxBar.Create

TdxBar          See Also

Creates a toolbar.

constructor Create(Collection: TCollection); override;

Description

Creates and initializes an instance of the TdxBar class.


TdxBar.Destroy

TdxBar          See Also

Destroys the current toolbar.

destructor Destroy; override;

Description

Destroys every item belonging to the current toolbar and then destroys an instance of the TdxBar class.


TdxBar.ChangeDockingStyle

TdxBar            See Also

Changes the layout of the current toolbar.

type

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

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

Description

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


TdxBar.Merge

TdxBar          See Also          Concepts

Merges a given toolbar with the current toolbar.

procedure Merge(ABar: TdxBar);

Description

Use the Merge method to join the current and the ABar toolbars.

Note: with this method, you can sequentially merge any number of toolbars with the current toolbar.


TdxBar.Move

TdxBar

Moves the current bar to a new location.

type

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

procedure Move(X, Y: Integer);

procedure Move(ADockControl: TdxDockControl; ARow, APosition: Integer);

procedure Move(ADockingStyle: TdxBarDockingStyle; ARow, APosition: Integer);

procedure Move(ABar: TdxBar; AInsertAfter: Boolean = True);

Description

The first overloaded variant of the method makes the current bar float (see the DockingStyle property) and moves it to the specified location.

X and Y specify the absolute screen coordinates of the bar’s top-left corner.

The second overloaded variant moves the current bar into the specified dock control.

ADockControl specifies the dock control to which the current bar will be moved;

ARow specifies a row in the dock control where the current bar will be placed (see the TdxBar.Row property);

APosition specifies a position of the current bar in ARow.

The third overloaded variant moves the current bar to the specified form’s or user control’s edge.

ADockingStyle specifies the location constraint.  If the ADockingStyle parameter is set to dsNone, then no operation is performed;

ARow specifies a row in the dock control where the current bar will be placed (see the TdxBar.Row property);

APosition specifies the position of the current bar in ARow.

The fourth overloaded variant moves the current bar to the dock control where ABar is located.

ABar specifies the bar within which the current bar will be placed;

AInsertAfter specifies how both bars will be arranged in the dock’s row.  Set AInsertAfter to True to place the current bar after ABar.


TdxBar.Reset

TdxBar          See Also

Restores the current toolbar’s settings.

procedure Reset;

Description

Call the Reset method to restore the original settings of the current toolbar.  By default, settings only related to toolbar item links will be restored.  To restore additional settings – such as size, position, docking style, state, etc. – set the bar manager’s UseFullReset property to True.

The Reset method fires the OnBarBeforeReset and the OnBarAfterReset events.  Handle these events to perform specific actions before and after reset operations.

At runtime, the Reset method can be invoked by clicking the Reset button within the Toolbars page of the Customization Form.

To reset a toolbar with a confirmation request, use the ResetWithConfirmation method.


TdxBar.ResetWithConfirmation

TdxBar          See Also

Requests end-user confirmation before resetting the current toolbar’s original settings.

procedure ResetWithConfirmation;

Description

At runtime the ResetWithConfirmation method can be invoked by clicking the Reset button on the Toolbars page of the Customization Form.


TdxBar.Unmerge

TdxBar          See Also          Concepts

Removes the ABar toolbar from the current toolbar.

procedure Unmerge(ABar: TdxBar = nil);

Description

Use the Unmerge method to split the merged toolbars.

ABar specifies the merged toolbar that will be created as a standalone bar.  If nil is passed, then all the toolbars that are joined with the current toolbar will be unmerged.


TdxBar.Assign

TdxBar          See Also

Copies the properties of another TdxBar object.

procedure Assign(Source: TPersistent); override;

Description

Call the Assign method to set the published properties of the bar to match the object specified by the Source parameter.  If Source is a TdxBar object, the Assign method matches the bar properties of the source.

If Source is not a TdxBar object, the Assign method calls the inherited method so that the bar properties can be copied from any object that can assign them using the AssignTo method.


TdxBar.SetParentComponent

TdxBar

Determines the parent component specified by the AParent parameter.

procedure SetParentComponent(AParent: TComponent); override;

Description

When a toolbar is added to the current bar manager’s Bars collection via the Add method, the parent component of the collection becomes the parent component of the toolbar.  When a toolbar is created using the Create method, the SetParentComponent method must be called to determine the parent component and the bars collection that it belongs to.

The SetParentComponent method specifies the bars collection, the bar manager’s font settings for a toolbar and initiates the dxBarItemLinks object.  The parent component of the collection becomes the parent component of the toolbar.

Use this method to replace the present bars collection by the parent component specified by AParent.

To access the bars collection by its parent component, use the GetCollectionFromParent method.

To get the parent component of a toolbar, use the GetParentComponent method.


TdxBar.GetCollectionFromParent

TdxBar

Returns the bar manager’s bars collection.

function GetCollectionFromParent(AParent: TComponent): TcxComponentCollection; override;

Description

A bar manager contains all toolbars in its Bars collection.

Use the GetCollectionFromParent method to access this collection.

AParent specifies the bar manager.


TdxBar.DockRow

TdxBar

Specifies the row that the current toolbar is docked to.

property DockRow: TdxDockRow;


TdxBar.OldName

TdxBar

Specifies the current toolbar’s name that is to be used when searching for a toolbar by its name.

property OldName: string;

Description

With ExpressBars Suite v6, the Name property type is TComponentName.  You can now refer to a toolbar by its name.

In projects developed using previous versions of the ExpressBars Suite, the Name property type was string and the BarByName method was used to search for a toolbar by its name.  When an old project is opened (originally built using an older version of the ExpressBars Suite), this property is set to the old Name property value stored in the .dfm file.  To enable use of projects created with older versions of ExpressBars Suite, use the bar manager’s BarByOldName method or the bar’s OldName property.  The BarByName method is now obsolete.


TdxBarBackgrounds
TdxBarBackgrounds Object

Hierarchy          Properties          Methods

Specifies images used as the background of bars and submenus.

Unit

dxBar

TdxBarBackgrounds = class(TPersistent)

Description

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


TdxBarBackgrounds Hierarchy
Hierarchy

TPersistent

     |

TdxBarBackgrounds


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 the interface elements that 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 submenus.

property SubMenu: TBitmap;

Description

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

Note that the SubMenu property affects not only subitems.  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’s value.

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


TdxBarGroup
TdxBarGroup Object

Hierarchy          Properties          Methods          See Also

Represents an item group.

Unit

dxBar

TdxBarGroup = class(TdxBarComponent);

Description

You can access any grouped item or group using its position within the group’s Items zero-based indexed collection.  The first item has an index of 0.  The number of items in a group is stored in the Count property.


Hierarchy

TComponent

     |

TdxBarComponent

     |

TdxBarGroup


TdxBarGroup Properties

TdxBarGroup           Legend

In TdxBarGroup

Count

Index

Items

Derived from TdxBarComponent

BarManager

Enabled

Visible


TdxBarGroup Methods

TdxBarGroup           Legend

In TdxBarGroup

Add

Delete

GetParentComponent

HasParent

IndexOf

Move

Remove

SetParentComponent


TdxBarGroup.Count

TdxBarGroup

Returns the number of items in the group.

property Count: Integer;

ReadOnly Property


TdxBarGroup.Index

TdxBarGroup

Specifies group index in the bar manager’s Groups collection.

property Index: Integer;

Description

The Index property returns the index of a given group in the zero-based collection represented by the bar manager’s Groups property.


TdxBarGroup.Items

TdxBarGroup

Provides indexed access to grouped items.

property Items[Index: Integer]: TComponent;

Description

Use the Items property to access a particular grouped item using its index.  The first item’s index is 0.  The total number of grouped items within the Items collection can be obtained via the Count property.

ReadOnly Property


TdxBarGroup.Add

TdxBarGroup

Adds a new item to the current group.

procedure Add(AItem: TdxBarComponent);

Description

Use the Add method to add an item or group into the current group.  When adding a group to the current group, all the items of the added group become members of the current group.


TdxBarGroup.Delete

TdxBarGroup          See Also

Deletes an item specified by its index from the current group.

procedure Delete(Index: Integer);

Description

This method deletes the item specified by the Index parameter from the Items collection.


TdxBarGroup.IndexOf

TdxBarGroup

Returns the index of the specified grouped item.

function IndexOf(AItem: TComponent): Integer;

Description

This function returns the index of the item specified by the AItem parameter within the Items zero-based collection.


TdxBarGroup.Move

TdxBarGroup

Moves a group item to a new position.

procedure Move(FromIndex, ToIndex: Integer);

Description

Moves a grouped item within the current group’s Items zero-based collection from its current position specified by the FromIndex parameter to a new position specified by the ToIndex parameter.  The Move method is called when arrow buttons are pressed within the Groups page of the customization form.


TdxBarGroup.Remove

TdxBarGroup          See Also

Deletes an item from the grouped items list.

procedure Remove(AItem: TComponent);

Description

Call the Remove method to delete an item specified by the AItem parameter from the current group.


TdxBarGroup.GetParentComponent

TdxBarGroup          See Also

Returns the bar manager to which the current group belongs to.

function GetParentComponent: TComponent; override;

Description

The GetParentComponent method is interchangeable with the BarManager property.

To determine whether the current group belongs to a bar manager, use the HasParent method.


TdxBarGroup.HasParent

TdxBarGroup          See Also

Determines whether the current group belongs to a bar manager.

function HasParent: Boolean; override;

Description

When a group is created via the bar manager’s CreateGroup method, this bar manager becomes its parent.  In this instance, the HasParent function returns True.

If a group is created via its constructor, this method returns True or False, depending upon whether the parent is specified.


TdxBarGroup.SetParentComponent

TdxBarGroup          See Also

Sets the parent component specified by the AParent parameter.

procedure SetParentComponent(AParent: TComponent); override;

Description

A group can be created and then added to the current bar manager’s Groups collection via the bar manager’s CreateGroup method.  In this instance, this bar manager becomes the parent component of the group.  When a group is created via its constructor, the SetParentComponent method must be called to set the parent component.

If the TdxBarManager object is passed as the AParent parameter, the SetParentComponent method specifies the parent bar manager and adds the current group to this bar manager’s Groups collection.  Otherwise, the inherited method is called.

You can also use this method to replace the bar manager that the current group belongs to by another (specified by the AParent parameter).

To determine whether the current group belongs to a bar manager, use the HasParent function.


TdxBarImageOptions
TdxBarImageOptions Object

Hierarchy          Properties

Represents bar item image options.

Unit

dxBar

TdxBarImageOptions = class(TdxBarPersistent)

Description

The TdxBarImageOptions class provides a centralized location to specify image options for bar items.

These options include:

•	CacheGlyphs – specifies whether to cache bar item images to improve performance;

•	DisabledImages – specifies the source of small images displayed by disabled items;

•	DisabledLargeImages – specifies the source of large images displayed by disabled items;

•	HotImages – specifies the image list whose images can be displayed within large button items when they are hot-tracked;

•	ImageListBkColor – specifies the transparent color of images within the bar manager’s image lists;

•	Images – specifies the image list associated with the current bar manager’s items;

•	LargeIcons – specifies which glyph size is to be applied to the current bar manager’s items;

•	LargeImages – specifies the image list whose images can be displayed within large button items;

•	MakeDisabledImagesFaded – specifies whether default images are to be painted faded;

•	SmoothGlyphs – specifies whether to draw stretched images in a smooth manner;

•	StretchGlyphs – specifies whether to stretch bar item images so that they fit bar item bounds;

•	UseLargeImagesForLargeIcons – specifies which images to use as bar item icons;

•	UseLeftBottomPixelAsTransparent.

The TdxBarImageOptions object is referenced by the bar manager’s ImageOptions property.


TdxBarImageOptions Hierarchy
Hierarchy

TPersistent

     |

TdxBarPersistent

     |

TdxBarImageOptions


Properties for TdxBarImageOptions
TdxBarImageOptions Properties

TdxBarImageOptions          Legend

In TdxBarImageOptions

CacheGlyphs

DisabledImages

DisabledLargeImages

GlyphSize

HotImages

ImageListBkColor

Images

LargeIcons

LargeImages

MakeDisabledImagesFaded

SmoothGlyphs

StretchGlyphs

UseLargeImagesForLargeIcons

UseLeftBottomPixelAsTransparent

Derived from TdxBarPersistent

BarManager


TdxBarImageOptions.CacheGlyphs

TdxBarImageOptions

Specifies whether caching of bar item images and glyphs is enabled.

property CacheGlyphs: Boolean;

Description

By default, a bar manager caches bar item images and glyphs to improve performance.  Once an image or glyph is displayed for a specific state of a bar item, a corresponding bitmap is added to the bar manager’s cache.  Later, if the bar item in this state needs to be painted, the bar manager’s cached bitmap is painted for this bar item.

You have to disable caching if you custom paint images using the procedure assigned via the cxGraphics.CustomDrawImageProc variable, if this procedure satisfies at least one of the following conditions:

•	It does not use alpha blending.

•	It paints 32-bit images faster than the caching mechanism.

To disable caching, set the CacheGlyphs property to False.

The default value of the CacheGlyphs property is True.


TdxBarImageOptions.DisabledImages

TdxBarImageOptions          See Also

Specifies the source of small images displayed by disabled items.

property DisabledImages: TCustomImageList;

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.  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 may be instances when an image list is assigned to the DisabledImages property, but a disabled item’s ImageIndex property specifies an unavailable index.  In this instance, the item will display no image.  Instead, its grayed caption will be displayed.


TdxBarImageOptions.DisabledLargeImages

TdxBarImageOptions          See Also

Specifies the source of large images displayed by disabled items.

property DisabledLargeImages: TCustomImageList;

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 these images to the DisabledLargeImages property.  Once complete, items will use images from this image list when their Enabled property is set to False.  The image is specified by its position within the list via the LargeImageIndex property of the item.

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


TdxBarImageOptions.GlyphSize

TdxBarImageOptions          See Also

Determines the glyph size of the current bar manager's items.

property GlyphSize: Integer;

Description

The GlyphSize property is used internally to determine the size of the glyphs of the current bar manager’s items.  The default value of this property is doubled when the items are enlarged (the LargeIcons property is set to True).

Glyph size influences the values of the bar manager’s ButtonWidth and ButtonHeight properties.

ReadOnly Property


TdxBarImageOptions.HotImages

TdxBarImageOptions          See Also

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

property HotImages: TCustomImageList;

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.  The specified hot image is only used if the item is within a toolbar (it is ignored if the item is within a sub-menu).

You can also specify hot images for items without using 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 a grayed-out hot image when in a normal state.

An image from the LargeImages list can be assigned to a large button via its LargeImageIndex property and in turn be displayed when the button is in its normal state.

In the following table, an item in a hot state is displayed with and without an assigned hot image.

The item is hot-tracked	The value of the HotImages property
	The value of the HotImages property is nil
	Values are assigned to the HotImages property and the item’s HotImageIndex property


TdxBarImageOptions.ImageListBkColor

TdxBarImageOptions          See Also

Specifies the transparent color of images within the bar manager’s image lists.

property ImageListBkColor: TColor;

Description

The default value of the ImageListBkColor property is clFuchsia.


TdxBarImageOptions.Images

TdxBarImageOptions          See Also

Specifies the image list that contains images for standard size (16 by 16 pixels) bar item controls.

property Images: TCustomImageList;

Description

Use an item’s ImageIndex property to specify which particular image from the Images list should be displayed for this item’s controls.

Item images derived from the TdxBarWindowItem class are visible only when the bars in which they are displayed are docked to the left or right side of the parent window (the dxBarFontNameCombo, dxBarImageCombo, dxBarTreeViewCombo, dxBarDateCombo, dxBarColorCombo, etc. – are displayed with their own images).

In the following image a toolbar docked to the right side of a form is displayed.  It contains two dxBarButton items with images and a dxBarColorCombo item with its own image.

To provide images for large size (32 by 32 pixels) item controls, use the LargeImages property.  To provide images for hot-tracked large buttons, use the HotImages property.

Note:	To specify which icons should be displayed for enlarged standard size buttons, use the UseLargeImagesForLargeIcons option.


TdxBarImageOptions.LargeIcons

TdxBarImageOptions          See Also

Specifies the glyph size of the current bar manager’s items.

property LargeIcons: Boolean;

Description

If the LargeIcons property is set to True, the glyph size of the current bar manager’s items is multiplied by 2.  The item’s size is increased correspondingly.  If this property value is False, the glyph size is standard (16 by 16 pixels).  To specify which icons should be displayed for enlarged standard size buttons, use the UseLargeImagesForLargeIcons option.

Use a submenu’s ItemOptions.Size property, to specify the glyph size of its items.

Note:	Changing the LargeIcons property doesn’t affect large buttons, and the height of bar items displayed in the Ribbon control.

The default value of the LargeIcons property is False.


TdxBarImageOptions.LargeImages

TdxBarImageOptions          See Also

Specifies the image list that contains images for large size (32 by 32 pixels) bar item controls.

property LargeImages: TCustomImageList;

Description

Use a bar item’s LargeImageIndex property to specify which particular image from the LargeImages list should be displayed for this item’s controls.

In the following image, a toolbar with a large button is displayed.  The button contains an image from the LargeImages list.

To provide images for standard size (16 by 16 pixels) item controls, use the Images property.  To provide images for hot-tracked large buttons, use the HotImages property.

Note:	To specify which icons should be displayed for enlarged standard size buttons, use the UseLargeImagesForLargeIcons option.


TdxBarImageOptions.MakeDisabledImagesFaded

TdxBarImageOptions          Example

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 demonstrate the difference between them:

You can prevent disabled link images from being painted grayed out independent 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.


TdxBarImageOptions.SmoothGlyphs

TdxBarImageOptions          See Also

property SmoothGlyphs: Boolean;

Description

The StretchGlyphs property forces the bar item’s image fit the item’s bounds after resizing.  If resized, image elements may be painted with improper proportions.

To compensate for this distortion, set the SmoothGlyphs property to True.

The default value of the SmoothGlyphs property is False.


TdxBarImageOptions.StretchGlyphs

TdxBarImageOptions          See Also

property StretchGlyphs: Boolean;

Description

An item control that belongs to a submenu can include a glyph.  The StretchGlyphs property specifies whether the glyph is resized if the control is resized (for instance, when large fonts are used).  If the value of this property is True, the glyph is resized.

Set the SmoothGlyphs property to True to compensate for distortions in resized glyphs.

The default value of the StretchGlyphs property is True.


TdxBarImageOptions.UseLargeImagesForLargeIcons

TdxBarImageOptions          See Also

Specifies which images to use as icons for enlarged standard size buttons.

property UseLargeImagesForLargeIcons: Boolean;

Description

Standard size buttons can be assigned icons via the following properties:

•	standard size (16 by 16 pixels) icons (ImageIndex and Glyph)

•	large size (32 by 32 pixels) icons (LargeImageIndex and LargeGlyph)

If the LargeIcons option is enabled, these buttons are enlarged.  The UseLargeImagesForLargeIcons property allows you to choose between standard and large size icons to be displayed for enlarged buttons if icons of both sizes are assigned.  Set this property to True to apply large size icons to buttons.  Otherwise, standard size icons will be used.

Note that glyph properties have priority over image list properties.

The default value of the UseLargeImagesForLargeIcons property is False.


TdxBarImageOptions.UseLeftBottomPixelAsTransparent

TdxBarImageOptions

property UseLeftBottomPixelAsTransparent: Boolean;

Description

If the UseLeftBottomPixelAsTransparent property value is True, the color of the image’s bottom-left pixel is not rendered on the entire image.

Note:	This property is in effect only for glyphs.

The default value of the UseLeftBottomPixelAsTransparent property is True.


TdxBarItemActionLink
TdxBarItemActionLink Object

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


TdxBarItemActionLink Methods

TdxBarItemActionLink               Legend

In TdxBarItemActionLink

AssignClient

IsCaptionLinked

IsCheckedLinked

IsEnabledLinked

IsHelpContextLinked

IsHintLinked

IsImageIndexLinked

IsShortCutLinked

IsOnExecuteLinked

SetCaption

SetChecked

SetEnabled

SetHelpContext

SetHint

SetImageIndex

SetShortCut

SetVisible

SetOnExecute


TdxBarItemActionLink.AssignClient

TdxBarItemActionLink

Links an action and an item.

procedure AssignClient(AClient: TObject); override;

Description

The AClient parameter specifies a client object of the TdxBarItem type which will be associated with an action of the TAction type.  This method is only available in Delphi 4™.


TdxBarItemActionLink.IsCaptionLinked

TdxBarItemActionLink

Determines whether the Caption properties of an action and a bar item are linked.

function IsCaptionLinked: Boolean; override;

Description

This function overrides the TActionLink.IsCaptionLinked function and determines whether an action controls the bar item’s Caption property.  The IsCaptionLinked function returns True if the value of the action’s Caption property is equal to the value of the item’s Caption property.  This function is only available in Delphi 4™.


TdxBarItemActionLink.IsCheckedLinked

TdxBarItemActionLink

Determines whether the checked state of an action and a bar item are linked.

function IsCheckedLinked: Boolean; override;

Description

This function overrides the TActionLink.IsCheckedLinked function and determines whether an action controls the bar item’s checked state.  The IsCheckedLinked function returns True if the bar item is of the TdxBarButton type and the value of the action’s Checked property is equal to the value of the TdxBarButton.Down property.  This function is only available in Delphi 4™.


TdxBarItemActionLink.IsEnabledLinked

TdxBarItemActionLink

Determines whether the Enabled properties of an action and a bar item are linked.

function IsEnabledLinked: Boolean; override;

Description

This function overrides the TActionLink.IsEnabledLinked function and determines whether an action controls the bar item’s Enabled property.  The IsEnabledLinked function returns True if the value of the action’s Enabled property is equal to the value of the item’s Enabled property.  This function is only available in Delphi 4™.


TdxBarItemActionLink.IsHelpContextLinked

TdxBarItemActionLink

Determines whether the HelpContext properties of an action and a bar item are linked.

function IsHelpContextLinked: Boolean; override;

Description

This function overrides the TActionLink.IsHelpContextLinked function and determines whether an action controls the bar item’s HelpContext property.  The IsHelpContextLinked function returns True if the value of the action’s HelpContext property is equal to the value of the item’s HelpContext property.  This function is only available in Delphi 4™.


TdxBarItemActionLink.IsHintLinked

TdxBarItemActionLink

Determines whether the Hint properties of an action and a bar item are linked.

function IsHintLinked: Boolean; override;

Description

This function overrides the TActionLink.IsHintLinked function and determines whether an action controls the bar item’s Hint property.  The IsHintLinked function returns True if the value of the action’s Hint property is equal to the value of the item’s Hint property.  This function is only available in Delphi 4™.


TdxBarItemActionLink.IsImageIndexLinked

TdxBarItemActionLink

Determines whether the ImageIndex properties of an action and a bar item are linked.

function IsImageIndexLinked: Boolean; override;

Description

This function overrides the TActionLink.IsImageIndexLinked function and determines whether an action controls the bar item’s ImageIndex property.  The IsImageIndexLinked function returns True if the value of the action’s ImageIndex property is equal to the value of the item’s ImageIndex property.  This function is only available in Delphi 4™.


TdxBarItemActionLink.IsShortCutLinked

TdxBarItemActionLink

Determines whether the ShortCut properties of an action and a bar item are linked.

function IsShortCutLinked: Boolean; override;

Description

This function overrides the TActionLink.IsShortCutLinked function and determines whether an action controls the bar item’s ShortCut property.  The IsShortCutLinked function returns True if the value of the action’s ShortCut property is equal to the value of the item’s ShortCut property.  This function is only available in Delphi 4™.


TdxBarItemActionLink.IsOnExecuteLinked

TdxBarItemActionLink

Determines whether clicking a bar item executes an action.

function IsOnExecuteLinked: Boolean; override;

Description

This function overrides the TControlActionLink.IsOnExecuteLinked function and determines whether the execution of an action represents a click of the bar item.  The IsOnExecuteLinked function returns True if the action’s OnExecute event and the item’s OnClick event are handled by the same event handler.  This function 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

The SetCaption method introduces an interface for the action of setting a caption on a linked item.  The Value parameter 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

The SetChecked method introduces an interface for the action of setting an item’s checked state via an action link.  The Value parameter 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

The SetEnabled method introduces an interface for the action of setting an item’s Enabled state via an action link.  The Value parameter 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

The SetHelpContext method introduces an interface for the action of setting the help context of an item via an action link.  The Value parameter 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

The SetHint method introduces an interface for the action of setting an item’s hint.  The Value parameter 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

The SetImageIndex method introduces an interface for the action of setting the image index for an item control.  The Value parameter 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

The SetShortCut method introduces an interface for the action of setting the shortcut for a linked item.  The Value parameter specifies the shortcut for an item.  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

The SetVisible method introduces an interface for the action of setting an item’s visible state.  The Value parameter 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

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


TdxBarItemLink
TdxBarItemLink Object

Hierarchy          Properties           Methods            See Also           Example

Represents a link between an item and the item control which is created using the information from the corresponding item and link.

Unit

dxBar

TdxBarItemLink = class(TCollectonItem);

Description

Instances of this type are stored in TdxBarItemLinks.  TdxBarItemLink represents the link between an item and item control on the bar control.  The item link’s Control property refers to the item control.

Do not use item controls directly, use the corresponding item links instead.  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


TdxBarItemLink Properties

TdxBarItemLink               Legend

In TdxBarItemLink

AvailableIndex

BarControl

BarManager

BeginGroup

ButtonGroup

CanVisibleIndex

Caption

Collection

Control

Data

Glyph

Item

ItemRect

MostRecentlyUsed

Owner

PaintStyle

Position

RealItemLink

RowHeight

UserCaption

UserDefine

UserGlyph

UserPaintStyle

UserWidth

ViewLevels

Visible

VisibleIndex

Width


TdxBarItemLink Methods

TdxBarItemLink               Legend

In TdxBarItemLink

Assign

BringToTopInRecentList

Create

CreateControl

Destroy

DestroyControl

SendToBottomInRecentList


TdxBarItemLink.AvailableIndex

TdxBarItemLink          See Also

Returns the item’s position in the AvailableItems collection of TdxBarItemLinks.

property AvailableIndex: Integer;

Description

Every TdxBarItemLink object is indexed in the AvailableItems zero-based collection of TdxBarItemLinks to which it belongs.  The AvailableIndex property contains an item’s index value in this collection.

ReadOnly Property


TdxBarItemLink.ButtonGroup

TdxBarItemLink

Specifies whether the corresponding item control is displayed in an item group.

type

  TdxBarButtonGroupPosition = (bgpNone, bgpStart, bgpMember);

property ButtonGroup: TdxBarButtonGroupPosition;

Description

A set of related items can be visually organized into a group.

To create groups, use the ButtonGroup property.  This property's values include:

Value	Meaning
bgpNone	A standalone item.
bgpStart	An item starts a group (this item is displayed as the leftmost item in the group).
bgpMember	An item is a group member (continues a group).

Note that only two types of items – buttons and subitems – can be placed into groups.

The default value of the ButtonGroup property is bgpNone.


TdxBarItemLink.CanVisibleIndex

TdxBarItemLink          See Also

Returns the item’s position in the CanVisibleItems collection of TdxBarItemLinks.

property CanVisibleIndex: Integer;

Description

Every TdxBarItemLink object is indexed in the CanVisibleItems zero-based collection of TdxBarItemLinks to which it belongs.  The CanVisibleIndex property contains an item’s index value in this collection.

ReadOnly Property


TdxBarItemLink.Data

TdxBarItemLink          See Also          Example

Stores an arbitrary value as a part of the current item link.

property Data: {$IFDEF CLR}TObject{$ELSE}Integer{$ENDIF};

Description

The Data property has no predetermined purpose.  It is provided for convenience and is similar to the Tag property.

The default value of the Data property is 0 (when {$IFNDEF CLR}).


TdxBarItemLink.MostRecentlyUsed

TdxBarItemLink

Determines whether an item control linked with the current item link 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 the MostRecentlyUsed property is set to False for a menu’s item, then it is not displayed at runtime in the menu.


TdxBarItemLink.Position

TdxBarItemLink

Specifies how the current item link is laid out in a toolbar.

type

  TdxBarItemPosition = (ipBeginsNewRow, ipBeginsNewColumn, ipContinuesRow);

property Position: TdxBarItemPosition;

Description

One of the following layouts can be specified:

•	ipBeginsNewRow – an item link begins a new row in a toolbar

•	ipBeginsNewColumn – an item link begins a new column in a toolbar

•	ipContinuesRow – an item link remains in the current flow

Note: the default dxBarItemDefaultPosition value means that the item link begins a new row in a toolbar (this value is similar to ipBeginsNewRow).

The default value of the Position property is dxBarItemDefaultPosition.


TdxBarItemLink.RealItemLink

TdxBarItemLink

Provides access to the actual item link of the current item link.

property RealItemLink: TdxBarItemLink;

Description

Use the RealItemLink property to access the actual item link of the current item link.  This property is used when creating additional (new) item controls.

ReadOnly Property


TdxBarItemLink.ViewLevels

TdxBarItemLink

Specifies visual identifiers for the current item link.

property ViewLevels: TdxBarItemViewLevels;

Description

With the ViewLevels property, you can specify a range of possible identifiers for an item link.  Since a toolbar can be dynamically laid out, an item link can be represented by one specific identifier at any point in time.

You can constrain this range to only one identifier, if required.  In this instance, an item link will be depicted by this identifier in all layout states.

Note: the default dxBarItemAllViewLevels value means that one of the following options can be applied to the item link based upon the space it occupies: ivlLargeIconWithText, ivlSmallIconWithText, ivlSmallIcon, ivlControlOnly.

The following image shows a transition from one item link identifier to another (when a toolbar is narrowed gradually):

The default value of the ViewLevels property is dxBarItemAllViewLevels.


TdxBarItemLink.Visible

TdxBarItemLink          See Also

Determines whether an item control appears on a toolbar.

property Visible: Boolean;

Description

If the Visible property is set to True an item control linked to the current item link can be placed on the toolbar.  In this instance the current item link is included into the TdxBarItemLinks.CanVisibleItems collection.


TdxBarItemLink.BringToTopInRecentList

TdxBarItemLink          See Also          Example

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

procedure BringToTopInRecentList(IncCount: Boolean);

Description

Use this method to "promote" the item which corresponds to the current item link in the list of the most frequently used menu items.  If the IncCount parameter is set to 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 method is used if both the bar manager’s MenusShowRecentItemsFirst property and the toolbar’s UseRecentItems property are set to True.


TdxBarItemLink.SendToBottomInRecentList

TdxBarItemLink          See Also

Moves an item control which corresponds to the current item link to the bottom of the MRU list.

procedure SendToBottomInRecentList;

Description

Call this method to move an item control which corresponds to the current item link in the list of most frequently used menu items to the bottom of the list.  After calling the SendToBottomInRecentList method, an item is set as least frequently used.

Note:	This method is used if both the bar manager’s MenusShowRecentItemsFirst property and the toolbar’s UseRecentItems property are set to True.


TdxBarItemLink.RowHeight

TdxBarItemLink          See Also

Specifies the height of a linked item control.

property RowHeight: Integer;

Description

Use this property to specify the height of a linked item control.  If an item is the first in a group, its height includes the height of the group separator.  The height of an item control depends upon the DockingStyle of a parent bar control.  For internal use only.


TdxBarItemLink.BarControl

TdxBarItemLink            See Also

Provides access to the bar control which contains the item control as specified by its Control property.

property BarControl: TCustomdxBarControl;

Description

Use the BarControl property to access the bar control which contains the item control managed by the current item link.  This bar control is a parent of the item control returned by the Control property.

ReadOnly Property


TdxBarItemLink.BarManager

TdxBarItemLink

Provides access to the bar manager that owns the current item link.

property BarManager: TdxBarManager;

Description

Use this property to access the bar manager to which the current item link belongs.  The BarManager property returns the same bar manager as the TdxBarItemLinks object that contains the current item link.

ReadOnly Property


TdxBarItemLink.Caption

TdxBarItemLink            See Also

Determines the item control’s caption.

property Caption: string;

Description

Returns the current caption used by a control.  If the udCaption style is included into the UserDefine property, the value of the Caption property is equal to the UserCaption property.  Otherwise, the value of the Caption property is equal to the value of the item’s Caption property.

ReadOnly Property


TdxBarItemLink.Collection

TdxBarItemLink

Specifies the item link collection to which the current item link belongs.

property Collection: TdxBarItemLinks;


TdxBarItemLink.Control

TdxBarItemLink            See Also

Provides access to the item control which corresponds to the current item link.

property Control: TdxBarItemControl;

Description

Returns the item control which is created using the information stored in the current item link and the item specified by the Item property.  This item control belongs to the bar control specified by the BarControl property.  If a bar control is not visible (it is equal to nil) or the current item link’s Item.Visible property is set to False, then the value of the Control property is nil.

ReadOnly Property


TdxBarItemLink.Glyph

TdxBarItemLink            See Also

Provides access to the glyph of the item control, which corresponds to the current item link.

property Glyph: TBitmap;

Description

If a custom image has been specified for the item control (udGlyph is included into the UserDefine property), the Glyph property returns the glyph as specified by the UserGlyph property.  Otherwise, the Glyph property returns the glyph specified by the item’s Glyph property.

ReadOnly Property


TdxBarItemLink.ItemRect

TdxBarItemLink

Specifies the item control’s coordinates.

property ItemRect: TRect;

Description

If the current item link is not nil, the ItemRect property specifies the corresponding item control’s coordinates relative to the client area of a parent bar control.


TdxBarItemLink.PaintStyle

TdxBarItemLink

Provides access to the paint style of the item control which corresponds to the current item link.

type

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

property PaintStyle: TdxBarPaintStyle;

Description

This property returns the paint style of the item control which corresponds to the current item link.  If udPaintStyle is included in the UserDefine property, the PaintStyle property returns the value of the UserPaintStyle property.  Otherwise, the PaintStyle property returns the item’s painting style.  In this instance, if the item is of the TdxBarButton type, the PaintStyle property returns one of the relevant styles for buttons (please refer to the description of the PaintStyle property for details).  For all other item types, the psStandard value is returned.

ReadOnly Property


TdxBarItemLink.VisibleIndex

TdxBarItemLink            See Also

Returns the item’s position within the VisibleItems indexed collection of item links.

property VisibleIndex: Integer;

Description

Every TdxBarItemLink object is indexed in the VisibleItems zero-based collection of the TdxBarItemLinks type to which it belongs.  The VisibleIndex property represents the index of the item link value in this collection.

ReadOnly Property


TdxBarItemLink.BeginGroup

TdxBarItemLink            Example 1          Example 2

Specifies whether the item control that corresponds to the current item link starts a group.

property BeginGroup: Boolean;

Description

When this property is set to True the item control follows a group separator.

Note:	An item control cannot start a group if its VisibleIndex property is equal to 0.  Do not confuse these groups with item groups which are designed to simultaneously manage the visibility and accessibility of multiple bar items.

When the value of the BeginGroup property is changed, the item control’s BeginGroupChanged method is called and then a bar manager’s OnItemLinkChange event is generated.

End-users can create a group separator by dragging an item control a short distance to the end of a toolbar/submenu provided that the Customization Form is open.  Dragging an item control to the opposite direction removes a group separator before this item control (if any).


TdxBarItemLink.Item

TdxBarItemLink            See Also              Example 1          Example 2

Specifies the item which is linked to the item control using the current item link.

property Item: TdxBarItem;

Description

Use this property to specify the item that is linked to the corresponding item control via the current item link.

Note:	The value of 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 the TdxBarManager type with main menus).


TdxBarItemLink.UserCaption

TdxBarItemLink            See Also                   Example 1          Example 2

Specifies the additional item’s caption defined by an end-user.

property UserCaption: string;

Description

Use this property to specify the item’s caption defined by an end-user.  The UserCaption property always overrides the item’s Caption.  The UserCaption property can be modified programmatically or from the context-sensitive modification popup menu.  This menu can be invoked by the right mouse button click on an item control when customizing the toolbar (i.e. the Customization Form is active).  Set UserCaption programmatically or by means of the customizing popup.


TdxBarItemLink.UserDefine

TdxBarItemLink                   Example

Specifies the properties defined by an end-user.

type

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

  TdxBarUserDefines = set of TdxBarUserDefine;

property UserDefine: TdxBarUserDefines;

Description

This property’s value represents a set of elements of the TdxBarUserDefine type.  The elements determine which of the values of the Caption, Glyph, PaintStyle, and Width properties are customized by an end-user.  If an element is included into the UserDefine property’s value, these properties return the values of the UserCaption, UserGlyph, UserWidth, and UserPaintStyle properties, respectively.  When changing any of the User~ properties, the appropriate elements are automatically added into the value of the UseDefine property.


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.UserWidth

TdxBarItemLink            See Also          Example

Specifies the item control’s width (in pixels).

property UserWidth: Integer;

Description

By default, all item controls linked to the item have the same width.  Use this property to specify the width of a particular item control.

The default value of the UserWidth property is 0.


TdxBarItemLink.Width

TdxBarItemLink

Returns the item control’s width – in pixels.

property Width: Integer;

Description

If the UserWidth property is assigned a value, the Width property returns this value.  Otherwise, this property returns 0.

Note:	If the item represents an editor from the ExpressEditors Library, the Width property returns its width as specified by the item’s Width property.

ReadOnly Property


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 bar manager’s OnItemLinkAdd event.


TdxBarItemLink.Destroy

TdxBarItemLink

Destroys a TdxBarItemLink instance.

destructor Destroy; override;

Description

This method destroys a TdxBarItemLink instance and generates the bar manager’s OnItemLinkDelete event and TdxBarItemLinks.OnChange event.


TdxBarItemLink.Assign

TdxBarItemLink

Copies the properties of another TPersistent object.

procedure Assign(Source: TPersistent); override;

Description

Call the Assign method to set the published properties of the item link to match the characteristics of the object specified by the Source parameter.  If the Source is another TdxBarItemLink object, the Assign method matches the item link properties of the source.

If the Source parameter is not another TdxBarItemLink object, the Assign method calls the inherited method so that the item link properties can be copied from any object that can assign them in the AssignTo method.


TdxBarItemLink.CreateControl

TdxBarItemLink            See Also

Creates an item control that corresponds to the current item link.

procedure CreateControl;

Description

Use the CreateControl method to create an item control for the item specified by the Item property.  The newly created item control belongs to the bar control specified by the BarControl property.

The CreateControl method will not create a new control if:

•	A bar control is not visible (or the BarControl property is set to nil);

•	The current item link’s Item property is nil;

•	The control for this item link already exists.


TdxBarItemLink.DestroyControl

TdxBarItemLink            See Also

Destroys the control that corresponds to the current item link.

procedure DestroyControl;

Description

Use the DestroyControl method to dispose of the TdxBarItemControl object.


TdxBarItemLink.Owner

TdxBarItemLink            See Also

Specifies the collection that contains the current item link.

property Owner: TdxBarItemLinks;

Description

Use the Owner property to access the TdxBarItemLinks object that contains the current item link.

To access the owner of an item link’s collection – which can be a toolbar, a popup menu or a subitem menu – use the Owner property of the collection.

ReadOnly Property


TdxBarItemLinks
TdxBarItemLinks Object

Hierarchy          Properties           Methods           Events          Example

TdxBarItemLinks represents a collection of TdxBarItemLink elements in bar controls or subitems.

Unit

dxBar

TdxBarItemLinks = class(TCollection);

Description

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

The TdxBarItemLinks inherits 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


TdxBarItemLinks Properties

TdxBarItemLinks               Legend

In TdxBarItemLinks

AvailableItems

AvailableItemCount

BarControl

BarManager

CanVisibleItems

CanVisibleItemCount

ItemOptions

Items

Owner

RealVisibleItemCount

VisibleItemCount

VisibleItems


TdxBarItemLinks Methods

TdxBarItemLinks               Legend

In TdxBarItemLinks

Add

AddButton

AddItem

AddSubItem

Assign

AvailableIndexOf

CanVisibleIndexOf

Create

CreateBarControl

Destroy

DestroyBarControl

FreeForeignItems

HasItem

IndexOf

Insert

IsReferencedBy

Move

Update

VisibleIndexOf


TdxBarItemLinks Events

TdxBarItemLinks

In TdxBarItemLinks

OnChange


TdxBarItemLinks.AvailableIndexOf

TdxBarItemLinks          See Also

Returns the position of a specified TdxBarItemLink in the AvailableItems array.

function AvailableIndexOf(Value: TdxBarItemLink): Integer;

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 the position of a specified TdxBarItemLink in the CanVisibleItems array.

function CanVisibleIndexOf(Value: TdxBarItemLink): Integer;

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 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 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


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.

ReadOnly Property


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.

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

ReadOnly Property


TdxBarItemLinks.BarControl

TdxBarItemLinks

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

property BarControl: TCustomdxBarControl;

Description

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


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 Count property.


TdxBarItemLinks.ItemOptions

TdxBarItemLinks

Provides access to display settings of links contained within this collection.

property ItemOptions: TdxBarItemOptions;


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.  Otherwise, 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 item’s VisibleIndex property.

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 VisibleItems array. Since this array is indexed starting with 0, the value of VisibleItemCount is always one greater than the index of the last member of VisibleItems.

ReadOnly Property


TdxBarItemLinks.Add

TdxBarItemLinks              See Also

Adds a new TdxBarItemLink element to the end of the current collection.

function Add: TdxBarItemLink;

function Add(AItem: TdxBarItem): TdxBarItemLink;

Description

This method creates an instance of the TdxBarItemLink, appends it to the current collection and returns a reference to the newly created TdxBarItemLink instance.

The second form of the method associates a new link with the specified item.

The AItem parameter references a TdxBarItem instance that the link will be created to.


TdxBarItemLinks.AddButton

TdxBarItemLinks          See Also          Example

Creates a TdxBarButton and a link to it and appends this link to the current collection.

function AddButton: TdxBarItemLink;

Description

This function returns a reference to the newly created link object.


TdxBarItemLinks.AddItem

TdxBarItemLinks          See Also          Example

Creates an instance of the AItemClass item and a link to it and appends this link to the current collection.

type

  TdxBarItemClass = class of TdxBarItem;

function AddItem(AItemClass: TdxBarItemClass): TdxBarItemLink;

Description

This function returns a reference to the newly created link object.


TdxBarItemLinks.AddSubItem

TdxBarItemLinks          See Also

Creates a TdxBarSubItem and a link to it and appends this link to the current collection.

function AddSubItem: TdxBarItemLink;

Description

This function returns a reference to the newly created link object.


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 its Owner.  If Owner is TdxBar, an instance of type TdxBarControl is created.  Otherwise, an instance of the TdxBarSubMenuControl type is created.

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


TdxBarItemLinks.HasItem

TdxBarItemLinks          See Also

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

function HasItem(AItem: TdxBarItem): Boolean;

Description

This function is obsolete and used for compatibility purposes.  Use the IsReferencedBy function instead.


TdxBarItemLinks.IndexOf

TdxBarItemLinks            See Also

function IndexOf(Value: TdxBarItemLink): Integer;

Description

Returns the position of the bar item specified by the Value parameter in the Items zero-based indexed collection.  The index of the first item link in the collection is 0.


TdxBarItemLinks.Insert

TdxBarItemLinks          See Also

Creates a new TdxBarItemLink instance and inserts it into the TdxBarItemLinks collection at a position specified by the zero-based AIndex parameter.

function Insert(AIndex: Integer): TdxBarItemLink;

Description

This method creates an instance of the TdxBarItemLink, adds it to the current collection at a specified position and returns a reference to the newly created TdxBarItemLink instance.

To associate the link with a particular item, use the TdxBarItemLink.Item property.


TdxBarItemLinks.IsReferencedBy

TdxBarItemLinks

Returns True when the specified ALinksOwner contains the current TdxBarItemLinks collection, or references at least one item within this collection.

function IsReferencedBy(ALinksOwner: IdxBarLinksOwner): Boolean;

Description

An object passed as the ALinksOwner parameter represents an item links container, such as a toolbar/menu, popup menu, a button with a dropdown menu, etc.


TdxBarItemLinks.Move

TdxBarItemLinks          See Also

Moves the TdxBarItemLink element from ACurIndex to ANewIndex in the TdxBarItemLinks collection.

procedure Move(ACurIndex, ANewIndex: Integer);

Description

Use the Move method to place the TdxBarItemLink element into a new position in the TdxBarItemLinks collection.

ACurIndex specifies the TdxBarItemLink object’s current position in the TdxBarItemLinks collection;

ANewIndex specifies the TdxBarItemLink object’s new position in the TdxBarItemLinks collection.


TdxBarItemLinks.VisibleIndexOf

TdxBarItemLinks            See Also

Returns position of a specified TdxBarItemLink in the VisibleItems array.

function VisibleIndexOf(Value: TdxBarItemLink): Integer;

Description

Call VisibleIndexOf to get the index of Value in the VisibleItems zero-based indexed collection of visible item links.  VisibleIndexOf returns -1 if Value is not in the collection.


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.


TdxBarItemLinks.DestroyBarControl

TdxBarItemLinks

Destroys the bar control containing item controls that correspond to the current item links.

procedure DestroyBarControl;

Description

Use the DestroyBarControl method to dispose of the TCustomdxBarControl object.


TdxBarItemLinks.FreeForeignItems

TdxBarItemLinks            See Also

Disposes items of another bar manager whose item links are stored in the current item link collection.

procedure FreeForeignItems(ForeignBarManager: TdxBarManager);

Description

In MDI applications, any child window can contain item links associated with items of other bar managers.  This may occur, for instance, if you add item links to another bar manager using the OnMenuMerge or the OnMerge event.

The FreeForeignItems method disposes of items of the bar manager specified by ForeignBarManager.  If nil is passed, this method disposes of items of all incorporated bar managers.


TdxBarItemLinks.Assign

TdxBarItemLinks            See Also

Copies the contents of another collection.

procedure Assign(Source: TPersistent); override;

Description

The Assign method calls the inherited Assign method of the TComponent class.  Refer to the description of this method for more information.

Note:	In MDI applications, the system menu subitem is not removed from the collection if this method is called.


TdxBarPersistent
TdxBarPersistent Object

Hierarchy          Properties

The TdxBarPersistent class provides streaming functionality for objects owned by the bar manager component (see TdxBarManager).

Unit

dxBar

TdxBarPersistent = class(TPersistent)

Description

The following TdxBarPersistent descendants are streamed to the form’s file:

•	TdxBarBackgrounds – specifies images used as the background for bars and submenus.

•	TdxBarImageOptions – represents bar item image options.

The BarManager property provides access to the owner.


TdxBarPersistent Hierarchy
Hierarchy

TPersistent

     |

TdxBarPersistent


Properties for TdxBarPersistent
TdxBarPersistent Properties

TdxBarPersistent          Legend

In TdxBarPersistent

BarManager


TdxBarPersistent.BarManager

TdxBarPersistent

Represents a bar manager that owns the currently processed component.

property BarManager: TdxBarManager;

Description

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

Use the BarManager property to access the bar manager instance.

ReadOnly Property


TdxBars
TdxBars Object

Hierarchy          Properties           Methods            See Also

Contains a list of all TdxBarManager toolbars.

Unit

dxBar

TdxBars = class(TcxComponentCollection);

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

TcxComponentCollection

|

TdxBars


TdxBars Properties

TdxBars          Legend

In TdxBars

BarManager

DockControls

DockingZoneSize

IsMoving

Items


TdxBars Methods

TdxBars

In TdxBars

Add

Create

Destroy

GetUniqueToolbarName

Insert


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 the TdxBarManager component.  The first toolbar index in the list is 0.  The number of elements is stored in the Count property.


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.


TdxBars.IsMoving

TdxBars

Indicates whether any toolbar in the current collection is being moved.

property IsMoving: Boolean;

Description

If a toolbar in the collection is being moved, this property returns True.

ReadOnly Property


TdxBars.Insert

TdxBars

Adds a new toolbar to the current bar collection at the position specified by the zero-based Index parameter.

function Insert(Index: Integer): TdxBar;

Description

This method returns a reference to the added toolbar.

Note: indexes of other toolbars in the collection are shifted up and the value of the Count property is incremented.


TdxDockCol
TdxDockCol Object

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


TdxDockCol Properties

TdxDockCol               Legend

In TdxDockCol

BarControl

DockRow

Pos


TdxDockCol Methods

TdxDockCol               Legend

In TdxDockCol

AssignPosition

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.

ReadOnly Property


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.  The ADockRow and ABarControl parameters specify the TdxDockRow and TdxBarControl objects to which a given instance belongs.


TdxDockCol.AssignPosition

TdxDockCol

Specifies the position of the current dock column.

procedure AssignPosition;

Description

Use the AssignPosition method to change the value of the Pos property.  This method replaces the current coordinates of the current dock column with the coordinates of its toolbar control.


TdxDockRow
TdxDockRow Object

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 an end-user places one toolbar below another (when DockingStyle is dsTop or dsBottom).  This object is for internal use only.


Hierarchy

TObject

|

TdxDockRow


TdxDockRow Properties

TdxDockRow               Legend

In TdxDockRow

DockControl

ColCount

ColList

Cols

Visible


TdxDockRow Methods

TdxDockRow

In TdxDockRow

AddCol

Create

DeleteCol

Destroy


TdxDockRow.DockControl

TdxDockRow            See Also

property DockControl: TdxDockControl;

Description

Returns the TdxDockControl object that owns a given TdxDockRow instance.

ReadOnly Property


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 TdxDockCol 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 owner of the TdxDockControl.


TdxDockRow.Destroy

TdxDockRow

destructor Destroy;

Description

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


TdxDockRow.AddCol

TdxDockRow

Creates a dock column for the specified toolbar control.

function AddCol(ABarControl: TdxBarControl): TdxDockCol;

Description

The AddCol method creates a dock column for the toolbar control specified by ABarControl.  A new dock column is added to the Cols collection.

To destroy a particular dock column, use the DeleteCol method.


TdxDockRow.DeleteCol

TdxDockRow

Destroys the dock column of a particular toolbar control.

procedure DeleteCol(ABarControl: TdxBarControl); overload;

procedure DeleteCol(AIndex: Integer); overload;

Description

The first overloaded variant of this method allows you to destroy the dock column of the bar control specified by ABarControl.

The second overloaded variant of this method allows you to destroy the dock column whose index in the Cols collection is specified by AIndex.

After the DeleteCol method has been called, items in the Cols collection are renumbered.


TdxDockRow.Visible

TdxDockRow

Determines whether the current dock row is visible.

property Visible: Boolean;

Description

If all toolbars of the current dock row have controls and their DockingStyle property is not equal dsNone, the Visible property returns True; otherwise – False.

ReadOnly Property


TdxBarItemPosition
TdxBarItemPosition type

See Also

Enumerates available item link layouts in a toolbar.

Unit

dxBar

type

  TdxBarItemPosition = (ipBeginsNewRow, ipBeginsNewColumn, ipContinuesRow);

Description

Values include:

Value	Meaning
ipBeginsNewRow	An item link begins a new row within a toolbar
ipBeginsNewColumn	An item link begins a new column within a toolbar
ipContinuesRow	An item link remains in the current flow


TdxBarItemViewLevels
TdxBarItemViewLevels type

See Also

Enumerates available visual identifiers for an item link.

Unit

dxBar

type

  TdxBarItemViewLevel = (ivlLargeIconWithText, ivlSmallIconWithText,

    ivlSmallIcon, ivlControlOnly, ivlDefault);

TdxBarItemRealViewLevel = ivlLargeIconWithText..ivlControlOnly;

TdxBarItemViewLevels = set of TdxBarItemRealViewLevel;

Description

Values include:

Value	Meaning
ivlLargeIconWithText	An item link is represented by a large icon and a caption
ivlSmallIconWithText	An item link is represented by a small icon and a caption
ivlSmallIcon	An item link is represented only by a small icon
ivlControlOnly	No visual identifiers are provided for an item link


TCustomdxBarControl
TCustomdxBarControl Object

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.  There is no need to call bar controls directly.  Use their non-visual representatives instead.


Hierarchy

TCustomControl

     |

TCustomdxBarControl


TCustomdxBarControl Properties

TCustomdxBarControl               Legend

In TCustomdxBarControl

BarManager

BkBrush

Canvas

ChildBar

ComboBoxArrowWidth

DockingStyle

EditFontHandle

EditTextSize

Font

IconSize

IsActive

IsCustomizing

ItemLinks

MarkState

MenuArrowHeight

MenuArrowWidth

ParentBar

SelectedControl

TextSize


TCustomdxBarControl Methods

TCustomdxBarControl               Legend

In TCustomdxBarControl

AdjustSize

BarGetFocus

BarLostFocus

CalcDrawingConsts

Create

CreateControls

Destroy

DestroyControls

GetFullItemRect

GetItemRect

GetItemRectEx

GetItemRegion

HideAll

HideOnClick

IsChildBar

IsRealVertical

IsVertical

ItemAtPos

Kind

NotHandleMouseMove

PaintItem

RepaintBar

SetKeySelectedItem

SetMouseSelectedItem


TCustomdxBarControl Events

TCustomdxBarControl               Legend

In TCustomdxBarControl

OnDestroy


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 function always returns False – toolbars remain visible upon clicking item controls.  For subitems, this method returns True – subitems are hidden upon pressing any button within them.


TCustomdxBarControl.MarkState

TCustomdxBarControl

Determines the state of the quick customization button.

type

  TdxBarMarkState = (msNone, msSelected, msPressed);

property MarkState: TdxBarMarkState;

Description

The quick customization button is drawn to the right of a toolbar and looks like a dropdown button.

The quick customization button invokes the list which includes the items that did not fit on the toolbar and also the Add or Remove Buttons menu item.  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

Determines whether the current bar control traces mouse movement if the form is not focused.

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

Description

The NotHandleMouseMove function determines whether the current bar control traces mouse movement if the form is not focused.  The P parameter determines mouse coordinates.

For internal use only.


TCustomdxBarControl.BarManager

TCustomdxBarControl            See Also

Specifies the TdxBarManager to which the current bar control belongs.

property BarManager: TdxBarManager;

Description

This property specifies an object of the TdxBarManager type to which the current bar control belongs.  The value of the current bar control’s BarManager property is equal to the BarManager property of the item links (accessible via the ItemLinks property) that have been used to create the current 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 the current bar control.

type

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

property DockingStyle: TdxBarDockingStyle;

Description

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


TCustomdxBarControl.ParentBar

TCustomdxBarControl          See Also

Determines the parent bar control of the current bar control.

property ParentBar: TCustomdxBarControl;

Description

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


TCustomdxBarControl.SelectedControl

TCustomdxBarControl            See Also

Specifies the currently selected 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.  The SelectedItem property specifies the item control which is currently selected on the current bar control.  An item control is selected when the mouse pointer hovers over it and its Enabled property is set to True.


TCustomdxBarControl.MenuArrowWidth

TCustomdxBarControl          See Also

Determines the arrow button’s width - in pixels.

property MenuArrowWidth: Integer;

Description

An arrow button can be displayed on an item control (representing a submenu), a drop-down button and other similar controls.  For instance, the arrow button is drawn when the submenu is placed on another submenu.  The MenuArrowWidth property returns the width of the item control’s arrow button belonging to the current toolbar control.  Its value depends upon font size, and is changed automatically when the font is changed.

ReadOnly Property


TCustomdxBarControl.MenuArrowHeight

TCustomdxBarControl          See Also

Determines the arrow button’s height - in pixels.

property MenuArrowHeight: Integer;

Description

An arrow button can be displayed on an item control (representing a submenu), a drop-down button and other similar controls.  For instance, the arrow button is drawn when the submenu is placed on another submenu.  The MenuArrowHeight property returns the height of the item control’s arrow button belonging to the current toolbar control.  Its value depends upon font size, and cannot be less than 4 pixels.

ReadOnly Property


TCustomdxBarControl.ComboBoxArrowWidth

TCustomdxBarControl

Determines the width of a combobox arrow button.

property ComboBoxArrowWidth: Integer;

Description

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

ReadOnly Property


TCustomdxBarControl.IconSize

TCustomdxBarControl

Gets the size of the item control‘s icon.

property IconSize: Integer;

Description

The size of the item control‘s icon is defined based upon the TextSize property’s value.

The IconSize property’s value is used to calculate the item’s rectangle bounds.

ReadOnly Property


TCustomdxBarControl.IsActive

TCustomdxBarControl

Determines whether the current bar control has an active item control.

property IsActive: Boolean;

Description

The IsActive property returns True if any item control on the current bar control has focus.  If none of the item controls are focused, the IsActive property’s value is equal to False.


TCustomdxBarControl.IsCustomizing

TCustomdxBarControl

Determines whether the customization form is active.

property IsCustomizing: Boolean;

Description

The value of the IsCustomizing property is equal to True when the customization form of TdxBarManager to which the current bar control belongs is active.

ReadOnly Property


TCustomdxBarControl.ItemLinks

TCustomdxBarControl            See Also

Provides access to item links which are associated with the current bar control.

property ItemLinks: TdxBarItemLinks;

Description

Use the ItemLinks property to access the item links between the item controls on the current 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.


TCustomdxBarControl.TextSize

TCustomdxBarControl

property TextSize: Integer;

Description

Used internally to draw a bar control.  The TextSize property 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 current bar control’s VisibleItems property.  The CreateControls method is called when creating a bar control.


TCustomdxBarControl.DestroyControls

TCustomdxBarControl            See Also

Destroys item controls belonging to a given bar control.

procedure DestroyControls; virtual;

Description

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


TCustomdxBarControl.CalcDrawingConsts

TCustomdxBarControl

Performs calculations that are required to draw the current bar control.

procedure CalcDrawingConsts; virtual;

Description

The CalclDrawingConsts method is called when it is necessary to draw the current bar control.  For example, when the bar manager’s Font property changes.

For internal use only.


TCustomdxBarControl.GetFullItemRect

TCustomdxBarControl            See Also

Returns the ‘full’ rectangle occupied by an item control on the current bar control.

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

Description

This function returns the value of the GetItemRect function.


TCustomdxBarControl.GetItemRect

TCustomdxBarControl            See Also

Returns the ‘full’ rectangle occupied by an item control on the current bar control.

function GetItemRect(Item: TdxBarItemControl): TRect;

Description

The GetItemRect function is called 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 resulting rectangle is specified in the bar control’s coordinates. The Item parameter specifies the item control.  When nil is passed as this parameter, the GetItemRect function returns an empty rectangle.


TCustomdxBarControl.GetItemRectEx

TCustomdxBarControl            See Also

Returns the rectangle the specified item control occupies on the current bar control.

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

Description

Call the GetItemRectEx function to obtain the rectangle in the bar control’s coordinates which the item control specified by the Item parameter occupies on the current bar control.  The IsBeginGroup parameter specifies whether an 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 its descendants use it to access rectangles of item controls.


TCustomdxBarControl.GetItemRegion

TCustomdxBarControl            See Also

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

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

Description

Call the GetItemRegion function to obtain the region an item control occupies on the current 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 the current bar control is the child of another bar control.

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

Description

Returns True if the current 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 specified coordinates.

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

Description

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


TCustomdxBarControl.PaintItem

TCustomdxBarControl

Paints an item control on the current bar control.

procedure PaintItem(AControl: TdxBarItemControl); virtual;

Description

The PaintItem method doesn’t do anything.  When overridden in descendants of the TCustomdxBarControl class this method draws the item control specified by the AControl parameter on the current bar control.


TCustomdxBarControl.SetKeySelectedItem

TCustomdxBarControl            See Also

Selects an item control using the keyboard.

procedure SetKeySelectedItem(Value: TdxBarItemControl); virtual;

Description

This method is called when an end-user selects an item control using the keyboard. This method sets the SelectedControl property to an item whose linked item control is specified by the Value parameter.  If you need to select an item control in code, you should use the SetKeySelectedItem method instead of the SetMouseSelectedItem method.


TCustomdxBarControl.SetMouseSelectedItem

TCustomdxBarControl            See Also

Selects an item control when using the mouse.

procedure SetMouseSelectedItem(Value: TdxBarItemControl); virtual;

Description

This method is called when an item control is selected using the mouse, when the mouse pointer enters the control’s rectangle.


TCustomdxBarControl.Create

TCustomdxBarControl          See Also

Creates a bar control.

constructor Create(AOwner: TComponent); override;

Description

Creates and initializes an instance of the TCustomdxBarControl class.  By default, the Visible property is set to False.  Descendants of the TCustomdxBarControl class can override this method to perform additional actions when creating a bar control.


TCustomdxBarControl.Destroy

TCustomdxBarControl          See Also

Destroys the current bar control.

destructor Destroy; override;

Description

Destroys an instance of the TCustomdxBarControl object and frees its memory.  Descendants of the TCustomdxBarControl class can override this method to perform additional actions when destroying a bar control.


TCustomdxBarControl.HideAll

TCustomdxBarControl

Hides the current bar control.

procedure HideAll; virtual;

Description

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


TCustomdxBarControl.RepaintBar

TCustomdxBarControl

Repaints a bar control.

procedure RepaintBar; virtual;

Description

This method recreates all linked item controls, calculates the new size of the toolbar and draws it.  Call the RepaintBar method to redraw a bar control after adding new item controls or when the size of a bar control is changed.  For instance, when changing the bar manager’s Font or LargeIcons properties.


TCustomdxBarControl.BarGetFocus

TCustomdxBarControl            See Also

Called each time a bar control receives focus.

procedure BarGetFocus(ASelectedItem: TdxBarItemControl);

Description

Generally, a bar control receives focus when clicking an item control within it.  The SelectedControl property is set to ASelectedItem.


TCustomdxBarControl.BarLostFocus

TCustomdxBarControl

This method is called when a bar control loses focus.

procedure BarLostFocus;

Description

This method is called each time a bar control loses focus.  It sets the SelectedControl property to nil.


TCustomdxBarControl.IsVertical

TCustomdxBarControl          See Also

Determines whether the current toolbar control is vertical.

function IsVertical: Boolean; virtual;

Description

The IsVertical function returns False.

Override this function to specify the way that the toolbar control’s position is to be determined.

This function is overridden in the TdxBarControl class (the TCustomdxBarControl‘s descendant), where it determines if the current toolbar control is docked to the left or to the right side of the parent form and is rotated.


TCustomdxBarControl.IsRealVertical

TCustomdxBarControl          See Also

Determines whether the current toolbar control is vertical.

function IsRealVertical: Boolean; virtual;

Description

The IsRealVertical function returns False.

Override this function to specify the way a toolbar control’s position is to be determined.

This function is overridden in the TdxBarControl class (the TCustomdxBarControl‘s descendant), where it determines if the current toolbar control is docked to the left or to the right side of the parent form.


TCustomdxBarControl.Kind

TCustomdxBarControl

Returns the type of the current toolbar control.

type

  TdxBarKind = (bkBarControl, bkBarQuickControl, bkSubMenu);

class function Kind: TdxBarKind; virtual; abstract;

Description

There are 3 TCustomdxBarControl‘s descendants that implement the Kind method: TdxBarControl, TdxBarQuickControl and TdxBarSubMenuControl classes.


TCustomdxBarControl.OnDestroy

TCustomdxBarControl

Occurs before the current toolbar control is destroyed.

type

  TNotifyEvent = procedure (Sender: TObject) of object;

property OnDestroy: TNotifyEvent;

Description

Handle the OnDestroy event to perform specific actions before the current toolbar control is destroyed.


TdxBarControl
TdxBarControl Object

Hierarchy          Properties           Methods

Represents the visual portion of a toolbar.

Unit

dxBar

TdxBarControl = class(TCustomdxBarControl);

Description

The TdxBarControl object visually represents a toolbar (the TdxBar object).


Hierarchy

TCustomdxBarControl

|

TdxBarControl


TdxBarControl Properties

TdxBarControl               Legend

In TdxBarControl

Bar

IsDowned

Moving

MDIButtonHeight

MDIButtonWidth

Derived from TCustomdxBarControl

BarManager

BkBrush

Canvas

ChildBar

ComboBoxArrowWidth

DockingStyle

EditFontHandle

EditTextSize

Font

IconSize

IsActive

IsCustomizing

ItemLinks

MarkState

MenuArrowHeight

MenuArrowWidth

ParentBar

SelectedControl

TextSize


TdxBarControl Methods

TdxBarControl               Legend

In TdxBarControl

CaptionChanged

ClientToScreen

CreateEx

HideAll

IsRealVertical

IsVertical

Kind

PaintItem

Repaint

Derived from TCustomdxBarControl

AdjustSize

BarGetFocus

BarLostFocus

CalcDrawingConsts

Create

CreateControls

Destroy

DestroyControls

GetFullItemRect

GetItemRect

GetItemRectEx

GetItemRegion

HideAll

HideOnClick

IsChildBar

IsRealVertical

IsVertical

ItemAtPos

Kind

NotHandleMouseMove

PaintItem

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 maximized 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 maximized 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

Provides access to a toolbar of the TdxBar type to represent it on screen.

property Bar: TdxBar;

Description

Use the Bar property to access the TdxBar object for which the current bar control is created as its visual representation.

ReadOnly Property


TdxBarControl.IsDowned

TdxBarControl

Specifies whether a bar control is unfolded.

property IsDowned: Boolean;

Description

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

Note:	Setting the IsDowned property to True programmatically does not unfold the submenu.


TdxBarControl.Moving

TdxBarControl

Determines whether a bar control is being moved.

property Moving: Boolean;

Description

When the Moving property is set to True, the current bar control is being moved by an end-user.

For internal use only.


TdxBarControl.CaptionChanged

TdxBarControl

This function draws the caption of a bar control’s window.

procedure CaptionChanged; virtual;

Description

This method is called internally when changing the caption of the current bar’s window (if it exists).  It is required, for instance, when an end-user has modified the value of the bar’s Caption property.


TdxBarControl.PaintItem

TdxBarControl            See Also

Paints the specified item control.

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 bar control.

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

Description

Creates an instance of the TdxBarControl class and sets its Bar property to ABar.


TdxBarControl.Repaint

TdxBarControl            See Also

Forces a bar control to repaint its image on screen.

procedure Repaint; override;

Description

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


TdxBarControl.HideAll

TdxBarControl            See Also

Makes the current toolbar control and all its item controls inactive.

procedure HideAll; override;

Description

The HideAll method removes focus from the current toolbar control, and its item controls.  It also hides all the toolbar’s submenus and popup menus (if these menus are active).  The HideAll method sets the current toolbar control’s IsActive property to False.


TdxBarControl.Kind

TdxBarControl            See Also

Returns the current toolbar control type.

type

  TdxBarKind = (bkBarControl, bkBarQuickControl, bkSubMenu);

class function Kind: TdxBarKind; override;

Description

For TdxBarControl type toolbars, the Kind method returns bkBarControl.

The TdxBarQuickControl and TdxBarSubMenuControl classes implement the same class methods.  These methods return bkBarQuickControl and bkSubMenu values respectively.


TdxBarControl.IsVertical

TdxBarControl            See Also

Determines whether the current toolbar control is vertical.

function IsVertical: Boolean; override;

Description

The IsVertical function returns True if the current toolbar control is docked to the left or to the right side of the parent window, and the toolbar’s RotateWhenVertical property is set to True.  Otherwise, it returns False.

To determine whether the current toolbar control is vertical without checking the RotateWhenVertical property, use the IsRealVertical property.


TdxBarControl.IsRealVertical

TdxBarControl            See Also

Determines whether the current toolbar control is vertical.

function IsRealVertical: Boolean; override;

Description

The IsVertical function returns True if the current toolbar control is docked to the left or to the right side of the parent window.  Otherwise, it returns False.

Use the IsVertical property to determine whether the current toolbar control is vertical.


TdxBarControl.ClientToScreen

TdxBarControl

Converts APoint coordinates to global screen coordinates.

function ClientToScreen(const APoint: TPoint): TPoint;

Description

For more information, refer to the ClientToScreen method of the TControl class.


TdxBarDockControl
 TdxBarDockControl Object

Hierarchy          Properties          Methods          See Also

The TdxBarDockControl object represents an external dock control on a form.

Unit

dxBar

TdxBarDockControl = class(TdxDockControl);

Description

The ExpressBars Suite 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


TdxBarDockControl Properties

TdxBarDockControl           Legend

In TdxBarDockControl

Align

AllowDocking

AllowZeroSizeInDesignTime

Color

ParentColor

SunkenBorder

UseOwnColor

UseOwnSunkenBorder

Derived from TdxDockControl

AllowDocking

BackgroundBitmap

BarManager

Bars

DockingStyle

RowCount

RowList

Rows

Derived from TControl

Anchors

Visible


TdxBarDockControl Methods

TdxBarDockControl           Legend

Derived from TdxDockControl

CreateEx


TdxBarDockControl Events

TdxBarDockControl           Legend

Derived from TControl

OnClick

OnDblClick

OnMouseDown

OnMouseMove

OnMouseUp

OnResize


TdxBarDockControl.Align

TdxBarDockControl

Specifies the layout of a specific external dock control.

type

  TdxBarDockAlign = (dalNone, dalTop, dalBottom, dalLeft, dalRight);

property Align: TdxBarDockAlign;

Description

Use this property to specify the side of a form to which an external dock control is docked.  If the value of dalNone is assigned, the dock control floats over the form.  All the possible values are listed in the following table.

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 the external dock control, its Height property is set to 0 and it becomes invisible.  If the AllowZeroSizeInDesignTime property is set to False, the Height property is set to 3 pixels, despite the fact it does not contain any toolbar.

The default value of the AllowZeroSizeInDesignTime property is False.


TdxBarDockControl.Color

TdxBarDockControl

Determines the background color of the external dock control’s area.

property Color: TColor;

Description

Use the Color property to specify the background color within the current external dock control.  If its ParentColor property is set to True, then changing the Color property of the dock control’s parent automatically changes the current external dock control’s Color property.  When the value of the dock control’s Color property changes, the ParentColor property is automatically set to False.


TdxBarDockControl.ParentColor

TdxBarDockControl

Specifies whether the parent control provides the color information for the current external dock control.

property ParentColor: Boolean;

Description

Set the ParentColor property to True to use the same color as its parent control.  Otherwise, the current dock control uses its own Color property.  When the value of the Color property changes, the ParentColor property is automatically set to False.


TdxBarDockControl.SunkenBorder

TdxBarDockControl

Specifies whether an external dock control has a sunken border.

property SunkenBorder: Boolean;

Description

If the SunkenBorder property is set to True, the current external dock control is drawn using sunken borders.  Otherwise, no border is drawn around the dock control.


TdxBarDockControl.UseOwnColor

TdxBarDockControl

Specifies whether an external dock control is drawn using its own color.

property UseOwnColor: Boolean;

Description

If the UseOwnColor property is set to True, the current external dock control is drawn using its own color as specified by the Color property.  Otherwise, the dock control’s color is controlled by the bar manager’s DockColor property or on the parent control’s color (if the ParentColor is set to True).

The default value of the UseOwnColor property is False.


TdxBarDockControl.UseOwnSunkenBorder

TdxBarDockControl          See Also

Specifies whether an external dock control’s border is drawn using its own border settings.

property UseOwnSunkenBorder: Boolean;

Description

If the UseOwnSunkenBorder property is set to True, the current external dock control uses its own border settings as specified by the SunkenBorder property.  Otherwise, the dock control’s border style is controlled by the bar manager’s SunkenBorder property.

The default value of the UseOwnSunkenBorder property is False.


TdxBarSubMenuControl
TdxBarSubMenuControl Object

Hierarchy          Properties           Methods           Events

Represents submenus on screen.

Unit

dxBar

TdxBarSubMenuControl = class(TCustomdxBarControl)

Description

The TdxBarSubMenuControl class visually represents toolbar and Ribbon context menus (see TdxBarPopupMenu, TdxRibbonPopupMenu and TdxBarApplicationMenu) and toolbar subitems (see TCustomdxBarSubItem).  The TdxBarSubMenuControl objects are bar controls since the TdxBarSubMenuControl class is inherited from the TCustomdxBarControl class.

Generally, the bar control’s ChildBar property specifies an object of the TdxBarSubMenuControl type.


Hierarchy

TCustomControl

|

TCustomdxBarControl

|

TdxBarSubMenuControl


TdxBarSubMenuControl Properties

TdxBarSubMenuControl               Legend

In TdxBarSubMenuControl

MarkSize

MaxVisibleCount

OwnerWidth

OwnerHeight

TopIndex

Derived from TCustomdxBarControl

BarManager

BkBrush

Canvas

ChildBar

ComboBoxArrowWidth

DockingStyle

EditFontHandle

EditTextSize

Font

IconSize

IsActive

IsCustomizing

ItemLinks

MarkState

MenuArrowHeight

MenuArrowWidth

ParentBar

SelectedControl

TextSize


TdxBarSubMenuControl Methods

TdxBarSubMenuControl               Legend

In TdxBarSubMenuControl

DoCloseUp

DoPopup

DownArrowExists

Hide

HideAll

Kind

Show

UpArrowExists

VisibleCount

Derived from TCustomdxBarControl

AdjustSize

BarGetFocus

BarLostFocus

CalcDrawingConsts

Create

CreateControls

Destroy

DestroyControls

GetFullItemRect

GetItemRect

GetItemRectEx

GetItemRegion

HideAll

HideOnClick

IsChildBar

IsRealVertical

IsVertical

ItemAtPos

Kind

NotHandleMouseMove

PaintItem

RepaintBar

SetKeySelectedItem

SetMouseSelectedItem


TdxBarSubMenuControl Events

TdxBarSubMenuControl               Legend

In TdxBarSubManuControl

OnCloseUp

OnPopup


TdxBarSubMenuControl.MarkSize

TdxBarSubMenuControl

Returns the height of the indicator which appears in a submenu in place of rarely used menu items.

property MarkSize: Integer;

Description

Use this property to obtain the height of the indicator which appears in a submenu in place of a rarely used menu items that are currently hidden.

For internal use only.

ReadOnly Property


TdxBarSubMenuControl.TopIndex

TdxBarSubMenuControl

Specifies the index of the top visible item.

property TopIndex: Integer;

Description

Use this property to specify the index of the top visible menu item.  The TopIndex property’s value represents the index of the top item in the VisibleItems zero-based collection of the ItemLinks property.


TdxBarSubMenuControl.MaxVisibleCount

TdxBarSubMenuControl

Returns the maximum number of available and visible menu items.

property MaxVisibleCount: Integer;

Description

Use this property to obtain the maximum number of visible menu items.  If the number of menu items is greater than MaxVisibleCount, the up or down arrow appears at the top/bottom of the menu.

ReadOnly Property


TdxBarSubMenuControl.OwnerWidth

TdxBarSubMenuControl            See Also

Specifies the width of an item control which activates the current submenu control.

property OwnerWidth: Integer;

Description

Use this property to avoid the overlapping of an item control and the current submenu control which is activated by the item control.  For example, if a submenu control is displayed upon a button click, the value of the OwnerWidth property is set to the button’s width to avoid overlapping of the button’s area and the submenu control.


TdxBarSubMenuControl.OwnerHeight

TdxBarSubMenuControl            See Also

Specifies the height of an item control which activates the current submenu control.

property OwnerHeight: Integer;

Description

Use this property to avoid overlapping of an item control and the current submenu control which is activated by the item control.  For example, if a submenu control is displayed upon a button click, the value of the OwnerHeight property is set to the button’s height to avoid overlapping of the button’s area and the submenu control.


TdxBarSubMenuControl.DoCloseUp

TdxBarSubMenuControl          See Also

Generates the OnCloseUp event.

procedure DoCloseUp; dynamic;

Description

Override this method to perform specific actions when closing a submenu without handling the OnCloseUp event.


TdxBarSubMenuControl.DoPopup

TdxBarSubMenuControl          See Also

Generates the OnPopup event.

procedure DoPopup; dynamic;

Description

Override this method to perform specific actions when activating a submenu without handling the OnPopup event.


TdxBarSubMenuControl.DownArrowExists

TdxBarSubMenuControl            See Also

Determines whether the current submenu includes a down arrow.

function DownArrowExists: Boolean;

Description

This function returns True, if the current submenu includes a down arrow to scroll through items when their number exceeds that of the VisibleCount property.

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


TdxBarSubMenuControl.UpArrowExists

TdxBarSubMenuControl            See Also

Determines whether the current submenu includes an up arrow.

function UpArrowExists: Boolean;

Description

This function returns True, if the current submenu includes an up arrow to scroll through items when their number exceeds that of the VisibleCount property.

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


TdxBarSubMenuControl.VisibleCount

TdxBarSubMenuControl          See Also

Returns the total number of menu items that are currently visible within the current submenu.

function VisibleCount: Integer;

Description

This function returns the total number of menu items that are currently displayed by the current submenu control.  If the number of all menu items exceeds that of the VisibleCount property's value, the menu displays up and down arrows at the top or bottom of the menu, correspondingly.

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


TdxBarSubMenuControl.Hide

TdxBarSubMenuControl            See Also

Makes the current submenu control invisible.

procedure Hide;

Description

This method hides the current submenu and all its child bar controls.  When the bar control is hidden, its properties and methods are still available.


TdxBarSubMenuControl.Show

TdxBarSubMenuControl            See Also

Shows a submenu control.

procedure Show;

Description

This method first generates the OnPopup event and then displays a submenu control using animation effects which are specified by the bar manager’s MenuAnimations property.


TdxBarSubMenuControl.OnCloseUp

TdxBarSubMenuControl

Occurs before closing the current submenu control.

property OnCloseUp: TNotifyEvent;

Description

Handle the OnCloseUp event to perform specific actions when closing the current submenu control.  For instance, in the OnCloseUp event handler you can make certain that items have valid contents before allowing the submenu to close.


TdxBarSubMenuControl.OnPopup

TdxBarSubMenuControl

Occurs before a popup menu appears.

property OnPopup: TNotifyEvent;

Description

Handle the OnPopup event to perform specific actions before a popup menu is displayed.


TdxBarSubMenuControl.HideAll

TdxBarSubMenuControl

Hides the current submenu control and all its item controls.

procedure HideAll; override;

Description

Submenu controls visually represent popup menus (TdxBarPopupMenu‘s objects) or subitems (TCustomdxBarSubItem‘s objects).  A popup menu can have no parent if, for example, it’s linked to the form’s control using the bar manager’s PopupMenuLinks property.  Call the HideAll method to destroy an active popup menu control, which has no parent.  If a submenu control has a parent, this method makes it inactive along with its items and the parent it belongs to.  For instance, if there is a sub menu with items and other items on a toolbar control, call the HideAll method to make both the subitem and the toolbar control and their items inactive.

To access the currently active toolbar control, use the ActiveBarControl method.


TdxBarSubMenuControl.Kind

TdxBarSubMenuControl

Returns the current toolbar control type.

type

  TdxBarKind = (bkBarControl, bkBarQuickControl, bkSubMenu);

class function Kind: TdxBarKind; override;

Description

For a TdxBarControl submenu control, the Kind function returns bkSubMenu.

The TdxBarQuickControl and TdxBarControl classes implement the same class function, and return bkBarQuickControl and bkBarControl values respectively.

For instance, use the Kind function to determine the toolbar control type that is the parent of a particular item control.


TdxDockControl
TdxDockControl Object

Hierarchy          Properties           Methods            See Also

Used to draw a dock control.

Unit

dxBar

TdxDockControl = class(TCustomControl)

Description

The TdxDockControl object 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.  A dock control can hold several toolbars within it.  A dock control consists of rows; and rows in turn consist of columns.  A dock row and dock column are represented by the TdxDockRow object and TdxDockCol object, respectively.


Hierarchy

TCustomControl

|

TdxDockControl


TdxDockControl Properties

TdxDockControl               Legend

In TdxDockControl

AllowDocking

BackgroundBitmap

BarManager

Bars

DockingStyle

RowCount

RowList

Rows


TdxDockControl Methods

TdxDockControl               Legend

In 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 allows you to 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

Provides access to the list of dock rows.

property RowList: TList;

Description

Toolbars within a dock control can be arranged across several rows and columns.  The RowList property contains a list of objects of the TdxDockRow type which represent rows of toolbars and determine a toolbar's layout on screen.

ReadOnly Property


TdxDockControl.BarManager

TdxDockControl            See Also

Specifies a bar manager that owns the current dock control.

property BarManager: TdxBarManager;

Description

Dock controls can only hold toolbars that belong to the specified bar manager.


TdxDockControl.Bars

TdxDockControl            See Also

Provides access to toolbars that reside within the current dock control.

property Bars: TdxBars;

Description

Provides access to the list of TdxBar objects which provide the information required to draw the corresponding toolbars that reside within the current dock control.

ReadOnly Property


TdxDockControl.RowCount

TdxDockControl            See Also

Returns the number of dock rows within the current dock control.

property RowCount: Integer;

Description

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

ReadOnly Property


TdxDockControl.Rows

TdxDockControl            See Also

Provides access to the list of dock rows within the current dock control.

property Rows[Index: Integer]: TdxDockRow;

Description

Toolbars within a dock control can be arranged across several rows and columns.  The Rows zero-based collection provides indexed access to the list of TdxDockRow objects which represent rows of toolbars.  Use this property to access a particular dock row using its index.  Use the RowCount property to obtain the total number of dock rows within the Rows collection.

ReadOnly Property


TdxDockControl.DockingStyle

TdxDockControl            See Also

Indicates the dock control’s docking style.

type

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

property DockingStyle: TdxBarDockingStyle;

Description

Use the DockingStyle property to determine the container’s edge where the current 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 the bars that reside within a dock control.

ReadOnly Property


TdxDockControl.CreateEx

TdxDockControl          See Also

Creates a dock control with a specified docking style.

type

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

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

Description

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


GetBarManagerByForm, TdxBars.Items, TdxBar.DockingStyle, TdxBar.Caption Example

This example requires a button and a toolbar with its caption set to ‘ToolbarCaption’.  After pressing this button, the toolbar’s DockingStyle property is changed and the toolbar floats.

// Delphi

procedure TForm1.Button1Click(Sender: TObject);

var

  ABarManager: TdxBarManager;

  ABar: TdxBar;

begin

  ABarManager := GetBarManagerByForm(Form1);

  ABar := ABarManager.BarByCaption('ToolbarCaption');

  if ABar <> nil then

    ABar.DockingStyle := dsNone;

end;

// C++Builder

void __fastcall TForm1::Button1Click(TObject * Sender)

{

  TdxBarManager * ABarManager;

  TdxBar * ABar;

  ABarManager = GetBarManagerByForm(Form1);

  ABar = ABarManager->BarByCaption("ToolbarCaption");

  if (ABar != NULL)

    ABar->DockingStyle = dsNone;

}


TdxBarManager.CategoryItemsVisible, TdxBarManager.Categories Example

You can toggle the category visibility when your application must enable/disable certain features, according to an end-user’s security access level.  The following procedure sets the visibility of all items within a specified category.

// Delphi

procedure ShowCategory(ACategoryName: string; ABarManager: TdxBarManager; AVisible: TdxBarItemVisible);

var

  i: Integer;

begin

  for i := 0 to ABarManager.Categories.Count – 1 do

    if ABarManager.Categories.IndexOf(ACategoryName) = i then

    begin

      ABarManager.CategoryItemsVisible[i] := AVisible;

      Exit;

    end;

end;

// C++Builder

void __fastcall ShowCategory(AnsiString ACategoryName, TdxBarManager * ABarManager, TdxBarItemVisible AVisible)

{

  int i;

  for(i=0; ABarManager->Categories->Count; i++)

    if(ABarManager->Categories->IndexOf(ACategoryName) == i)

    {

      ABarManager->CategoryItemsVisible[i] = AVisible;

      return;

    }

}


TdxBarItem.ClickItemLink, TdxBarItem.CurItemLink Example

This example requires several TdxBarButton item controls with one underlying item.  The following code represents a TdxBarButton item’s OnClick event handler that hides the item control being clicked.

// Delphi

procedure TForm1.dxBarButton1Click(Sender: TObject);

begin

  dxBarButton1.ClickItemLink.Visible := False;

end;

// C++Builder

void __fastcall TForm1::dxBarButton1Click(TObject *Sender)

{

  dxBarButton1->ClickItemLink->Visible = False;

}

To specify the item link that corresponds to the active item control, you can also use the CurItemLink property as shown in the following code snippet.

// Delphi

  dxBarButton2.CurItemLink.Visible := False;

// C++Builder

  dxBarButton2->CurItemLink->Visible = False;


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 item control’s 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 UserGlyph and UserCaption properties.  The first five button controls look different but perform the same action.

// Delphi

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');

 with dxBarButton1 do

 begin

   BarManager.BeginUpdate;

   for iCount := 0 to LinkCount - 1 do

     if iCount < 5 then

     begin

       Links[iCount].UserGlyph := Bitmaps[iCount];

       Links[iCount].UserCaption :=

         Links[iCount].Caption + IntToStr(iCount);

       Bitmaps[iCount].Free;

     end;

   end;

   BarManager.EndUpdate;

end;

// C++Builder

void __fastcall ChangePictures(TObject * Sender)

{

  int iCount;

  Graphics::TBitmap * Bitmaps[5];

 for(iCount=0;iCount<5;iCount++)

   Bitmaps[iCount] = new 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");

 dxBarButton1->BarManager->BeginUpdate();

 for(iCount=0;iCount<dxBarButton1->LinkCount;iCount++)

   if (iCount < 5)

   {

     dxBarButton1->Links[iCount]->UserGlyph = Bitmaps[iCount];

     dxBarButton1->Links[iCount]->UserCaption =

           dxBarButton1->Links[iCount]->Caption + IntToStr(iCount);

     delete Bitmaps[iCount];

   }

 dxBarButton1->BarManager->EndUpdate();

}


TdxBarWindowItem.Text, TdxBarWindowItem.OnChange Example

The following code snippet demonstrates how to filter a dataset by handling the OnChange event of a TdxBarEdit.  The TdxBarEdit.Text property provides a filter value.

// 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

The following code snippet represents the TdxBarEdit.OnChange event handler that creates a new category, and moves all TdxBarLargeButton buttons to this category.  The category’s name is specified by the Text property of the TdxBarEdit control.

// Delphi

procedure TForm1.dxBarEdit1Change(Sender: TObject);

var

  i: Integer;

begin

  with dxBarEdit1.BarManager do

  begin

    BeginUpdate;

    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;

    EndUpdate;

  end;

end;

// C++Builder

void __fastcall TForm1::dxBarEdit1Change(TObject * Sender)

{

  TdxBarManager * ABarManager;

  ABarManager = dxBarEdit1->BarManager;

  ABarManager->BeginUpdate();

  ABarManager->Categories->Add(dxBarEdit1->Text);

  for(int i = 0; I < ABarManager->ItemCount; i++)

    if (dynamic_cast<TdxBarLargeButton *>(ABarManager->Items[i]) != NULL)

    {

     ABarManager->Items[i]->Category = ABarManager->Categories->Count-1;

     ABarManager->Items[i]->Caption = "NewCaption" + IntToStr(i);

    }

  ABarManager->EndUpdate();

}


TdxBarListItem.Items Example

The following code snippet demonstrates how to populate the Items collection of a TdxBarListItem.

The AddRecentFiles procedure displayed below adds a file specified by the AFileName parameter to the list of recently used files in a TdxBarListItem.  The AMaxNumberOfFiles parameter specifies the maximum number of file names to store.

// Delphi

procedure AddRecentFiles(AFileName: string; AMaxNumberOfFiles: Integer);

var

  i: Integer;

begin

  with dxBarListItem1 do

  begin

    BarManager.BeginUpdate;

    if Items.Count < AMaxNumberOfFiles then

      Items.Add('');

    for i := Items.Count - 1 downto 1 do

      Items[i] := Items[i-1];

    Items[0] := AFileName;

    BarManager.EndUpdate;

  end;

end;

// C++Builder

void __fastcall AddRecentFiles(AnsiString AFileName, int AMaxNumberOfFiles)

{

 dxBarListItem1->BarManager->BeginUpdate();

 if (dxBarListItem1->Items->Count < AMaxNumberOfFiles)

   dxBarListItem1->Items->Add("");

 for(int i = dxBarListItem1->Items->Count - 1; i>= 1; i--)

   dxBarListItem1->Items->Strings[i] = dxBarListItem1->Items->Strings[i-1];

 dxBarListitem1->Items->Strings[0] =AFileName;

 dxBarListItem1->BarManager->EndUpdate();

}


TdxBarPopupMenu Example

This example demonstrates how to activate a TdxBarPopupMenu when an end-user right-clicks in the form.  The following code snippet represents a form’s OnMouseDown event handler.

// 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 using a TdxBarContainerItem in a MDI application.  The AddMenu procedure displayed below creates submenus on the parent toolbar with the child form’s main toolbar items.  The items are added to the parent toolbar‘s container item.

// Delphi

procedure AddMenu;

var

  ABarManager: TdxBarManager;

begin

  ABarManager := GetBarManagerByForm(ChildForm1);

  ABarManager.BeginUpdate;

  with dxBarContainerItem1 do

  begin

    ItemLinks := ABarManager.MainMenuBar.ItemLinks;

    Caption := ChildForm1.Caption;

  end;

  ABarManager.EndUpdate;

end;

The following code hides the created submenus.

  dxBarContainerItem1.Visible := ivNever;

The following code demonstrates how an existing TdxBarButton can be added to the container item as the first item in a group.

  with dxBarContainerItem1 do

  begin

    // adding the item link

    ItemLinks.Add.Assign(dxBarButton1.Links[0]);

    // making the item control first in the group

    ItemLinks.Items[ItemLinks.Count-1].BeginGroup := True;

  end;


TdxBarColorCombo.Color Example

This example demonstrates how to use a TdxBarColorCombo for applying the font color to a TEdit component.  The following code snippet represents the TdxBarColorCombo.OnChange event handler.

// Delphi

procedure TForm1.dxBarColorCombo1Change(Sender: TObject);

begin

  Edit1.Font.Color := dxBarColorCombo1.Color;

end;

// C++Builder

void __fastcall TForm1::dxBarColorCombo1Change(TObject *Sender)

{

  Edit1->Font->Color = dxBarColorCombo1->Color;

}


TdxBarFontNameCombo Example

This example demonstrates how to use a TdxBarFontNameCombo for applying font settings to a TEdit component.  The following code snippet represents the TdxBarFontNameCombo.OnChange event handler.

// Delphi

procedure TForm1.dxBarFontNameCombo1Change(Sender: TObject);

begin

  if Length(dxBarFontNameCombo1.Text) <> 0 then

    Edit1.Font.Name := dxBarFontNameCombo1.Text;

end;

// C++Builder

void __fastcall TForm1::dxBarFontNameCombo1Change(TObject *Sender)

{

  Edit1->Font->Name = dxBarFontNameCombo1->Text;

}


TdxBarImageCombo.Items, TdxBarImageCombo.ImageIndexes, TdxBarImageCombo.Sorted Example

This example demonstrates how to add a new item to a TdxBarImageCombo dropdown list, and associate an image with this item.  This example requires a TdxBarImageCombo and TButton objects.

// Delphi

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 swap items in the list.  This method exchanges both the text strings and images of items.

The following code swaps the first and second list items.

  dxBarImageCombo1.Items.Exchange(0,1);


TdxBarDateCombo.Date Example

This example demonstrates how to filter a table by a date selected using a TdxBarDateCombo.

// Delphi

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 TdxBarTreeViewCombo’s dropdown 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 field of the largest departments is equal to –1.  You can use this example with smaller datasets.

// Delphi

procedure TForm1.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 lengthy operations, such as locating a record in a large database, you might wish to display a wait cursor to the user.  The following code shows a way to use a TdxBarStatic for this purpose.

// Delphi

var

  OldCaption : string;

// ...

begin

// ...

  OldCaption := dxBarStatic1.Caption;

  dxBarStatic1.Caption := 'Search in progress ...';

  {locates the record}

  {restores the caption}

  dxBarStatic1.Caption := OldCaption;

// ...

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.  You can set its ListSource property to the data source, which specifies vendors, and handle the TdxBarLookupCombo.OnChange event as shown in the code snippet below.  The Datasource2.Dataset specifies the PARTS dataset.

// Delphi

procedure TForm1.dxBarLookupCombo1Change(Sender: TObject);

begin

  Datasource2.Dataset.Filter :=

    dxBarLookupCombo1.KeyField + ' = ' + VarToStr(dxBarLookupCombo1.KeyValue);

  Datasource2.Dataset.Filtered := True;

end;


TdxBarSpinEdit Example

This example demonstrates how you can handle the TdxBarSpinEdit.OnCurChange event to dynamically change the incremental step against the range of an edited value.

// Delphi

// 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;


TdxBarDBNavigator.VisibleButtons Example

This procedure hides TdxBarDBNavigator buttons, and removes them from a form to avoid data modification.

// Delphi

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’s 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:

// Delphi

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.Color := clNavy;

  // Makes the toolbar visible

  ABar.Visible := True;

end;


TdxBarItem, TdxBarItemLinks.AddItem, TdxBarManager.BarByCaption example

See Also

In this example, a link to the new item of the TdxBarEdit type is added to the Custom 1 toolbar and the caption 'TextEdit' is then assigned to the item.  It is assumed that the Custom 1 bar has already been created in the Form1 form.

// Delphi

procedure TForm1.AddAnyItemClick(Sender: TObject);

var

  ABarManager : TdxBarManager;

  ABar : TdxBar;

begin

  ABarManager := GetBarManagerByForm(Form1);

  with ABarManager do

  begin

    ABar := BarByCaption('Custom 1');

    if ABar <> nil then

    begin

      BeginUpdate;

      try

        with ABar.ItemLinks.AddItem(TdxBarEdit) do

        begin

          Item.Caption := 'TextEdit';

          TdxBarEdit(Item).ShowCaption := True;

        end;

      finally

        EndUpdate;

      end;

    end;

  end;

end;

The following image shows the newly created item when the application runs:

Note:	You can use the TdxBaritemLinks.AddItem method to create items of any type, which derive from the TdxBarItem.

At design time, you can create an item by using the bar’s context menu. To do this, right-click the desired bar and choose the Add Item, then the type of the item in the submenu, as shown in the image below:


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 TdxBarManager.HideAll method is used to hide the dropdown grid.

// Delphi

{ 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, 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.  The following code snippet represents the OnEnter and OnExit event handlers.

// Delphi

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 and dxBarEdit1CurChange procedures below represent the TdxBarEdit.OnKeyPress and TdxBarEdit.OnCurChange event handlers, respectively.

// Delphi

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.

// Delphi

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 a TdxBarEdit are saved in the subitem, so that the last input string goes first.  This process is organized by means of only one item of type TdxBarButton.  In its ItemLinks, the UserCaption property changes to the entered string.

// Delphi

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;


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.

// Delphi

unit CustomItem;

interface

uses

  Classes, Graphics, Windows, dxBar, cxGraphics;

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 GetDefaultHeight: Integer; override;

    function GetDefaultWidth: Integer; override;

    function IsDestroyOnClick: Boolean; override;

    procedure DoPaint(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);

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.DoPaint(ARect : TRect; PaintType : TdxBarPaintType);

var

  ASize: TSize;

  AText: string;

begin

  with DrawParams do

  begin

    if ARect.Left = ARect.Right then Exit;

    SetBkMode(Canvas.Handle, TRANSPARENT);

    SetTextColor(Canvas.Handle, Item.Color);

    Windows.FillRect(Canvas.Handle, ARect, GetSysColorBrush(COLOR_BTNFACE));

    AText := Item.Caption;

    cxGetTextExtentPoint32(Canvas.Handle, AText, ASize);

    if PaintType = ptVert then

      with ARect do

        OffsetRect(ARect,(Right-Left+ASize.cy)div 2,(Bottom-Top-ASize.cx)div 2)

    else

      with ARect do

        OffsetRect(ARect,(Right-Left-ASize.cx)div 2,(Bottom-Top-ASize.cy)div 2);

    cxDrawText(Canvas.Handle, AText, ARect, DT_SINGLELINE or DT_NOCLIP);

  end;

end;

function TdxBarColorStaticControl.GetDefaultWidth: Integer;

var

  ASize: TSize;

  AText string;

begin

  AText := Item.Caption;

  cxGetTextExtentPoint32(Canvas.Handle, AText, ASize);

  if Parent.IsVertical then

    Result := Parent.TextSize

  else

    Result := ASize.cx + (Parent.TextSize div 2);

end;

// returns the item control height based on its layout

function TdxBarColorStaticControl.GetDefaultHeight: Integer;

var

  ASize: TSize;

  AText: string;

begin

  AText := Item.Caption;

  cxGetTextExtentPoint32(Canvas.Handle, AText, ASize);

  if Parent.IsVertical then

    Result := ASize.cx + (Parent.TextSize div 2)

 else

    Result := Parent.TextSize;

end;

function TdxBarColorStaticControl.IsDestroyOnClick: Boolean;

begin

  Result := False;

end;

function TdxBarColorStaticControl.GetDefaultWidth: integer;

var

  Size : TSize;

  AText: string;

begin

  AText := Item.Caption;

  GetTextExtentPoint32(Parent.Canvas.Handle, PChar(AText), Length(AText), Size);

  if Parent.IsVertical then

    Result := Parent.TextSize

  else

    Result := Size.cx + (Parent.TextSize div 2);

end;

// returns the item control height according to its layout

function TdxBarColorStaticControl.GetDefaultHeight: integer;

var

  Size : TSize;

  AText: string;

begin

  AText := Item.Caption;

  GetTextExtentPoint32(Parent.Canvas.Handle, PChar(AText), Length(AText), Size);

  if Parent.IsVertical 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.


Custom Hint Window Example

C++Builder

This example demonstrates how you can implement a custom hint window to display a bitmap with a hint text.

// Delphi

type

  TMyHint = class(TdxBarHintWindow)

  private

    FBitmap: TBitmap;

  protected

    procedure Paint; override;

  public

    constructor Create(AOwner :TComponent); override;

    destructor Destroy; override;

    function ActivateHint(ABarManager: TdxBarManager; const AHintText, AShortCut: string): Boolean; override;

  end;

implementation

// ...

constructor TMyHint.Create(AOwner : TComponent);

begin

  inherited Create(AOwner);

  FBitmap := TBitmap.Create;

  FBitmap.LoadFromFile('...');

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;

function TMyHint.ActivateHint(ABarManager: TdxBarManager; const AHintText, AShortCut: string): Boolean;

var

  H : Integer;

begin

  Result := inherited ActivateHint(ABarManager, AHintText, AShortCut);

  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);

    bool __fastcall ActivateHint(TdxBarManager* ABarManager, const AnsiString AHintText, const AnsiString AShortCut);

};

// C++Builder

Unit1.cpp

// ...

__fastcall TMyHint::TMyHint(TComponent * AOwner) : TdxBarHintWindow(AOwner)

{

  FBitmap = new Graphics::TBitmap;

  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);

}

bool __fastcall TMyHint::ActivateHint(TdxBarManager* ABarManager, const AnsiString AHintText, const AnsiString AShortCut)

{

  bool Res = TdxBarHintWindow::ActivateHint(ABarManager, AHintText, AShortCut);

  int H = Canvas->TextHeight(Caption);

  if (FBitmap->Height > H)

    H = FBitmap->Height;

  Height =  H + 4;

  Width = FBitmap->Width + 3 + Canvas->TextWidth(Caption) + 3;

  return Res;

}


Legend

Protected

Published

ReadOnly


Bar Manager

See Also

A bar manager is a non-visual component that maintains bars, bar items, categories and item groups within a container (form or frame).  To place a bar manager on a form or frame, drop a TdxBarManager component from the component palette’s ExpressBars page onto the form/frame.  Place only one bar manager component per form/frame.

Customization Capabilities

After you place a TdxBarManager component onto a form, you can invoke the Customization Form and create bars and the main menu using the bar manager’s context menu.  You can also note invoke the Customization Form by double-clicking the TdxBarManager component.

At design time, a bar manager's Customization Form allows you to manage bars, bar items, categories, and item groups, and also specify options that are common to all bar items.  Refer to the Customization Form topic, to learn more about the capabilities provided by this form.

To manage bars, bar items, categories, and item groups in code, use a bar manager’s Bars, Items, Categories, and Groups collections, respectively.

With the ExpressBars Suite v6, bars and bar items can be displayed using the innovative Ribbon User Interface.

Appearance Settings

A bar manager allows you to apply a paint style to all its bars via the Style and LookAndFeel properties.

Note:	You can use the TcxLookAndFeelController component to maintain the same look and feel settings across all controls (including bars) on your form(s).

Using a bar manager’s Font property, you can specify font settings common to all bar items.  You can customize appearance settings (background color or bitmap, font settings and text color) for each bar item using its Style property.  In addition, you can use the StyleEdit property to customize appearance aspects of in-place editors.

Layout Persistence

The ExpressBars Suite allows the layout of bars to be saved and restored in the system registry, an INI file or stream.  Refer to the Saving and Restoring Bar Layout topic for detailed information about automatic and manual layout persistence.


Toolbars

See Also

Bars represent visual components designed to display item controls using item link settings.  Bars can be floated or docked to any edge of a form/frame via four bar dock controls that a bar manager automatically creates when it’s placed on the form/frame.  In addition, you can choose one toolbar to be displayed as a main menu.

Users can easily customize the layout of toolbars via drag and drop both at design and runtime.  Refer to the Using Drag and Drop topic, to learn more about this capability.

In the Ribbon control, toolbars are docked into Ribbon tab groups and cannot be customized via drag and drop.

Creating and Removing Bars

To create and remove toolbars at design time, use the following options:

•	a bar manager and toolbar’s context menus;

•	the Toolbars page of the Customization Form;

•	in code, use a bar manager’s AddToolbar and DeleteToolbar methods.

End-users can manage toolbars using the Customization Form provided that a bar manager’s CanCustomize property is set to True.  Refer to the Using the Customization Form topic to learn how end-users can invoke this form.

Appearance Settings

General appearance can be modified using the following options:

•	via the Toolbars page of the Customization Form;

•	via the Toolbars Popup Menu;

•	in code, using a bar’s Visible property.

Each bar is represented by an instance of the TdxBar class, which provides properties to control appearance aspects of its elements.

Docking Settings

The ExpressBars Suite allows you to prohibit toolbar docking.  To specify dock settings for all toolbars, use a bar manager’s NotDocking property.  To modify dock options for a specific toolbar, use its NotDocking property.


Bar Items and Links

See Also

This topic provides you with general information on items and links, which are primary elements of the model used for bars, and also demonstrates how bar items can be created.  Refer to the Customizing Toolbar Items and Item Controls topic, for details on design-time and runtime customization capabilities provided for these bar elements.

Bar Items

To populate bars and menus with item controls (buttons, submenus, editors, labels, etc.), you need to create bar items.  A bar item is a non-visual object that implements specific functionality and specifies:

•	the default appearance settings of a corresponding control;

•	how the control responds to mouse clicks and keyboard events.

Refer to the List of Bar Item Types help topic to learn more.

The ExpressBars Suite provides a number of ways to create bar items.  The Commands page of a bar manager's Customization Form provides the most convenient way in which to manage toolbars and bar items within a form.  Refer to the Creating Toolbar Items and Item Controls topic, to learn more.

In addition, this form allows you to:

•	logically organize bar items using categories and item groups;

•	explore a list of all created bar items.

Bar Item Links

Since a bar item is a non-visual element, an item link is created to represent it onscreen as an item control (also called ‘linked item control’ or ‘item controls corresponding to the item’).  An item link contains only appearance aspects of an item control, while all processing is carried out by the bar item.

You can create multiple links for an item, but all of them will provide the same functionality.  For instance, you can create an "Open…" item that invokes the Open file dialog and add a link to this item to the main menu and a toolbar.

At design time, the ExpressBars Suite allows you to create an item, an item link and an item control at the same time via the Toolbars Popup Menu or Customizing Popup Menu.  Refer to the Creating Toolbar Items and Item Controls topic to learn more.

In addition, the Customization Form allows you to create an item link for the existing bar item by dragging this item from the Commands list on the Commands page and dropping it within a toolbar or menu.

In code, a bar item link is represented by an instance of the TdxBarItemLink class.  You can access all the created item links for a particular bar item using the item’s Links collection.


List of Bar Item Types

See Also

This topic provides a list of bar items that you can display in toolbars, menus, and Ribbon controls.  Refer to the Creating Toolbar Items and Item Controls help topic, for additional assistance.

Each bar item is represented by a specific class derived from TdxBarItem (which is the base class for all bar items).  The ExpressBars Suite offers a number of built-in bar items, but you are free to use in-place editors from the ExpressEditors library as well as to create custom bar items using built-in bar items as the base.

The following table shows all bar item types provided by the ExpressBars Suite and their corresponding controls.

Bar Item / Bar Item Control	Description
TdxBarButton / TdxBarButtonControl	Represents a toolbar button.  Buttons are the most common toolbar elements.  This item allows you to create: • a standard button; • a toggle/check button (set the TdxBarButton.ButtonStyle property to bsChecked); • a standard or toggle button with a dropdown menu (set the TdxBarButton.ButtonStyle property to bsDropDown or bsCheckedDropDown); • groups of toggle buttons (use the TdxBarButton.GroupIndex property to combine items into groups). To define a button’s action, handle the OnClick event. A TdxBarButton can be optionally displayed in menus using large images, provided that the LargeGlyph property is assigned.
TdxBarLargeButton / TdxBarLargeButtonControl	Represents a large toolbar button.  In addition to the features provided by a TdxBarButton, this item allows you to: • highlight a large button when the mouse pointer hovers over it; • control the glyph layout (see the GlyphLayout property).
TcxBarEditItem / TcxBarEditItemControl	Represents a container for in-place editors from the ExpressEditors library, including: BlobEdit, ButtonEdit, CalcEdit, CheckBox, CheckComboBox, CheckGroup, ColorComboBox, ComboBox, CurrencyEdit, DateEdit, ExtLookupComboBox, FontNameComboBox, HyperLink, Image, ImageComboBox, Label, LookupComboBox, MaskEdit, Memo, MRUEdit, PopupEdit, ProgressBar, RadioGroup, RichEdit, ShellComboBox, SpinEdit, TextEdit, TimeEdit, and TrackBar. Note: the ExpressEditors library must be purchased separately. Use the item’s PropertiesClass or PropertiesClassName property to specify the type of editor to display.
TdxBarEdit / TdxBarEditControl	Represents a single-line text editor.  This item provides standard text editing capabilities.
TdxBarSubItem / TdxBarSubItemControl	Represents a submenu (a subitem that contains other bar items).  In addition to settings that control the subitem appearance in toolbars/menus, this submenu allows you to customize the following appearance aspects of its items: • the size (ItemOptions.Size); • the general appearance of shortcuts and descriptions (ItemOptions.ShowShortCuts and ItemOptions.ShowDescriptions). Refer to the Customizing Toolbar Items and Item Controls topic, to learn how submenus can be customized at design and runtime.
TdxBarListItem / TdxBarContainerItemControl	Represents a numerated list of strings.  Recently used files and active windows in MDI applications are the examples of these strings.  Refer to the Items property for more information. Note: You can toggle numbering in a list via the ShowNumbers option.
TdxBarContainerItem / TdxBarContainerItemControl	Represents a submenu with a variable number of bar items, which can be added programmatically.  With this item, you can create a structure similar to Favorites in a web browser.
TdxBarLookupCombo / TdxBarLookupComboControl	Represents a lookup combo that displays records from a dataset linked via the ListSource property. This bar item allows you to specify: • the fields whose values will be displayed in a dropdown list (ListField); • the field whose values will be displayed in the item’s editor (ListFieldIndex); • the field whose values identify records in this lookup combo (KeyField).
TdxBarStatic / TdxBarStaticControl	Represents a static text (label) in toolbars and status bars.  You can optionally make this label clickable via the AllowClick property, and handle the item’s OnClick events.
TCustomdxBarCombo / TCustomdxBarComboControl	Represents a combo box with custom dropdown windows.  You can handle the OnGetDropDownWindow event to provide a window handle to display as a dropdown window for the combo box.
TdxBarCombo / TdxBarComboControl	Represents a standard combo box that displays text strings in its dropdown list. As with other built-in combo boxes, this bar item allows you to: • manage the contents of a dropdown list (Items). • sort items alphabetically within the dropdown list (Sorted); • customize appearance settings of these items by handling the OnDrawItem and OnMeasureItem events.
TdxBarColorCombo / TdxBarColorComboControl	Represents a combo box that allows a color to be selected from: • a set of sixteen predefined colors; • a color selection dialog.
TdxBarFontNameCombo / TdxBarComboControl	Represents a combo box that allows a font name to be selected from a list of installed fonts.
TdxBarDateCombo / TdxBarDateComboControl	Represents a combo box that allows a date to be: • typed in the bar item’s editor; • selected from a dropdown calendar. This bar item allows you to restrict a date to a specific date range (MinDate and MaxDate) and control appearance settings of the item’s editor (ShowDayText and DateOnStart) and dropdown calendar window (ShowClearButton and ShowTodayButton).
TdxBarTreeViewCombo / TdxBarTreeViewComboControl	Represents a combo box that displays tree-structured data within its dropdown window. This bar item allows you to: • provide images for tree nodes (Images and StateImages); • customize appearance settings of expand buttons and lines between nodes (ShowButtons, ShowLines, and ShowRoot); • sort nodes (SortType).
TdxBarImageCombo / TdxBarImageComboControl	Represents a combo box that displays a list of text stings and images within its dropdown window. This bar item allows you to: • provide images for dropdown list items (Images); • associate these items with images (ImageIndexes).  At design time, this can be done using a specially designed editor; • control the general appearance of text strings (ShowText).
TdxBarToolbarsListItem / TdxBarToolbarsListItemControl	Represents a checked list of existing toolbars.  At runtime, an end-user can click a check box to toggle the visible state of the corresponding toolbar.  A similar functionality is provided by the Quick Customization Popup Menu. Note: This bar item is not intended for use in the Ribbon control.
TdxBarSpinEdit / TdxBarSpinEditControl	Allows numeric values to be edited using spin buttons. This bar item allows you to specify: • the type (integer or float) of a value being edited (ValueType); • upper/lower limits for a value (MaxValue and MinValue); • a prefix/postfix to be displayed with a value (Prefix and PrefixPlace).  These are useful to display currency and percentage values; • an incrementing/decrementing value (Increment).
TdxBarControlContainerItem / TdxBarControlContainerControl	Represents a container for external controls.  Use the Control property to embed a control into a toolbar. Note: Only controls that have no window handles can be placed into submenus.
TdxBarProgressItem / TdxBarProgressControl	Displays a progress bar that can be used, for instance, to show the progress of lengthy operations such as file loading and document processing. This bar item allows you to: • specify the initial, current, and end positions (Min, Position, Max); • customize appearance settings of a progress indicator (Color, Smooth, Step).
TdxBarMRUListItem / TdxBarContainerItemControl	Represents a list of most recently used (MRU) items (such as opened files and documents).  End-users can click a list item to perform an action associated with these items. This bar item allows you to: • manage the contents of the list (AddItem and RemoveItem); • limit the number of list items (MaxItemCount); • optionally remove an item from the list when this item is clicked (RemoveItemOnClick).
TdxBarInplaceSubItem / TdxBarInPlaceSubItemControl	Represents a collapsible subitem in a submenu.  Unlike the TdxBarSubItem, this bar item displays its contents within a parent submenu, when clicked. This bar item allows you to: • toggle its expansion state (Expanded); • perform specific actions when its expansion state changes (OnAfterExpand and OnBeforeCollapse).
TdxBarSeparator / TdxBarSeparatorControl	Represents an item separator in context menus and submenus.  You can toggle its general appearance via the ShowCaption property.
TdxRibbonGalleryItem / TdxRibbonGalleryItemControl	Represents an in-Ribbon gallery.  To provide content for the gallery, use the GalleryGroups property.  Use the GalleryOptions property to customize its appearance settings.


Merging Bars and Menus in MDI Applications

See Also

This document describes how the ExpressBars Suite allows you to combine bars and menus in MDI applications.

Bar Merge Mechanism

In MDI applications, toolbars and menus of the parent and child forms are displayed (by default) within their corresponding windows.  Normally, the menu of the parent form provides general commands (for working with files, windows, etc.), while a child form has toolbars and menus that provide the functionality specific to this child form.  To preserve toolbar/menu navigation capabilities, the bar merge mechanism is used.  This mechanism allows you to:

•	Merge these bars and menus when a child form is activated or maximized.  Use a bar manager’s AlwaysMerge option to control when bar merging occurs.

•	Restore the original bars and menus when the form’s state is reverted back.

Customizing Bar Merge Logic

By default, the ExpressBars Suite automatically merges main menus and adds toolbars from a child form to the parent form.  To customize the default merge mechanism, handle a bar manager’s OnMenuMerge and OnMerge events.  In the event handler, you can:

•	Call the TdxBarManager.Merge and TdxBarManager.Unmerge methods to implement the merge logic for all toolbars and menus within the parent and child forms.

•	Call the TdxBar.Merge and TdxBar.Unmerge methods to implement the merge logic for individual toolbars and menus within the parent and child forms.

Customizing Item Link Merging

By default, the merge operation adds bar item links from one toolbar/menu to another.  You can customize the default merge behavior for each bar item link via the following options:

•	Bar item’s MergeKind property.  With this property, you can:

o	combine contents of sub items or container items provided that their item link captions match (mkMergeByCaption);

o	prohibit the bar item’s links from being added to or combined with other bar item links (mkNone);

o	accept the default behavior for the bar item’s links (mkAdd).

•	Bar item’s MergeOrder property.  Use this property to specify the visual position when the item’s link is added to a toolbar or menu.

•	Bar manager’s OnMergeItemLink event.  Handle this event during merge operations to dynamically specify both merge behavior and position for each bar item link via the AMergeKind and AMergeIndex event parameters.


Customizing Popup Menu

See Also

The customizing popup menu is used to manage the visibility and appearance of individual item controls – both at design and runtime.  To customize appearance and layout settings of multiple toolbar items simultaneously, use the Customization Form.

Design-Time Customization

Runtime Customization

Design-Time Customization

You can activate the customizing popup menu by right-clicking an item control.

The customizing popup menu allows you to:

•	add, rename, delete toolbar items;

•	group toolbar items on toolbars by adding a separator;

•	determine the visibility state, appearance and layout aspects of item controls;

•	reset and delete item controls.

Refer to the Customizing Popup Menu (at design time) topic to learn how to perform the above actions.

Runtime Customization

End-users can customize toolbar items when the Customization Form is displayed.  The customizing popup menu is activated when right-clicking a particular item control.

The customizing popup menu allows end-users to:

•	reset and delete the item control;

•	rename a toolbar item associated with the item control;

•	group toolbar items on toolbars by adding a separator;

•	change appearance aspects of the item control.

Refer to the Customizing Popup Menu (at runtime) topic to learn how to perform the above actions.


Customizing Popup Menu (at design time)

Customizing Popup Menu          See Also

A toolbar item customizing popup menu is context-sensitive.  It means that a menu provides different menu items dependent upon a toolbar’s parent control.

For instance, if a toolbar is placed in a Ribbon Quick Access Toolbar container, then a menu contains the following options:

For a Ribbon Tab Group’s bar item, the following menu items are provided:

If you right-click an item on a toolbar located on a form, a menu has the following view:

The following table describes menu items for all contexts:

Add SubItem	Creates a subitem, and places its item control to the right of the selected item control.
Add Button	Creates a button, and places its item control to the right of the selected item control.
Add Item	Clicking this menu item displays the list of built-in toolbar items.  Click the desired item to create it.  The corresponding item control will be created and placed to the right of the selected item control. Refer to the List of Bar Item Types topic for more information on available built-in bar items.
Add cxEditItem	Allows you to add an item with an in-place editor from the ExpressEditors library.  Clicking this menu item displays a list of in-place editors.  Click the desired editor to create it.  A TcxBarEditItem item control will be created and placed to the right of the selected item control. Refer to the In-place Editors topic for additional information on available in-place editors. When invoked for a particular toolbar item, the customizing popup menu can be used for customizing this item or its item controls.  The following options are available in the popup menu.
Add GroupButton	Adds a button associated with Ribbon Tab Group to Ribbon Quick Access Toolbar.
Reset	Resets the caption, glyph, paint style, and width of the selected item control to defaults (resets all the option flags within the UserDefine property of the corresponding toolbar item link).
Delete	Removes all item controls of the selected item.  You can access the item via the Commands Page of the Customization Form and add item controls to any toolbar via drag and drop.
Delete Item	Removes the item and all of its item controls. You can remove all item controls of the selected toolbar item without removing the item.  Use the Delete menu item for this purpose.
Delete Link	Removes the selected toolbar item control.
Caption	Allows you to modify the selected item’s caption, and the caption of all the item controls of this item.  This option corresponds to a toolbar item’s Caption property.
Position	Allows you to lay out bar items in a toolbar (for details, see the bar item link‘s Position property).
ViewLevels	Allows you to specify constraints of a bar item’s dynamic layout adaptation (for details, see the bar item link‘s ViewLevels and Ribbon Tab Group’s CanCollapse properties).
ButtonGroup	Allows you to organize bar items into visual compact groups in Ribbon Tab Group (for details, see the bar item link‘s ButtonGroup property).

Paint style options correspond to the UserPaintStyle property of a toolbar item link.  These options are enabled only when the item control is linked to a TdxBarButton.  The selected item control is painted in the style that corresponds to the active option.

Default style	Sets the standard style for the selected item control (corresponds to the psStandard value of an item link’s UserPaintStyle property).
Text Only (Always)	The selected item control is only represented by text (corresponds to the psCaption value of an item link’s UserPaintStyle property).
Text Only (in Menus)	If the selected item control is located on a menu, it is represented only by text (corresponds to the psCaptionInMenu value of an item link’s UserPaintStyle property).
Image and Text	The selected item control is represented both by an image and text (corresponds to the psCaptionGlyph value of an item link’s UserPaintStyle property).
Begin a Group	If active, the selected item control follows a group separator.  This option is disabled for the first item on a toolbar, since it cannot follow a group separator.  This option corresponds to the BeginGroup property of a toolbar item link.  Use this option to organize items on a toolbar into groups.
Visible	If active (by default), the selected item control will be visible at runtime.
Most Recently Used	Determines whether the selected item control refers to the most recently used item controls.  If this option is enabled, the selected item control is displayed at the top of a menu.


Customizing Popup Menu (at runtime)

Customizing Popup Menu          See Also

End-users can activate the customizing popup menu by right-clicking a toolbar item provided that the Customization Form is displayed.

The following options are available in this menu.

Reset

Resets the caption, glyph, paint style and width of the selected item control to defaults (resets all the option flags within the UserDefine property of the corresponding toolbar item link).

Delete Link

Removes the selected toolbar item control.

Name

Allows end-users to modify the selected item control’s caption.  This option corresponds to a toolbar item link’s Caption property.

Paint Style Options

These options correspond to the UserPaintStyle property of a toolbar item link.  These options are enabled only when the item control is linked to a TdxBarButton.  The selected item control is painted in the style that corresponds to the active option.

Option	Description
Default Style	Sets the standard style for the selected item control (corresponds to the psStandard value of an item link’s UserPaintStyle property).
Text Only (Always)	Only a text is painted on the selected item control (corresponds to the psCaption value of an item link’s UserPaintStyle property).
Text Only (In menus)	If the selected item control is located on a menu, only text is painted on it (corresponds to the psCaptionInMenu value of an item link’s UserPaintStyle property).
Image and Text	Both an image and a text are painted on the selected item control (corresponds to the psCaptionGlyph value of an item link’s UserPaintStyle property).

BeginGroup

If active, the selected item control follows a group separator.  This option is disabled for the first item on a toolbar, since it cannot follow a group separator.  The option corresponds to the BeginGroup property of a toolbar item link.  Use this option to organize items on a toolbar into groups.


In-place Editors

See Also          Example1          Example2

The ExpressBars Suite allows you to incorporate editors into toolbars.  It includes several built-in toolbar editors, and additionally provides a specially designed editor container bar item (TcxBarEditItem).  This item can contain editors supplied by the ExpressEditors library, as well as their descendants.

Unlike standard bar edit items, a TcxBarEditItem allows you to apply a paint style to its underlying in-place editor (font, text color, and background color).  Refer to the Editor Style and StyleControllers topic to learn more.

The following image shows a bar containing three bar edit items.

There are two ways to embed ExpressEditors into toolbars:

•	Specify the editor type via the TcxBarEditItem properties.

•	Use repository items.

Specify the Editor Type

At design time, you can embed ExpressEditors into toolbars using the toolbar context menu.  The following methods can be used:

•	Select Add cxEditItem and choose the editor type from the sub-menu;

•	Select Add Item | TcxBarEditItem and then specify the editor type using the item’s Properties property.

At runtime, the editor type can be specified via the bar item’s PropertiesClass or PropertiesClassName property.  You can then access the editor's settings via the item’s Properties property.

The following example shows how to display a text editor within a TcxBarEditItem and make it read-only.

// Delphi

// ...

uses

  cxTextEdit;

// ...

  cxBarEditItem.PropertiesClassName := 'TcxTextEditProperties';

  TcxTextEditProperties(cxBarEditItem.Properties).ReadOnly := True;

Use Repository Items

A TcxBarEditItem can be bound to an editor stored in an edit repository.  To do this, use the RepositoryItem property.


Resource Strings

Strings displayed in various message boxes, dialogs and control elements of Developer Express VCL products are stored as resources.

Each time a control needs a resource string for display, it calls the cxGetResourceString function.  To replace default resource strings, use the cxSetResourceString procedure.

Resource strings for Developer Express VCL products are declared in separate unit files.  Use the links below for information on resource strings available for specific products, and resource string identifiers:

ExpressBars

ExpressSideBar

ExpressEditors

Example

The following code substitutes the Clear button's caption with its German equivalent for all TdxBarDateCombo controls in the application.  The resource string is identified by dxSBAR_DATECLEAR.

//Delphi

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

//C++ Builder

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


ExpressBars: Resource Strings

See Also

This section describes resource strings used by ExpressBars.  See Resource Strings for general information.

The resource strings used by ExpressBars are declared in the dxBarStrs unit.

Ribbon context menu resource strings

Resource identifier	Value	Description
dxSBAR_SHOWBELOWRIBBON	'&Show Quick Access Toolbar Below the Ribbon'	The caption of the menu item that is used to position the Quick Access Toolbar at the Ribbon's bottom.
dxSBAR_SHOWABOVERIBBON	'&Show Quick Access Toolbar Above the Ribbon'	The caption of the menu item that is used to position the Quick Access Toolbar at the Ribbon's top.
dxSBAR_MINIMIZERIBBON	'Mi&nimize the Ribbon'	The caption of the menu item that is used to minimize the Ribbon.
dxSBAR_MORECOMMANDS	'&More Commands...'	The caption of the menu item that is used to invoke the Customization Form.
dxSBAR_ADDTOQAT	'&Add to Quick Access Toolbar'	The caption of the menu item that is used to add the selected bar item to the Quick Access Toolbar.
dxSBAR_ADDTOQATITEMNAME	'&Add %s to Quick Access Toolbar'	The caption of the menu item that is used to add the selected bar item to the Quick Access Toolbar.  The bar item’s name is passed as a parameter to the message text.
dxSBAR_REMOVEFROMQAT	'&Remove from Quick Access Toolbar'	The caption of the menu item that is used to remove the selected bar item from the Quick Access Toolbar.
dxSBAR_CUSTOMIZEQAT	'Customize Quick Access Toolbar'	The menu item list header.

Customization Form resource strings

Resource identifier	Value	Description
dxSBAR_CAPTION	'Customize'	The Customization Form's caption.
dxSBAR_CLOSE	'Close'	The Close button's caption.
dxSBAR_WANTTODELETETOOLBAR	'Are you sure you want to delete the ''%s'' toolbar?'	The confirmation message that is displayed when: • an end-user clicks the Delete button within the Options page; • a bar manager’s DeleteToolbar method is called.
dxSBAR_WANTTORESETTOOLBAR	'Are you sure you want to reset the changes made to the ''%s'' toolbar?'	The confirmation message that is displayed when: • an end-user clicks the Reset  button within the Toolbars page; • a bar manager’s ResetToolBar method is called.
dxSBAR_WANTTORESETUSAGEDATA	'This will delete the record of the commands you''ve used in this application and restore the default set of visible commands to the menus and toolbars. It will not undo any explicit customizations.   Are you sure you want to proceed?'	The confirmation message that is displayed when: • an end-user clicks the Reset my usage data button within the Toolbars page; • a bar’s ResetWithConfirmation method is called.

Customization Form - Commands page

#	Resource identifier	Value
1	dxSBAR_TABSHEET2	' Commands '
2	dxSBAR_COMMANDS	'Comman&ds:'
3	dxSBAR_CATEGORIES	'Cate&gories:'
4	dxSBAR_DESCRIPTION	'Description  '

Customization Form - Options page

#	Resource identifier	Value
1	dxSBAR_TABSHEET3	' Options '
2	dxSBAR_PERSMENUSANDTOOLBARS	'Personalized Menus and Toolbars  '
3	dxSBAR_MENUSSHOWRECENTITEMS	'Me&nus show recently used commands first'
4	dxSBAR_SHOWFULLMENUSAFTERDELAY	'Show f&ull menus after a short delay'
5	dxSBAR_RESETUSAGEDATA	'&Reset my usage data'
6	dxSBAR_OTHEROPTIONS	'Other  '
7	dxSBAR_LARGEICONS	'&Large icons'
8	dxSBAR_HINTOPT1	'Show Tool&Tips on toolbars'
9	dxSBAR_HINTOPT2	'Show s&hortcut keys in ToolTips'
10	dxSBAR_MENUANIMATIONS	'&Menu animations:'
11	dxSBAR_MENUANIM1	'(None)'
12	dxSBAR_MENUANIM2	'Random'
13	dxSBAR_MENUANIM3	'Unfold'
14	dxSBAR_MENUANIM4	'Slide'
15	dxSBAR_MENUANIM5	'Fade'

Customization Form - Toolbars page

#	Resource identifier	Value
1	dxSBAR_TABSHEET1	' Toolbars '
2	dxSBAR_TOOLBARS	'Toolb&ars:'
3	dxSBAR_TNEW	'&New...'
4	dxSBAR_TRENAME	'R&ename...'
5	dxSBAR_TRESET	'&Reset...'
6	dxSBAR_TDELETE	'&Delete'

Customizing popup menu resource strings

#	Resource identifier	Value
1	dxSBAR_CP_RESET	'&Reset'
2	dxSBAR_CP_DELETE	'&Delete'
3	dxSBAR_CP_NAME	'&Name:'
4	dxSBAR_CP_DEFAULTSTYLE	'Defa&ult style'
5	dxSBAR_CP_TEXTONLYALWAYS	'&Text Only (Always)'
6	dxSBAR_CP_TEXTONLYINMENUS	'Text &Only (in Menus)'
7	dxSBAR_CP_IMAGEANDTEXT	'Image &and Text'
8	dxSBAR_CP_BEGINAGROUP	'Begin a &Group'
Resource identifier	Value	Description
dxSBAR_COMMANDNAMECANNOTBEBLANK	'A command name cannot be blank. Please enter a name.'	The error message that appears when an empty string is entered as a command name.

Quick Customization popup menu resource strings

#	Resource identifier	Value
1	dxSBAR_ADDREMOVEBUTTONS	'&Add or Remove Buttons'
2	dxSBAR_RESETTOOLBAR	'&Reset Toolbar'
3	dxSBAR_CUSTOMIZE	'&Customize...'

Unsorted resource strings

Resource identifier	Value	Description
dxSBAR_OK dxSBAR_CANCEL	'OK' 'Cancel'	The captions of the OK and Cancel buttons within the dialog window that appears when a toolbar is about to be created or renamed.
dxSBAR_CANTFINDBARMANAGERFO RSTATUSBAR	'A bar manager cannot be found for the status bar'	The error message that appears when no bar manager is associated with toolbars embedded into a Toolbar Panel.
dxSBAR_CANTMERGEBARMANAGER	'You cannot merge with the specified bar manager.'	The error message that appears when it’s impossible to merge bar managers.
dxSBAR_CANTMERGETOOLBAR	'You cannot merge with the specified toolbar.'	The error message that appears when it’s impossible to merge toolbars.
dxSBAR_CANTMERGEWITHMERGED TOOLBAR	'You cannot merge a toolbar with a toolbar that is already merged.'	The error message that appears when one of the toolbars being merged has already been merged with a toolbar.
dxSBAR_CANTUNMERGETOOLBAR	'You cannot unmerge the specified toolbar.'	The error message that appears when it’s impossible to split toolbars.
dxSBAR_CLEARGALLERYFILTER	'Clear filter'	The caption of the gallery filter menu item that is used to clear the currently active filter.
dxSBAR_COLORAUTOTEXT	'(automatic)'	The default text that is displayed for the automatic color item within a TdxBarColorCombo.
dxSBAR_COLORCUSTOMTEXT	'(custom)'	The default text that is displayed for the custom color item within a TdxBarColorCombo.
dxSBAR_CUSTOMIZE	'&Customize...'	The caption of an item within a toolbar context menu.  End-users can click this menu item to invoke the Customization Form.
dxSBAR_CXEDITVALUEDIALOGCAPTI ON	'Enter value'	The caption of the Enter value dialog window.  See the Using Enter Value Dialog topic for details on how to invoke this dialog.
dxSBAR_DATECLEAR	'Clear'	The caption of the Clear button within TdxBarDateCombo date editors.
dxSBAR_DATEDIALOGCAPTION	'Select the date'	The caption of the dialog window that displays a TdxBarDateCombo item's calendar.  This window is invoked when clicking the toolbar button representing the date editor item within a vertical toolbar.
dxSBAR_DATETODAY	'Today'	The caption of the Today button within TdxBarDateCombo item's calendar.
dxSBAR_DEFAULTCATEGORYNAME	'Default'	The default category's name.
dxSBAR_DIALOGOK dxSBAR_DIALOGCANCEL	'OK' 'Cancel'	The captions of the OK and Cancel buttons within popup bar item value editors. These editors are displayed instead of dropdown windows when the following item types are displayed on vertically oriented toolbars. • TdxBarDateCombo; • TdxBarTreeViewCombo; • TdxBarImageCombo; • any editor associated with the TcxBarEditItem.
dxSBAR_DRAGTOMAKEMENUFLOAT	'Drag to make this menu float'	The detachable bar hint.
dxSBAR_EXPAND	'Expand (Ctrl-Down)'	The hint for expand buttons that are displayed within sub-menus when only the most recently used items are shown.
dxSBAR_GALLERYEMPTYFILTERCAP TION	'<empty>'	The gallery filter label’s text that is displayed when filtering is not applied.
dxSBAR_GDIPLUSNEEDED	'%s requires the Microsoft GDI+ library to be installed'	The error message that appears if the GDI+ library is not installed but referenced by a class.  The class name is passed as a parameter to the message text.
dxSBAR_HIDEALLGALLERYGROUPS	'Hide all groups'	The caption of the gallery filter menu item that is used to hide all gallery groups.
dxSBAR_IMAGEDIALOGCAPTION	'Select item'	The caption of the image list box dialog.  This dialog is invoked when clicking a toolbar item that represents an image combo within a vertical toolbar.
dxSBAR_LOOKUPDIALOGOK dxSBAR_LOOKUPDIALOGCANCEL dxSBAR_LOOKUPDIALOGCAPTION	'OK' 'Cancel' 'Select value'	The caption of the list box dialog and its OK and Cancel buttons. This dialog is invoked when clicking a toolbar item that represents a lookup combo within a vertical toolbar.
dxSBAR_MDIMINIMIZE dxSBAR_MDIRESTORE dxSBAR_MDICLOSE	'Minimize Window' 'Restore Window' 'Close Window'	The hints for the Minimize, Restore and Close buttons in an MDI child window’s title bar.
dxSBAR_MOREBUTTONS	'More Buttons'	The Quick Customization button's hint.
dxSBAR_ONEOFTOOLBARSALREAD YMERGED	'One of the toolbars of the specified bar manager is already merged.'	The error message that appears when merging bar managers if one of them contains a toolbar that has already been merged.
dxSBAR_ONEOFTOOLBARSHASMER GEDTOOLBARS	'One of the toolbars of the specified bar manager has merged toolbars.'	The error message that appears when a toolbar of the bar managers being merged is already merged with a toolbar. To merge bar managers, call the bar manager’s Merge method.
dxSBAR_RECURSIVEMENUS	'You cannot create recursive menus'	The error message that appears when attempting to create a recursive menu.
dxSBAR_RECURSIVESUBITEMS	'You cannot create recursive subitems'	The error message that appears when attempting to create a recursive subitem.
dxSBAR_SHOWALLGALLERYGROUP S	'Show all groups'	The caption of the gallery filter menu item that is used to show all gallery groups.
dxSBAR_TOOLBARADD dxSBAR_TOOLBARRENAME	'Add Toolbar' 'Rename Toolbar'	The captions of toolbar customization dialogs.  These dialogs are displayed when an end-user creates or renames a toolbar.
dxSBAR_TOOLBAREXISTS	'A toolbar named ''%s'' already exists. Type another name.'	The error message that appears when the name of the toolbar being created is not unique.
dxSBAR_TOOLBARHASMERGEDTOO LBARS	'The ''%s'' toolbar has merged toolbars.'	The error message that appears when a toolbar being merged already has merged toolbars.  The caption of a toolbar with merged toolbars is passed as a message text parameter.
dxSBAR_TOOLBARNAME	'&Toolbar name:'	The caption of the label corresponding to the toolbar name editor. The editor dialog is displayed when end-users rename or create toolbars.
dxSBAR_TOOLBARNEWNAME	'Custom '	A prefix used to construct names for newly created toolbars.  The name is formed by the prefix and an automatically incremented number.
dxSBAR_TOOLBARSALREADYMERG ED	'The ''%s'' toolbar is already merged with the ''%s'' toolbar.'	The error message that appears when the toolbars being merged have already been merged with each other.  Toolbar captions are passed as message text parameters.
dxSBAR_TOOLBARSARENOTMERGED	'The ''%s'' toolbar is not merged with the ''%s'' toolbar.'	The error message that appears if one of the toolbars being split hasn't been merged with another toolbar.  Toolbar captions are passed as message text parameters.
dxSBAR_TREEVIEWDIALOGCAPTION	'Select item'	The caption of the tree view editor dialog. This dialog is displayed when clicking the button that represents a tree view combo within a vertical toolbar.


Recently Used Items

See Also

Usually applications provide more features than end-users use in their everyday work.  Removing all the features that are momentarily unnecessary from menus is not an option, since on occasion, these rarely used features are required.  The ExpressBars Suite takes these points into consideration, and allows you to design menus using a functionality which dynamically controls the visibility of submenu items, dependent on their popularity.

Recently And Not Recently Used Items

Items within submenus can be divided into two groups: recently used and not recently used.  Recently used items are always displayed when submenus are opened.  Not recently used items are hidden when submenus are opened, as their visibility is controlled automatically, depending on the popularity of the items.  An item will be classified as recently used after an end-user has selected the item a number of times.

End-users can access items not recently used via the double down-arrow at the bottom of a menu.  They can hover over the arrow for a short time, or click it to immediately access these items.

The next image shows the same menu after the items not recently used are displayed.

Customizing Item Links

By default, all bar item links are recently used.  At design time you can uncheck the Most recently used option in an item link’s customizing popup menu to specify that this link is not recently used.

In code, this can be done by setting the item link’s MostRecentlyUsed property to False.

Customizing Options

You can control which item links are classified as not recently used via a bar manager’s MostRecentItemsPercents property.  This property allows you to indirectly determine the minimum number of clicks required to change item links’ classification, and make them visible.  If the item link's click count is less than this number, it will be hidden.  If this property's value is set to 100, all links will be classified as recently used, and visible.  The lower the value, the quicker links that haven’t been used recently will be hidden.

To prevent links not recently used from being hidden, set the bar manager’s MenusShowRecentItemsFirst property to False.  An end-user can also disable the most recently used items mechanism at runtime by unchecking the Menus show recently used commands first option within the Options page of the Customization Form.

The bar manager’s ShowFullMenusAfterDelay property specifies whether items not recently used should appear after a short delay, if the mouse pointer remains within the open submenu for a short time.  This feature is in effect only if the bar manager’s MenusShowRecentItemsFirst property is set to True.  To enable displaying not recently used items after a delay at runtime, an end-user can check the Show full menus after a short delay option within the Options page of the Customization Form.

To reset click counts for all the menus, classifying all items that can be accessed in menus (both recently used items and not recently used items) as recently used items and make them visible, call the bar manager’s ResetUsageData or ResetUsageDataWithConfirmation methods.  An end-user can do this by clicking the Reset my usage data within the Options page of the Customization Form.


Saving and Restoring Bar Layout

See Also

The bar layout contains settings for all toolbars and bar item links that determine their behavior, position, size, etc.  Once saved, a layout can be applied to any bar manager.  This allows you to customize a toolbar only once, and then apply its saved settings to other toolbars in different applications, thus restoring the original bar’s layout.

The ExpressBars Suite allows you to save and restore a bar layout automatically between application runs, and also provides a set of specially designed methods to do this manually at arbitrary points of an application.

Note:	Bar items within a bar manager and within a stored layout are identified by their names, accessible via their Name properties.  For bar items created at design time, the Name properties are initialized automatically.  For bar items created programmatically, you need to specify their Name properties manually, to allow the layout of the bars to be correctly saved and restored.  You can use the bar manager’s GetUniqueItemName method for this purpose.

Please refer to the following topics that describe in detail each of these options:

Saving and Restoring Bar Layout Automatically

Saving and Restoring Bar Layout Manually


Saving and Restoring Bar Layout Automatically

Saving and Restoring Bar Layout

The ExpressBars Suite allows you to automatically preserve the bar layout between application runs in an INI file, or the system registry.

Please refer to the Saving and Restoring Bar Layout Manually topic for information on how to save and restore bar layout manually.

A bar manager can automatically save a bar layout to an INI file, or the system registry when the form that contains the bar manager is being closed, and restore it when the form loads.  This functionality is disabled by default.  To activate it, you need to specify the destination storage device and location for the information being stored:

•	An INI file.  Set the bar manager’s StoreInIniFile property to True and designate the filename using the IniFileName property.  You can specify the full path to the filename in order to store the file to a specific location, other than the application’s starting folder.  You can also use paths relative to the application’s starting folder.

•	The system registry.  Set the bar manager’s StoreInRegistry property to True and designate the registry path using the RegistryPath property.  Values of this property are automatically formatted, and represent the registry keys relative to the HKEY_CURRENT_USER root key.

At design time you can click an ellipsis button within the Object Inspector to invoke the Developer Express Registry path property editor that allows you to create a new registry key, or select an existing registry key within the HKEY_CURRENT_USER\Software\ key.

The following code snippet demonstrates how to designate the registry as the storage device, and save a bar layout to the HKEY_CURRENT_USER\Software\Developer Express\Delphi registry key.

// Delphi

  dxBarManager1.StoreInRegistry := True;

  dxBarManager1.RegistryPath := 'Software\Developer Express\Delphi';

// C++ Builder

  dxBarManager1->StoreInRegistry = True;

  dxBarManager1->RegistryPath = "Software\Developer Express\Delphi";

Note:	When both an INI file and the registry are used to store and restore the bar layout, the information is stored/restored to/from the registry first, and then to/from the specified INI file.  In this instance, the settings from an INI file override the settings that have been acquired from the registry.

Important Note:	The automatic saving/loading of the bar layout is only possible if the bar manager belongs to a TForm or TFrame class instance.  Otherwise, you need to manually save/restore settings as described in the Saving and Restoring Bar Layout Manually topic.


Saving and Restoring Bar Layout Manually

Saving and Restoring Bar Layout

The bar layout can be automatically saved by a bar manager, or manually by a user.  The layout can only be automatically saved/restored if the bar manager belongs to a TForm or TFrame class instance.  Otherwise, the layout should be saved/loaded manually by a user.  This topic describes the ways you can accomplish this task.

Please refer to the Saving and Restoring Bar Layout Automatically topic, for information on how to save/restore the bar layout automatically.

How to Save the Bar Layout to the System Registry

The bar layout can be saved to the system registry by calling the bar manager's SaveToRegistry method.  You can then restore these settings using the bar manager's LoadFromRegistry method.  The values passed as parameters to these methods are treated as the registry keys, relative to the HKEY_CURRENT_USER root key.  For instance, specifying ‘Software\MyCompany\MyProject’ will result in saving the settings to the ‘HKEY_CURRENT_USER\Software\MyCompany\MyProject’ path.

The following sample code shows how the bar layout can be saved to the specified system registry path, and then restored.

// Delphi

var

  ARegKey: string;

begin

  ARegKey := 'Software\MyCompany\MyProject';

  dxBarManager1.SaveToRegistry(ARegKey);

...

  dxBarManager1.LoadFromRegistry(ARegKey);

end;

// C++ Builder

  String ARegKey = "Software\MyCompany\MyProject";

  dxBarManager1->SaveToRegistry(ARegKey);

...

  dxBarManager1->LoadFromRegistry(ARegKey);

How to Save the Bar Layout to a Stream

To save a bar layout to a stream (an instance of the TStream class or its descendant), call a bar manager's SaveToStream method.  You can then restore this information using the bar manager's LoadFromStream method.

The following code snippet shows how the bar layout can be saved to a memory stream, and then restored.

// Delphi

var

  AStream: TMemoryStream;

begin

  AStream := TMemoryStream.Create();

  try

    dxBarManager1.SaveToStream(AStream);

    ...

    AStream.Position := 0;

    dxBarManager1.LoadFromStream(AStream);

  finally

    AStream.Free;

  end;

end;

// C++ Builder

  TMemoryStream *AStream = new TMemoryStream();

  __try {

    dxBarManager1->SaveToStream(AStream);

    ...

    AStream->Position = 0;

    dxBarManager1->LoadFromStream(AStream);

  }

  __finally {

    AStream->Free();

  }

How to Save the Bar Layout to an INI File

To save a bar layout to an INI file, call a bar manager's SaveToIniFile method.  To restore these settings, call the bar manager's LoadFromIniFile method.  The filename is passed as the parameter to these methods.

The following code sample demonstrates how the bar layout can be saved to the specified file, and then restored from it.

// Delphi

var

  AFileName: string;

begin

  AFileName := 'barlayout.ini';

  dxBarManager1.SaveToIniFile(AFileName);

  ...

  dxBarManager1.LoadFromIniFile(AFileName);

end;

// C++ Builder

  String AFileName = "barlayout.ini";

  dxBarManager1->SaveToIniFile(AFileName);

...

  dxBarManager1->LoadFromIniFile(AFileName);


Category

See Also          Example1           Example2

The ExpressBars Suite allows you to organize bar items into logical groups, using ‘category’ and ‘item group’ metaphors.  A category is a collection of items and each item can belong to only one category.  Categories are designed only to provide organized access to bar items via the Customization Form.

Unlike item groups, categories can be displayed in the Customization Form at runtime.  Refer to the Customization Form - Commands Page topic to learn more.

You have the following options to control the general appearance of categories and their items within the Customization Form at runtime:

•	in code, via a bar manager’s CategoryVisible and CategoryItemsVisible indexed collections;

•	at design time, using the popup menus that appear when clicking the "…modify" buttons in the Commands Page in the Customization Form.  Refer to the Customization Form - Category Modify and Customization Form - Item Modify topics for more information on these popup menus.

You can create any number of categories using a bar manager’s Categories zero-based indexed collection.  Each category in this collection is represented by a string that indicates the category’s name.  At design time, this collection provides a standard editor to manage its contents.

When a bar manager is created, it already contains a category with the name specified by the dxSBAR_DEFAULTCATEGORYNAME resource string.  This category is called the default category.  When the last category is programmatically removed from a bar manager’s Categories collection, the default category is recreated automatically.

To assign a category to a bar item, use the item’s Category property.

To retrieve bar items based upon their category, visible state, and position within a category, use a bar manager’s GetAllItemsByCategory, GetItemsByCategory, and GetItemByCategory methods.


Item Group

See Also

The ExpressBars Suite allows you to organize bar items into logical groups using ‘category’ and ‘item group’ metaphors.  Item groups are designed to simultaneously manage the visibility and accessibility of their items.  An item group can contain both bar items and other item groups.  Each bar item or group can belong to only one item group.

At design time, you can manage a bar manager’s collection of item groups using the Customization Form.

Unlike categories, item groups cannot be displayed in the Customization Form at runtime.  Refer to the Customization Form - Groups Page topic, to learn more.

To create an item group in code, call a bar manager’s CreateGroup function.  You can access all the created item groups via a bar manager’s Groups zero-based indexed collection.  Each item group is represented by an instance of the TdxBarGroup class, which provides methods to manage its contents.


dxRibbon Unit Overview
dxRibbon Unit

Components

TdxBarApplicationMenu

TdxRibbon

TdxRibbonPopupMenu

Classes

TdxCustomRibbon

TdxRibbonApplicationButton

TdxRibbonFonts

TdxRibbonQuickAccessToolbar

TdxRibbonTab

TdxRibbonTabCollection

TdxRibbonTabGroup

TdxRibbonTabGroups

Other Types

TdxQuickAccessToolbarPosition

TdxRibbonAssignedFonts

TdxRibbonPopupMenuItems


TdxCustomRibbon
TdxCustomRibbon Object

Hierarchy          Properties          Methods          Events          See Also

The TdxCustomRibbon class is the base class for classes implementing different types of the Ribbon.

Unit

dxRibbon

TdxCustomRibbon = class(TcxControl, IdxSkin, IdxRibbonFormNonClientPainter, IdxFormKeyPreviewListener)

Description

The Ribbon's major interface elements include:

•	Tab pages – assemble groups of logically related commands (features). The Ribbon can contain any number of tab pages.

•	The Ribbon Application Menu (see TdxBarApplicationMenu) – provides commands common to the entire application.

•	The Quick Access Toolbar (see TdxRibbonQuickAccessToolbar) – provides access to frequently used commands.

The TdxCustomRibbon class implements the common functionality of the Ribbon control.


TdxCustomRibbon Hierarchy
Hierarchy

TcxControl

     |

TdxCustomRibbon


Properties for TdxCustomRibbon
TdxCustomRibbon Properties

TdxCustomRibbon          Legend

In TdxCustomRibbon

ActiveTab

ApplicationButton

BarManager

ColorScheme

ColorSchemeHandlers

ColorSchemeName

DocumentName

Fonts

HelpButtonScreenTip

Hidden

PopupMenuItems

QuickAccessToolbar

ShowTabGroups

ShowTabHeaders

SupportNonClientDrawing

TabCount

Tabs

VisibleTabCount

VisibleTabs


Methods for TdxCustomRibbon
TdxCustomRibbon Methods

TdxCustomRibbon          Legend

In TdxCustomRibbon

ApplicationMenuPopup

BeginUpdate

CheckHide

EndUpdate

GetTabAtPos

ShowTabGroupsPopupWindow


Events for TdxCustomRibbon
TdxCustomRibbon Events

TdxCustomRibbon          Legend

In TdxCustomRibbon

OnApplicationMenuClick

OnHelpButtonClick

OnHideMinimizedByClick

OnMoreCommandsExecute

OnTabChanged

OnTabChanging

OnTabGroupCollapsed

OnTabGroupExpanded


TdxCustomRibbon.ActiveTab

TdxCustomRibbon          See Also

Represents the currently selected Ribbon tab.

property ActiveTab: TdxRibbonTab;

Description

End-users can access one tabbed page at a time via the corresponding Ribbon tab.

Use the ActiveTab property to programmatically select the required page.


TdxCustomRibbon.ApplicationButton

TdxCustomRibbon

Represents the Ribbon Application Button.

property ApplicationButton: TdxRibbonApplicationButton;

Description

The Ribbon Application Button provides access to the Ribbon Application Menu.

The Ribbon Application Button is only displayed in the Ribbon Form.


TdxCustomRibbon.BarManager

TdxCustomRibbon          See Also

Specifies the bar manager.

property BarManager: TdxBarManager;

Description

The bar manager allows you to allocate specific toolbars and items in the Ribbon.


TdxCustomRibbon.ColorScheme

TdxCustomRibbon          See Also

Represents the Ribbon skin.

property ColorScheme: TdxCustomRibbonSkin;

Description

The Ribbon control provides three built-in skins that can be used in an application:

Name	Class
Black	TdxBlackRibbonSkin
Blue	TdxBlueRibbonSkin
Silver	TdxSilverRibbonSkin

Note: as an alternative, you can use the Ribbon’s ColorSchemeName property to load a skin by its name.


TdxCustomRibbon.ColorSchemeHandlers

TdxCustomRibbon

Represents a list of registered event handlers that update paint styles of associated controls when the Ribbon changes its color scheme.

property ColorSchemeHandlers: TdxEventHandlerCollection;

Description

In this context, the Ribbon is an event source and TdxEventHandlerCollection stores event handlers that will synchronize paint styles of outer controls with the Ribbon.

ReadOnly Property


TdxCustomRibbon.ColorSchemeName

TdxCustomRibbon

Specifies the Ribbon skin by its name.

property ColorSchemeName: string;

Description

Use the ColorSchemeName property to specify one of three built-in Ribbon skins by its name (see the list of available skins in the Ribbon’s ColorScheme property topic).

The following example demonstrates how to load the Black skin pattern:

// Delphi

// ...

Ribbon.ColorSchemeName := 'Black';

// C++ Builder

// ...

Ribbon->ColorSchemeName = "Black";

Note: as an alternative, you can use the Ribbon’s ColorScheme property to specify a skin.


TdxCustomRibbon.DocumentName

TdxCustomRibbon          See Also

Specifies the display name of the currently active document.

property DocumentName: TCaption;

Description

The application title bar displays the specified name, followed by the application name. These names are visually divided by a dash ( – ).

Note: the document name and the dash are only drawn in the title bar if the Ribbon’s SupportNonClientDrawing property is set to True.


TdxCustomRibbon.Fonts

TdxCustomRibbon

Represents font options for Ribbon elements.

property Fonts: TdxRibbonFonts;

Description

The Fonts property allows you to specify font options for the following elements:

•	The application name shown in the title bar of the application window (see the DocumentNameColor property)

•	Ribbon tab captions (see the TabHeader property)

•	Captions of Ribbon bar items and items of the Ribbon Quick Access Toolbar’s context menu (see the Group property)

•	Ribbon tab group captions (see the GroupHeader property)

To apply the specified settings to these elements, the TdxRibbonFonts class provides a toggle – the AssignedFonts property. You simply need to activate flags on this property for corresponding Ribbon elements.


TdxCustomRibbon.HelpButtonScreenTip

TdxCustomRibbon

Specifies a ScreenTip for the Help button.

property HelpButtonScreenTip: TdxBarScreenTip;

Description

The Help button is only displayed, if the OnHelpButtonClick event handler is implemented.


TdxCustomRibbon.Hidden

TdxCustomRibbon          See Also

Gets whether the Ribbon is hidden.

property Hidden: Boolean;

Description

The Ribbon is not displayed if the application window is less than 300 pixels wide and 250 pixels tall.

The Hidden property returns False if the Ribbon is currently shown in the application window.  Otherwise – True.

ReadOnly Property


TdxCustomRibbon.PopupMenuItems

TdxCustomRibbon          See Also

Specifies menu item groups to be shown in the Ribbon context menu.

type

  TdxRibbonPopupMenuItem = (rpmiItems, rpmiMoreCommands, rpmiQATPosition, rpmiQATAddRemoveItem, rpmiMinimizeRibbon);

  TdxRibbonPopupMenuItems = set of TdxRibbonPopupMenuItem;

property PopupMenuItems: TdxRibbonPopupMenuItems;

Description

The Ribbon context menu is divided into four logical groups:

•	Check box menu items that allow end-users to control the visibility of associated bar items in the bar (the rpmiItems flag);

•	The More Commands… menu item – allows end-users to invoke the Customization Form, enabling the Ribbon customization mode (the rpmiMoreCommands flag);

The Show Quick Access Toolbar Above the Ribbon (Show Quick Access Toolbar Below the Ribbon) menu item – allows end-users to position the Quick Access Toolbar at either the top or the bottom of the Ribbon (the rpmiQATPosition flag);

•	The Add to Quick Access Toolbar (Remove from Quick Access Toolbar) menu item – allows end-users to add (or remove) new bar items to the Quick Access Toolbar (the rpmiQATAddRemoveItem flag);

•	The Minimize the Ribbon menu item – allows end-users to hide the tab page panel in the view (the rpmiMinimizeRibbon flag).

Using the PopupMenuItems property, you can change the visibility of menu sections for different menu-enabled Ribbon elements.  Refer to the corresponding section in the ExpressBars: Resource Strings help topic to learn about the resource strings used as menu items in the Ribbon context menu.

The default value of the PopupMenuItems property is [rpmiItems,rpmiMoreCommands,rpmiQATPosition,rpmiQATAddRemoveItem,rpmiMinimizeRibbon].


TdxCustomRibbon.QuickAccessToolbar

TdxCustomRibbon          See Also

Represents the Ribbon Quick Access Toolbar.

property QuickAccessToolbar: TdxRibbonQuickAccessToolbar;

Description

The Ribbon Quick Access Toolbar provides end-users with quick access to the most frequently used bar items.

For detailed information, refer to the Ribbon Quick Access Toolbar topic.


TdxCustomRibbon.ShowTabGroups

TdxCustomRibbon          See Also

Specifies whether tabbed pages are shown in the Ribbon.

property ShowTabGroups: Boolean;

Description

Set the ShowTabGroups property to False to hide these pages.

The default value of the ShowTabGroups property is True.


TdxCustomRibbon.ShowTabHeaders

TdxCustomRibbon          See Also

Specifies whether tab headers are shown in the Ribbon.

property ShowTabHeaders: Boolean;

Description

Set the ShowTabHeaders property to False to hide tab headers.

Note: the Ribbon Application Button is not displayed, if tab headers are hidden.

The default value of the ShowTabHeaders property is True.


TdxCustomRibbon.SupportNonClientDrawing

TdxCustomRibbon          See Also

Specifies whether the form’s non-client area is painted using a Ribbon style.

property SupportNonClientDrawing: Boolean;

Description

The form is only painted using a Ribbon style, if it’s derived from TdxRibbonForm (dxRibbonForm.pas unit).  To learn more, see the Ribbon Form help topic.

Set the SupportNonClientDrawing property to True to render the non-client area using a Ribbon style.

The following image shows a form painted using a standard style (the SupportNonClientDrawing property is False) and a Ribbon style (the SupportNonClientDrawing property is True):

The default value of the SupportNonClientDrawing property is False.


TdxCustomRibbon.TabCount

TdxCustomRibbon          See Also

Gets a count of Ribbon tabs.

property TabCount: Integer;

Description

The TabCount property returns the total number of tabs that are a part of the Ribbon.

ReadOnly Property


TdxCustomRibbon.Tabs

TdxCustomRibbon          See Also

Represents a collection of Ribbon tabs.

property Tabs: TdxRibbonTabCollection;

Description

The Tabs collection contains tabs that are a part of the Ribbon.  It stores tabs that were created at both design and run-time.

At design-time, Ribbon tabs can be added or removed from the Ribbon using the tab context menu.  When coding, you can add a new tab at the end of the collection (see the Add method), or at a specified position (see the Insert method).

To obtain information on the total number of stored tabs, you can use the Ribbon’s TabCount property.  Indexed access to an individual tab can be obtained via the Items property.  It provides access to all Ribbon tabs regardless of whether tabs are currently visible in the control. To only obtain access to visible tabs, use the Ribbon’s VisibleTabs collection instead.


TdxCustomRibbon.VisibleTabCount

TdxCustomRibbon          See Also

Gets a count of Ribbon tabs that are visible in the Ribbon.

property VisibleTabCount: Integer;

Description

The VisibleTabCount property only calculates tabs whose Visible property is set to True.

ReadOnly Property


TdxCustomRibbon.VisibleTabs

TdxCustomRibbon          See Also

Provides indexed access to the visible Ribbon tab at the position specified by the zero-based Index parameter.

property VisibleTabs[Index:Integer]: TdxRibbonTab;

Description

Unlike Tabs, the VisibleTabs collection only contains tabs whose Visible property is set to True.

VisibleTabs returns nil if the collection is empty (when all Ribbon tabs are hidden in the view).

ReadOnly Property


TdxCustomRibbon.ApplicationMenuPopup

TdxCustomRibbon

Invokes the Ribbon Application Menu.

procedure ApplicationMenuPopup;

Description

This method contains the Ribbon’s OnApplicationMenuClick event that allows you to customize the Ribbon Application Menu before it’s displayed on-screen.


TdxCustomRibbon.BeginUpdate

TdxCustomRibbon          See Also

Prevents the Ribbon from redrawing until the EndUpdate method is called.

procedure BeginUpdate;

Description

To improve performance and prevent the Ribbon from flickering during bulk updates, enclose the code performing the updates within BeginUpdate/EndUpdate blocks.


TdxCustomRibbon.CheckHide

TdxCustomRibbon

Recalculates view data for the Ribbon child if it’s vertically resized.

procedure CheckHide;

Description

If implementing a form with the Ribbon control, developers must handle changes to the view when an end-user shrinks the application window vertically (for instance, in the form’s OnResize event handler).

Derive your form from TdxRibbonForm (see the Ribbon Form help topic) to delegate this responsibility to the Ribbon Form.  Call the CheckHide method whenever the Ribbon needs to be updated for repainting.


TdxCustomRibbon.EndUpdate

TdxCustomRibbon          See Also

Enables Ribbon redraw operations that were previously locked by the BeginUpdate method.

procedure EndUpdate;

Description

To improve performance and prevent the Ribbon from flickering during bulk updates, enclose the code performing the updates within BeginUpdate/EndUpdate blocks.


TdxCustomRibbon.GetTabAtPos

TdxCustomRibbon

Returns the Ribbon tab by its relative screen coordinates.

function GetTabAtPos(X, Y: Integer): TdxRibbonTab;

Description

The point’s position should be specified within the boundaries of the tab title’s rectangle.

If the specified coordinates are outside the rectangle’s boundaries, nil is returned.

X and Y specify relative screen coordinates of the tested point.


TdxCustomRibbon.ShowTabGroupsPopupWindow

TdxCustomRibbon

Renders a tab page as a drop-down window.

procedure ShowTabGroupsPopupWindow;

Description

By default, a tab page is drawn as a panel with a horizontal bar between the panel and the document area:

A tab page is not displayed, if an end-user double-clicks a tab header or the ShowTabGroups property is set to False.

When a tab page is hidden, call the ShowTabGroupsPopupWindow method to display this page as a drop-down window:


TdxCustomRibbon.OnApplicationMenuClick

TdxCustomRibbon          See Also

Fires when the Ribbon Application Menu is about to be displayed on-screen.

type

  TdxRibbonApplicationMenuClick = procedure(Sender: TdxCustomRibbon; var AHandled: Boolean) of object;

property OnApplicationMenuClick: TdxRibbonApplicationMenuClick;

Description

The Ribbon Application Menu appears when the Ribbon Application Button is clicked, or when the Ribbon’s ApplicationMenuPopup method is invoked.

Implement the OnApplicationMenuClick event handler to customize the menu before it appears.

Sender specifies the Ribbon control that owns the menu;

AHandled specifies which code handles the menu’s layout, and its initialization.  Set AHandled to True to delegate this operation to custom code.


TdxCustomRibbon.OnHelpButtonClick

TdxCustomRibbon          See Also

Fires after the Help button has been clicked.

type

  TdxRibbonEvent = procedure(Sender: TdxCustomRibbon) of object;

property OnHelpButtonClick: TdxRibbonEvent;

Description

If this event is handled, the Help button is displayed at the far right side of the Ribbon.

Note that this button is only displayed at run-time.

Implement the OnHelpButtonClick event handler to respond to the Help button click.


TdxCustomRibbon.OnHideMinimizedByClick

TdxCustomRibbon

Enables you to provide custom processing for mouse clicks that result in hiding a minimized Ribbon.

type

  TdxRibbonHideMinimizedByClickEvent = procedure(Sender: TdxCustomRibbon; AWnd: THandle; AShift: TShiftState; const APos: TPoint; var AAllowProcessing: Boolean) of object;

property OnHideMinimizedByClick: TdxRibbonHideMinimizedByClickEvent;

Description

A minimized Ribbon can be temporarily displayed by clicking any tab.  Then end-users can hide it again by simply clicking outside of it.  The OnHideMinimizedByClick event is raised immediately after such clicks.  It enables you to specify whether the target window processes the click or the click should only hide the Ribbon.

Pass False to the AAllowProcessing parameter to prohibit a mouse click from being processed by a window whose handle is passed as the AWnd parameter.

The AShift parameter determines the state of the Alt, Ctrl, and Shift keys and mouse button states.

The APos parameter identifies the point (in screen coordinates) being clicked.

The following code snippet represents the OnHideMinimizedByClick event handler of the RibbonNotepadDemo shipped with the ExpressBars Suite.  This event handler allows the editor’s text selection to be preserved when an end-user hides the minimized Ribbon by clicking the editor.

// Delphi

procedure TRibbonDemoMainForm.RibbonHideMinimizedByClick(

  Sender: TdxCustomRibbon; AWnd: Cardinal; AShift: TShiftState;

  const APos: TPoint; var AAllowProcessing: Boolean);

begin

  AAllowProcessing := AWnd <> Editor.Handle;

end;

// C++ Builder

void __fastcall TRibbonDemoMainForm::RibbonHideMinimizedByClick(

      TdxCustomRibbon *Sender, DWORD AWnd, TShiftState AShift,

      const TPoint &APos, bool &AAllowProcessing)

{

  AAllowProcessing = ((HWND *)AWnd != Editor->Handle);

}


TdxCustomRibbon.OnMoreCommandsExecute

TdxCustomRibbon

Fires after the More Commands… item in the Ribbon Quick Access Toolbar’s dropdown menu has been clicked.

type

  TdxRibbonEvent = procedure(Sender: TdxCustomRibbon) of object;

property OnMoreCommandsExecute: TdxRibbonEvent;

Description

Implement the OnMoreCommandsExecute event handler to respond to the item click.


TdxCustomRibbon.OnTabChanged

TdxCustomRibbon          See Also

Fires after an active Ribbon tab has been changed.

type

  TdxRibbonEvent = procedure(Sender: TdxCustomRibbon) of object;

property OnTabChanged: TdxRibbonEvent;

Description

This event fires when an inactive Ribbon tab is clicked, or when this tab is assigned to the Ribbon’s ActiveTab property.

Implement the OnTabChanged event handler to perform additional actions when the active tab is changed.


TdxCustomRibbon.OnTabChanging

TdxCustomRibbon          See Also

Fires when an active Ribbon tab is about to be changed.

type

  TdxRibbonTabChangingEvent = procedure(Sender: TdxCustomRibbon; ANewTab: TdxRibbonTab; var Allow: Boolean) of object;

property OnTabChanging: TdxRibbonTabChangingEvent;

Description

This event fires when an inactive Ribbon tab is clicked, or when this tab is assigned to the Ribbon’s ActiveTab property.

Implement the OnTabChanging event handler to perform additional actions (for example, to prevent the ANewTab from being selected) before the active tab is changed.

ANewTab specifies the tab that is to be made active;

Allow specifies whether the active tab can be changed.  Set Allow to True to select ANewTab.  Otherwise, the currently active tab will remain selected.


TdxCustomRibbon.OnTabGroupCollapsed

TdxCustomRibbon          See Also

Fires after the AGroup has been collapsed within the Ribbon tab passed as the ATab parameter.

type

  TdxRibbonTabGroupNotifyEvent = procedure(Sender: TdxCustomRibbon; ATab: TdxRibbonTab; AGroup: TdxRibbonTabGroup) of object;

property OnGroupCollapsed: TdxRibbonTabGroupNotifyEvent;

Description

Use the Ribbon tab group’s CanCollapse property to specify whether this tab group can be collapsed when the Ribbon control is horizontally resized.

When a tab group within a tab is expanded, the OnTabGroupExpanded event is raised.


TdxCustomRibbon.OnTabGroupExpanded

TdxCustomRibbon          See Also

Fires after the AGroup has been expanded within the Ribbon tab passed as the ATab parameter.

type

  TdxRibbonTabGroupNotifyEvent = procedure(Sender: TdxCustomRibbon; ATab: TdxRibbonTab; AGroup: TdxRibbonTabGroup) of object;

property OnGroupCollapsed: TdxRibbonTabGroupNotifyEvent;

Description

When a Ribbon tab group is collapsed, the OnTabGroupCollapsed event is raised.  Use the tab group’s CanCollapse property to specify whether this tab group can be collapsed when the Ribbon control is horizontally resized.


TdxRibbon
 TdxRibbon Object

Hierarchy          Properties          Methods          Events          See Also

The TdxRibbon class represents a Ribbon control.

Unit

dxRibbon

TdxRibbon = class(TdxCustomRibbon)

Description

The Ribbon's major interface elements include:

•	Tab pages – assemble groups of logically related commands (features). The Ribbon can contain any number of tab pages.

•	The Ribbon Application Menu (see TdxBarApplicationMenu) – provides commands common to the entire application.

•	The Quick Access Toolbar (see TdxRibbonQuickAccessToolbar) – provides access to the most frequently used commands.

The necessary functionality is provided by the TdxCustomRibbon class, which is the TdxRibbon’s parent.  TdxRibbon only publishes inherited events.


TdxRibbon Hierarchy
Hierarchy

TcxControl

     |

TdxCustomRibbon

     |

TdxRibbon


Properties for TdxRibbon
TdxRibbon Properties

TdxRibbon          Legend

Derived from TdxCustomRibbon

ActiveTab

ApplicationButton

BarManager

ColorScheme

ColorSchemeHandlers

ColorSchemeName

DocumentName

Fonts

HelpButtonScreenTip

Hidden

PopupMenuItems

QuickAccessToolbar

ShowTabGroups

ShowTabHeaders

SupportNonClientDrawing

TabCount

Tabs

VisibleTabCount

VisibleTabs


Methods for TdxRibbon
TdxRibbon Methods

TdxRibbon          Legend

Derived from TdxCustomRibbon

ApplicationMenuPopup

BeginUpdate

CheckHide

EndUpdate

GetTabAtPos

ShowTabGroupsPopupWindow


Events for TdxRibbon
TdxRibbon Events

TdxRibbon          Legend

Derived from TdxCustomRibbon

OnApplicationMenuClick

OnHelpButtonClick

OnHideMinimizedByClick

OnMoreCommandsExecute

OnTabChanged

OnTabChanging

OnTabGroupCollapsed

OnTabGroupExpanded


TdxRibbonApplicationButton
TdxRibbonApplicationButton Object

Hierarchy          Properties

Represents the Ribbon Application Button.

Unit

dxRibbon

TdxRibbonApplicationButton = class(TPersistent)

Description

The Ribbon Application Button is located in the upper-left corner of the application window.  It’s used as a spot for the Ribbon Application Menu (see TdxBarApplicationMenu).  This menu is specified via the Button’s Menu property.

The Ribbon Application Button can display an application logo.  To customize the logo, use the Button’s Glyph property.

You can control the visibility of the Ribbon Application Button using the Button’s Visible property.

Note: the Ribbon Application Button is only drawn in the Ribbon Form.

The TdxRibbonApplicationButton object is referenced by the Ribbon’s ApplicationButton property.


TdxRibbonApplicationButton Hierarchy
Hierarchy

TPersistent

     |

TdxRibbonApplicationButton


Properties for TdxRibbonApplicationButton
TdxRibbonApplicationButton Properties

TdxRibbonApplicationButton          Legend

In TdxRibbonApplicationButton

Glyph

KeyTip

Menu

ScreenTip

StretchGlyph

Visible


TdxRibbonApplicationButton.Glyph

TdxRibbonApplicationButton          See Also

Specifies the Ribbon Application Button’s glyph.

property Glyph: TBitmap;


TdxRibbonApplicationButton.KeyTip

TdxRibbonApplicationButton

Specifies a KeyTip for the Ribbon Application Menu.

property KeyTip: string;

Description

The ‘F’ KeyTip is displayed if this property is not assigned.


TdxRibbonApplicationButton.Menu

TdxRibbonApplicationButton

Represents the Ribbon Application Menu.

property Menu: TdxBarApplicationMenu;

Description

The Ribbon Application Menu is invoked via the Ribbon Application Button.  This menu is used to perform major actions on the entire application.


TdxRibbonApplicationButton.ScreenTip

TdxRibbonApplicationButton

References the ScreenTip associated with the Ribbon Application Button.

property ScreenTip: TdxBarScreenTip;

Description

The TdxBarScreenTip class implements an enhanced ScreenTip.  A ScreenTip window can contain three sections – header (see the Header property), description (see the Description property) and footer (see the Footer property).

Each section can display an explanatory image (see the section’s Glyph property), a descriptive text (see the section’s Text property) and a keyboard shortcut (see the bar item’s ShortCut property).

To customize the width of the ScreenTip’s window, use the ScreenTip’s Width property.

From the ScreenTip instance you can access other ScreenTips in the Ribbon via the ScreenTip’s Collection property.

Use the ScreenTip property to set an associated ScreenTip.


TdxRibbonApplicationButton.StretchGlyph

TdxRibbonApplicationButton          See Also

Specifies whether the Ribbon Application Button’s glyph is stretched (or compressed), if its size is smaller (or larger) than the 24x24 pixels bitmap.

property StretchGlyph: Boolean;

Description

The base size for the button’s glyph is 24x24 pixels.  If you provide a bitmap with other dimensions, set the StretchGlyph property to True to fit this bitmap into the button’s boundaries.

The scale is calculated based upon the Windows density of 96 dpi.

The default value of the StretchGlyph property is True.


TdxRibbonApplicationButton.Visible

TdxRibbonApplicationButton

Specifies whether the Ribbon Application Button is shown in the application window.

property Visible: Boolean;

Description

Set the Visible property to True to display the Ribbon Application Button.

The default value of the Visible property is True.


TdxRibbonFonts
TdxRibbonFonts Object

Hierarchy          Properties

Represents font options for Ribbon elements.

Unit

dxRibbon

TdxRibbonFonts = class(TPersistent)

Description

The Fonts property allows you to specify font options for the following elements:

•	Ribbon tab captions (see the TabHeader property)

•	Captions of Ribbon bar items and items of the Ribbon Quick Access Toolbar’s context menu (see the Group property)

•	Ribbon tab group captions (see the GroupHeader property)

Note that the font color of these elements is defined by the Ribbon paint style (see the Ribbon’s ColorSchemeName property).  The font color specified via the TFont.Color property is ignored.

To apply the specified settings to these elements, the TdxRibbonFonts class provides a toggle – the AssignedFonts property. You simply need to activate flags on this property for corresponding Ribbon elements.

The TdxRibbonFonts object is referenced by the Ribbon’s Fonts property.


TdxRibbonFonts Hierarchy
Hierarchy

TPersistent

     |

TdxRibbonFonts


Properties for TdxRibbonFonts
TdxRibbonFonts Properties

TdxRibbonFonts          Legend

In TdxRibbonFonts

AssignedFonts

DocumentNameColor

Group

GroupHeader

Ribbon

TabHeader


TdxRibbonFonts.AssignedFonts

TdxRibbonFonts

Activates font options for enumerated Ribbon elements.

type

  TdxRibbonAssignedFont = (afTabHeader, afGroup, afGroupHeader);

  TdxRibbonAssignedFonts = set of TdxRibbonAssignedFont;

property AssignedFonts: TdxRibbonAssignedFonts;

Description

With the AssignedFonts property, the specified font options can be applied to the following Ribbon elements:

•	The application name shown in the title bar of the application window (see the DocumentNameColor property)

•	Ribbon tab captions (see the TabHeader property)

•	Captions of Ribbon bar items and items of the Ribbon Quick Access Toolbar’s context menu (see the Group property)

•	Ribbon tab group captions (see the GroupHeader property)

Note: flags for the corresponding font options are automatically activated on the AssignedFonts property if these options were modified.

The default value of the AssignedFonts property is [].


TdxRibbonFonts.DocumentNameColor

TdxRibbonFonts

Specifies the document name’s font color.

property DocumentNameColor: TColor;

Description

The display name (specified by the Ribbon’s DocumentName property) of the currently active document is drawn in the application title bar after the application’s name and a dash mark.

Note: the document name and the dash mark are only displayed in the title bar if the Ribbon’s SupportNonClientDrawing property is set to True.

The default value of the DocumentNameColor property is clDefault.


TdxRibbonFonts.Group

TdxRibbonFonts          See Also

Represents font settings for captions of Ribbon bar items and items of the Ribbon Quick Access Toolbar’s context menu.

property Group: TFont;

Description

The specified font settings are only applied to corresponding Ribbon elements if the afGroup flag is active (see the AssignedFonts property).

Note: if the bar is a part of the Ribbon and the afGroup flag is active, font settings specified by the bar’s Font or by the bar manager’s Font properties are ignored.


TdxRibbonFonts.GroupHeader

TdxRibbonFonts          See Also

Represents font settings for a Ribbon tab group caption.

property GroupHeader: TFont;

Description

If a toolbar is docked into the Ribbon, its caption (see the toolbar’s Caption property) is displayed as the tab group’s title.

The specified font settings are only applied to bar captions if the afGroupHeader flag is active (see the AssignedFonts property).


TdxRibbonFonts.Ribbon

TdxRibbonFonts

Represents the Ribbon to which font settings are applied.

property Ribbon: TdxCustomRibbon;

ReadOnly Property


TdxRibbonFonts.TabHeader

TdxRibbonFonts          See Also

Represents font settings for Ribbon tab captions.

property TabHeader: TFont;

Description

The specified font settings are only applied to tabs if the afTabHeader flag is active (see the AssignedFonts property).


TdxRibbonPopupMenu
 TdxRibbonPopupMenu Object

Hierarchy          Properties          Methods          Events          See Also

Represents the Ribbon pop-up menu control.

Unit

dxRibbon

TdxRibbonPopupMenu = class(TdxBarPopupMenu)

Description

The Ribbon pop-up menu is designed to be used as a context menu (along with the built-in context menu) in Ribbon applications.  The TdxRibbonPopupMenu class provides a Ribbon property that allows you to bind it to the Ribbon.

Note: for complete Ribbon UI consistency, a custom background image, specified via the menu’s BackgroundBitmap property (or via the bar manager’s Backgrounds.SubMenu property), is suppressed and the menu is provided with a built-in background.


TdxRibbonPopupMenu Hierarchy
Hierarchy

TComponent

|

TdxBarComponent

|

TdxBarCustomPopupMenu

|

TdxBarPopupMenu

|

TdxRibbonPopupMenu


Properties for TdxRibbonPopupMenu
TdxRibbonPopupMenu Properties

TdxRibbonPopupMenu          Legend

In TdxRibbonPopupMenu

Ribbon

Derived from TdxBarCustomPopupMenu

BackgroundBitmap

BarManager

BarSize

Font

ItemLinks

ItemOptions

SubMenuControl

UseOwnFont

UseRecentItems

Derived from TdxBarComponent

BarManager

Enabled

Visible


Methods for TdxRibbonPopupMenu
TdxRibbonPopupMenu Methods

TdxRibbonPopupMenu          Legend

Derived from TdxBarCustomPopupMenu

Create

Destroy

Popup

PopupEx

PopupFromCursorPos


Events for TdxRibbonPopupMenu
TdxRibbonPopupMenu Events

TdxRibbonPopupMenu          Legend

Derived from TdxBarCustomPopupMenu

OnCloseUp

OnPaintBar

OnPopup


TdxRibbonPopupMenu.Ribbon

TdxRibbonPopupMenu

Represents the Ribbon that owns the pop-up menu.

property Ribbon: TdxCustomRibbon;

Description

Use the Ribbon property to bind the pop-up menu to the Ribbon.


TdxRibbonQuickAccessToolbar
TdxRibbonQuickAccessToolbar Object

Hierarchy          Properties          Methods          See Also

Represents the Ribbon Quick Access Toolbar.

Unit

dxRibbon

TdxRibbonQuickAccessToolbar = class(TPersistent)

Description

The Ribbon Quick Access Toolbar provides end-users with quick access to frequently used bar items.

For detailed information, refer to the Ribbon Quick Access Toolbar topic.

The TdxRibbonQuickAccessToolbar object is referenced by the Ribbon’s QuickAccessToolbar property


TdxRibbonQuickAccessToolbar Hierarchy
Hierarchy

TPersistent

     |

TdxRibbonQuickAccessToolbar


Properties for TdxRibbonQuickAccessToolbar
TdxRibbonQuickAccessToolbar Properties

TdxRibbonQuickAccessToolbar          Legend

In TdxRibbonQuickAccessToolbar

Position

Ribbon

Toolbar

Visible


Methods for TdxRibbonQuickAccessToolbar
TdxRibbonQuickAccessToolbar Methods

TdxRibbonQuickAccessToolbar          Legend

In TdxRibbonQuickAccessToolbar

HasGroupButtonForToolbar


TdxRibbonQuickAccessToolbar.Position

TdxRibbonQuickAccessToolbar          See Also

Specifies the Ribbon Quick Access Toolbar’s location.

property Position: TdxQuickAccessToolbarPosition;

Description

The Ribbon Quick Access Toolbar can be positioned either at the top or the bottom of the Ribbon.

When at the top, it appears next to the Ribbon Application Button.  If positioned at the bottom, it’s aligned to the left of the Ribbon.

The default value of the Position property is qtpAboveRibbon.


TdxRibbonQuickAccessToolbar.Ribbon

TdxRibbonQuickAccessToolbar

Represents the Ribbon that owns the Ribbon Quick Access Toolbar.

property Ribbon: TdxCustomRibbon;

Description

Use the Ribbon property to access the Ribbon instance.

ReadOnly Property


TdxRibbonQuickAccessToolbar.Toolbar

TdxRibbonQuickAccessToolbar

Represents the toolbar that a Ribbon Quick Access Toolbar contains.

property Toolbar: TdxBar;

Description

Use the ToolBar property to dock the required bar into the Ribbon Quick Access Toolbar.


TdxRibbonQuickAccessToolbar.Visible

TdxRibbonQuickAccessToolbar

Specifies whether the Ribbon Quick Access Toolbar is shown in the Ribbon.

property Visible: Boolean;

Description

Set the Visible property to True, to display the Ribbon Quick Access Toolbar.

The default value of the Visible property is True.


TdxRibbonQuickAccessToolbar.HasGroupButtonForToolbar

TdxRibbonQuickAccessToolbar

Checks whether AToolbar contains the Customize Button bar item.

function HasGroupButtonForToolbar(AToolbar: TdxBar): Boolean;

Description

The Ribbon Quick Access Toolbar is a container for a toolbar that is docked to it using the Toolbar property.

To invoke the Ribbon Quick Access Toolbar’s drop-down menu, the docked toolbar must contain the Customize Button bar item.

The HasGroupButtonForToolbar method returns True, if the specified bar contains an item of type TdxRibbonQuickAccessGroupButton; otherwise – False.


TdxRibbonTab
TdxRibbonTab Object

Hierarchy          Properties          Methods          See Also

Represents a Ribbon tab.

Unit

dxRibbon

TdxRibbonTab = class(TcxComponentCollectionItem, IdxBarSelectableItem, IdxFadingObject)

Description

The TdxRibbonTab class represents a tabbed page in the Ribbon.

A new Ribbon tab can be created both at design and runtime.  At design time, you can use the tab set’s context menu to create or delete a tab.  At runtime, a new tab can be added at the end of the tab set using the Ribbon’s Tabs.Add method, or at a specified position using the Ribbon’s Tabs.Insert method.

To obtain information on the total number of tabs in the Ribbon, you can use the Ribbon’s TabCount property.  Indexed access to an individual tab can be obtained via the Ribbon’s Tabs.Items property.  It provides access to all Ribbon tabs regardless of whether tabs are currently visible in the control.  To only obtain access to visible tabs, use the Ribbon’s VisibleTabs property instead.  A currently selected tab is represented by the Ribbon’s ActiveTab property.

The tabbed page can contain an arbitrary number of tab groups.  You can add (or delete) a group to the tabbed page at design time using the tab’s Groups property editor.  When coding, a new group can be added to the page using the tab’s Groups.Add method.  Access to an individual group is provided via the tab’s Groups.Items property.  Handle the Ribbon’s OnTabGroupCollapsed and OnTabGroupExpanded events to be notified every time the tab’s group is collapsed/expanded when the Ribbon control is resized.

To provide a custom tab group (a TdxRibbonTabGroup descendant) for a Ribbon tab, override the tab’s GetGroupClass function to return the desired descendant type.


TdxRibbonTab Hierarchy
Hierarchy

TcxComponentCollectionItem

     |

TdxRibbonTab


Properties for TdxRibbonTab
TdxRibbonTab Properties

TdxRibbonTab          Legend

In TdxRibbonTab

Active

Caption

Groups

KeyTip

Ribbon

Visible

VisibleIndex

Derived from TcxComponentCollectionItem

ID

Index


Methods for TdxRibbonTab
TdxRibbonTab Methods

TdxRibbonTab          Legend

In TdxRibbonTab

AddToolBar

GetGroupClass

MakeVisible

Derived from TcxComponentCollectionItem

AddToCollection

GetParentComponent

RemoveFromCollection


TdxRibbonTab.Active

TdxRibbonTab          See Also

Specifies whether the currently processed tab is active.

property Active: Boolean;

Description

Set the Active property to True to select the tab.  Otherwise, it will be inactive.

Note that if an invisible tab is activated, it automatically becomes visible (the tab’s Visible property is set to True).

The default value of the Active property is False.


TdxRibbonTab.Caption

TdxRibbonTab

Specifies the currently processed tab’s label.

property Caption: string;


TdxRibbonTab.Groups

TdxRibbonTab

Represents a collection of tab groups located in the currently processed tab.

property Groups: TdxRibbonTabGroups;

Description

Use the Groups property to add new tab groups to the tabbed page (see the tab’s Groups.Add method), or have random access to existing groups (see the tab’s Groups.Items property).

Override the tab’s GetGroupClass function to provide a custom tab group (a TdxRibbonTabGroup descendant) for the tab.


TdxRibbonTab.KeyTip

TdxRibbonTab

Specifies a KeyTip for the current tab.

property KeyTip: string;

Description


TdxRibbonTab.Ribbon

TdxRibbonTab

Represents the Ribbon that owns the currently processed tab.

property Ribbon: TdxCustomRibbon;

Description

Use the Ribbon property to access the Ribbon instance.


TdxRibbonTab.Visible

TdxRibbonTab          See Also

Specifies whether the currently processed tab is shown in the Ribbon.

property Visible: Boolean;

Description

Set the Visible property to True to display the tab.

Note that if an invisible tab is activated, it automatically becomes visible (see the tab’s Active property).

The default value of the Visible property is True.


TdxRibbonTab.VisibleIndex

TdxRibbonTab          See Also

Gets the currently processed tab’s position in the collection of visible tabs.

property VisibleIndex: Integer;

Description

The Ribbon’s VisibleTabs collection contains tabs that are currently shown in the Ribbon.

VisibleIndex returns –1 if the tab is hidden (the tab’s Visible property is set to False).

ReadOnly Property


TdxRibbonTab.AddToolBar

TdxRibbonTab

Adds AToolBar to the currently processed tab.

procedure AddToolBar(AToolBar: TdxBar);

Description

The AddToolBar method creates a new tab group (see the tab’s Groups.Add method), and places the specified bar into it.

AToolBar specifies the toolbar to be added to the tab.


TdxRibbonTab.GetGroupClass

TdxRibbonTab

Determines the class type of the tab groups accessible via the Groups property.

type

  TdxRibbonTabGroupClass = class of TdxRibbonTabGroup;

function GetGroupClass: TdxRibbonTabGroupClass; virtual;

Description

By default, this function returns TdxRibbonTabGroup.  Override this function to implement custom tab groups (TdxRibbonTabGroup descendants) for the tab.


TdxRibbonTab.MakeVisible

TdxRibbonTab

Scrolls the Ribbon tab set to bring the currently processed tab into view.

procedure MakeVisible;

Description

When a tab set contains a number of tabs that do not fit into it, navigation buttons appear to allow end-users to scroll through the tab set.

The MakeVisible method is designed to programmatically scroll the tab set to display the tab, if it’s beyond the set's boundaries.


TdxRibbonTabCollection
TdxRibbonTabCollection Object

Hierarchy          Properties          Methods

Represents a collection of Ribbon tabs.

Unit

dxRibbon

TdxRibbonTabCollection = class(TcxComponentCollection)

Description

The TdxRibbonTabCollection collection contains tabs that are a part of the Ribbon.  It stores tabs that were created both at design and runtime.

At design time, Ribbon tabs can be added or removed from the Ribbon using the tab set’s context menu.  When coding, you can add a new tab at the end of the collection (see the Add method), or at a specified position (see the Insert method).

To obtain information on the total number of stored tabs, you can use the Ribbon’s TabCount property.  Indexed access to an individual tab can be obtained via the Items property.  It provides access to all Ribbon tabs regardless of whether or not tabs are currently visible in the control.  To only obtain access to visible tabs, use the Ribbon’s VisibleTabs collection instead.

The TdxRibbonTabCollection object is referenced by the Ribbon’s Tabs property.


TdxRibbonTabCollection Hierarchy
Hierarchy

TcxComponentCollection

     |

TdxRibbonTabCollection


Properties for TdxRibbonTabCollection
TdxRibbonTabCollection Properties

TdxRibbonTabCollection          Legend

In TdxRibbonTabCollection

Items


Methods for TdxRibbonTabCollection
TdxRibbonTabCollection Methods

TdxRibbonTabCollection          Legend

In TdxRibbonTabCollection

Add

Insert


TdxRibbonTabCollection.Items

TdxRibbonTabCollection          See Also

Provides indexed access to the Ribbon tab at the position specified by the zero-based Index parameter.

property Items[Index:Integer]: TdxRibbonTab;

Description

Note that tab positions in the collection can be changed if the collection’s Insert method was invoked.  This method places the newly created tab at a specified position.


TdxRibbonTabCollection.Add

TdxRibbonTabCollection          See Also

Adds a new tab at the end of the tab collection.

function Add: TdxRibbonTab;

Description

Once added, the new tab automatically appears in the rightmost position in the Ribbon.

The Add method returns a reference to the newly created tab.


TdxRibbonTabCollection.Insert

TdxRibbonTabCollection          See Also

Inserts a new tab in the tab collection at the position specified by the zero-based Index parameter.

function Insert(AIndex: Integer): TdxRibbonTab;

Description

Once inserted, the new tab automatically appears in the specified position in the Ribbon.

The Insert method returns a reference to the newly created tab.


TdxRibbonTabGroup
TdxRibbonTabGroup Object

Hierarchy          Properties          See Also

Represents a tab group.

Unit

dxRibbon

TdxRibbonTabGroup = class(TCollectionItem, IdxBarSelectableItem)

Description

The purpose of the tab group is to assemble a set of related bar items into a separate group in the Ribbon.

It is the docking area for the bar whose items are to be placed into this group.  To do this, first place item controls into a bar and then dock this bar into the group using the group’s ToolBar property.

A new group can be added to a tab at both design and runtime.

At design time you can use the tab’s Groups property editor. When the new group is created, dock the prepared toolbar into it – select the newly created group in the editor, then go to the Object Inspector and enter (or select from the drop-down list) the bar’s name into the ToolBar property.

At runtime, add a new group to the page using the tab’s Groups.Add method, and dock a bar via the ToolBar property.  You can do the same in one step, by using the tab’s AddToolBar method.

A reference to an individual group instance can be obtained via the tab’s Groups.Items property.


TdxRibbonTabGroup Hierarchy
Hierarchy

TCollectionItem

     |

TdxRibbonTabGroup


Properties for TdxRibbonTabGroup
TdxRibbonTabGroup Properties

TdxRibbonTabGroup          Legend

In TdxRibbonTabGroup

CanCollapse

Tab

ToolBar


TdxRibbonTabGroup.CanCollapse

TdxRibbonTabGroup          See Also

Specifies whether the group can be collapsed into one bar item when the Ribbon is horizontally decreased.

property CanCollapse: Boolean;

Description

Designed with four different sizes for each group so as to effectively scale up or down when the Ribbon is horizontally resized.

State	Image
Large
Medium
Small
Collapsed

The smallest size represents the collapsed state of the group – when the group shrinks to its minimum width and only one item is shown.

Set the CanCollapse property to True to allow group collapse.  Otherwise, it will only decrease to a small state.

Note: specified states are supported by the Ribbon, if corresponding flags on the item’s ViewLevels property are active (ivlLargeIconWithText, ivlSmallIconWithText, ivlSmallIcon, respectively).

Handle the Ribbon control’s OnTabGroupCollapsed and OnTabGroupExpanded events to respond when a group is collapsed or expanded within a Ribbon tab.  Use a toolbar’s Glyph property to specify the icon to be displayed within a collapsed group.

The default value of the CanCollapse property is True.


TdxRibbonTabGroup.Tab

TdxRibbonTabGroup

Represents the tabbed page that owns the currently processed group.

property Tab: TdxRibbonTab;

Description

Use the Tab property to access the tab instance.

ReadOnly Property


TdxRibbonTabGroup.ToolBar

TdxRibbonTabGroup          See Also

Represents the toolbar that the currently processed group contains.

property ToolBar: TdxBar;

Description

Bar items are embedded into the group by means of a bar:

•	place the required item controls into a bar;

•	dock this bar into the group using the ToolBar property.


TdxRibbonTabGroups
TdxRibbonTabGroups Object

Hierarchy          Properties          Methods

Represents a collection of tab groups in the Ribbon tab.

Unit

dxRibbon

TdxRibbonTabGroups = class(TCollection)

Description

A tabbed page can contain any number of bar items.  To allow end-users to work with controls in an efficient way, related bar items can be organized into a set of separate groups.

The TdxRibbonTabGroups class is designed to manage a collection of these groups.  With this class you can:

•	Add a new group to the tab (see the Add method);

•	Access an individual group in the collection (see the Items property);

•	Obtain a reference to the tab that owns the collection (see the Tab property).

The TdxRibbonTabGroups object is referenced by the tab’s Groups property.


TdxRibbonTabGroups Hierarchy
Hierarchy

TCollection

     |

TdxRibbonTabGroups


Properties for TdxRibbonTabGroups
TdxRibbonTabGroups Properties

TdxRibbonTabGroups          Legend

In TdxRibbonTabGroups

Items

Tab


Methods for TdxRibbonTabGroups
TdxRibbonTabGroups Methods

TdxRibbonTabGroups          Legend

In TdxRibbonTabGroups

Add


TdxRibbonTabGroups.Items

TdxRibbonTabGroups          See Also

Provides indexed access to the tab group at the position specified by the zero-based Index parameter.

property Items[Index: Integer]: TdxRibbonTabGroup;

Description

Use the Items property to obtain a reference to the group by its index in the collection.


TdxRibbonTabGroups.Tab

TdxRibbonTabGroups

Represents the tabbed page that owns the currently processed collection of tab groups.

property Tab: TdxRibbonTab;

Description

Use the Tab property to access the tab instance.

ReadOnly Property


TdxRibbonTabGroups.Add

TdxRibbonTabGroups          See Also

Adds a new tab group at the end of the collection.

function Add: TdxRibbonTabGroup;

Description

Once added, the new group automatically appears in the rightmost position in the tabbed page (see the Tab property).

The Add method returns a reference to the newly created group.


TdxQuickAccessToolbarPosition
TdxQuickAccessToolbarPosition type

See Also

Enumerates available positions of the Ribbon Quick Access Toolbar.

Unit

dxRibbon

TdxQuickAccessToolbarPosition = (qtpAboveRibbon, qtpBelowRibbon);

Description

Values include:

Value	Meaning
qtpAboveRibbon	The Ribbon Quick Access Toolbar is located at the top of the Ribbon
qtpBelowRibbon	The Ribbon Quick Access Toolbar is located at the bottom of the Ribbon


TdxRibbonAssignedFonts
TdxRibbonAssignedFonts type

See Also

Enumerates Ribbon elements to which font options are to be applied.

Unit

dxRibbon

type

  TdxRibbonAssignedFont = (afTabHeader, afGroup, afGroupHeader);

TdxRibbonAssignedFonts = set of TdxRibbonAssignedFont;

Description

Values include:

Value	Meaning
afTabHeader	Ribbon tab captions
afGroup	Captions of Ribbon bar items and items of the Ribbon Quick Access Toolbar’s context menu.
afGroupHeader	Ribbon tab group captions


TdxRibbonPopupMenuItems
TdxRibbonPopupMenuItems type

See Also

Enumerates available groups of menu items to be shown in the Ribbon’s context menu.

Unit

dxRibbon

type

  TdxRibbonPopupMenuItem = (rpmiItems, rpmiMoreCommands, rpmiQATPosition, rpmiQATAddRemoveItem, rpmiMinimizeRibbon);

  TdxRibbonPopupMenuItems = set of TdxRibbonPopupMenuItem;

Description

Values include:

Value	Meaning
rpmiItems	A group of check box menu items that allow end-users to control the visibility of associated bar items in the bar.
rpmiMoreCommands	The More Commands… menu item that allows end-users to invoke the Customization Form thus enabling the Ribbon customization mode.
rpmiQATPosition	The Show Below the Ribbon (Show Above the Ribbon) menu item – allows end-users to move the bar to either the bottom or the top of the Ribbon.
rpmiQATAddRemoveItem	The Add to Quick Access Toolbar (Remove from Quick Access Toolbar) menu item – allows end-users to add (or remove) new bar items to the Quick Access Toolbar.
rpmiMinimizeRibbon	The Minimize the Ribbon menu item – allows end-users to hide the currently active tab page in the view.


dxRibbonStatusBar Unit Overview
dxRibbonStatusBar Unit

Components

TdxRibbonStatusBar

Classes

TdxStatusBarToolbarPanelStyle


TdxRibbonStatusBar
 TdxRibbonStatusBar Object

Hierarchy          Properties          Methods          Events          See Also

The TdxRibbonStatusBar class implements the Ribbon Status Bar.

Unit

dxRibbonStatusBar

TdxRibbonStatusBar = class(TdxCustomStatusBar)

Description

The Ribbon status bar is designed to support Ribbon UI.

The status bar’s Ribbon property allows you to link the Ribbon Status Bar to the Ribbon.

For more information on the Ribbon status bar see the Ribbon Status Bar topic.


TdxRibbonStatusBar Hierarchy
Hierarchy

TCustomControl

     |

TcxControl

     |

TdxCustomStatusBar

     |

TdxRibbonStatusBar


Properties for TdxRibbonStatusBar
TdxRibbonStatusBar Properties

TdxRibbonStatusBar          Legend

In TdxRibbonStatusBar

Ribbon

Derived from TdxCustomStatusBar

BorderWidth

Images

LookAndFeel

PaintStyle

Panels

SizeGrip

Derived from TControl

Anchors

BiDiMode

Color

Constraints

DragCursor

DragKind

DragMode

Enabled

Font

ParentBiDiMode

ParentFont

ParentShowHint

PopupMenu

ShowHint

Visible


Methods for TdxRibbonStatusBar
TdxRibbonStatusBar Methods

TdxRibbonStatusBar          Legend

Derived from TdxCustomStatusBar

ExecuteAction

GetPanelAt


Events for TdxRibbonStatusBar
TdxRibbonStatusBar Events

TdxRibbonStatusBar          Legend

Derived from TdxCustomStatusBar

OnHint

Derived from TControl

OnClick

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


TdxRibbonStatusBar.Ribbon

TdxRibbonStatusBar

Represents the Ribbon that owns the Ribbon Status Bar.

property Ribbon: TdxCustomRibbon;

Description

Use the Ribbon property to link the Ribbon Status Bar to the Ribbon.


TdxStatusBarToolbarPanelStyle
TdxStatusBarToolbarPanelStyle Object

Hierarchy          Properties          See Also

TdxStatusBarToolbarPanelStyle class represents a Toolbar Panel in a status bar.

Unit

dxRibbonStatusBar

TdxStatusBarToolbarPanelStyle = class(TdxStatusBarPanelStyle)

Description

A Toolbar Panel is a dock site for a toolbar.  By using the panel’s Toolbar property, you can embed any toolbar into this section of a status bar.  A toolbar can only be docked at one position.  You cannot use the same toolbar in two or more places simultaneously.

Note: this panel type is only designed for a Ribbon Status Bar (see TdxRibbonStatusBar).


TdxStatusBarToolbarPanelStyle Hierarchy
Hierarchy

TdxStatusBarPanelStyle

     |

TdxStatusBarToolbarPanelStyle


Properties for TdxStatusBarToolbarPanelStyle
TdxStatusBarToolbarPanelStyle Properties

TdxStatusBarToolbarPanelStyle          Legend

In TdxStatusBarToolbarPanelStyle

Toolbar


TdxStatusBarToolbarPanelStyle.Toolbar

TdxStatusBarToolbarPanelStyle          See Also

Represents a toolbar located in the currently processed Toolbar Panel.

property Toolbar: TdxBar;

Description

Use the Toolbar property to dock a toolbar into the Ribbon Status Bar’s Toolbar Panel (see the Status Bar panel’s PanelStyle property).

Only a single specified toolbar can be bound to a status bar.  You cannot place the same toolbar in two or more places simultaneously.


Accessing Ribbon UI and Bar Elements

See Also

New design-time improvements in the ExpressBars Suite simplify your interaction with different Ribbon UI and toolbar elements.

Unlike previous versions which required you to explore the subtree of the parent control in the Object TreeView, you can now directly select a specific element on a form or in the Customization Form, and examine or make changes to it by using the Object Inspector.

Here is a list of toolbar and Ribbon elements that have direct access capability:

•	Bar items

You can select a single bar item or multiple bar items (for a multiple selection, hold down the Shift key while you are clicking desired items) either in the initialized Customization Form or in a toolbar.

Note that you can press the Esc key to move focus from the currently selected item control or toolbar to its parent component.  For instance, press the Esc key to move focus to the parent toolbar/item control of a bar item that is currently selected.

You can also resize bar items directly in a form by dragging their sizing edges.

•	Toolbars that are the part of the Ribbon UI

You can select a toolbar docked to the tab group by clicking the group’s title.  Similar to multiple bar items selection, two or more toolbars can be selected simultaneously as well.

A toolbar placed into the Ribbon Quick Access Toolbar container is selected by clicking the Customize Button’s area.

•	Ribbon Tabs

Any currently visible tab can be selected on a form with a mouse click.

•	Ribbon Tab Groups

Each tab group is provided with a group selector – a rectangle with green diagonal stripes located in the group’s bottom-left corner.  If a group is focused, stripes are colored in red.

Once selected, each element (or shared resources if multiple elements have been selected) is automatically synchronized with the Object Inspector.


Best Practices

See Also

Guidelines provided with this topic help in answering some questions you will encounter when creating Ribbon elements.

•	To minimize tab switching, place frequently used commands in the first tab.

•	To facilitate tab navigation by end-users, the number of tabs should not be more than nine.

•	To facilitate browsing of tab groups by end-users, the number of groups should not be more than seven.

•	Don't use large tab groups – avoid tab groups that contain more than ten items.  It's better to arrange items into small, logical groups.

•	Provide small (16x16) and large (32x32) images for bar items – when the Ribbon is narrowed, large icons are automatically transformed into small icons so that bar items can be stacked vertically.  As a result, more items are shown in a small space.  One of the Ribbon areas – the Ribbon Quick Access Toolbar – can only display small icons.

•	Use button groups – in some instances it's better to use button groups (see the item link’s ButtonGroup property) instead of displaying individual bar items.  When you create button groups, avoid groups that contain more than five items.

•	Use bar item captions (along with large and small icons) where possible.

•	Since the Ribbon provides a flexible layout (it can be dynamically resized by end-users at runtime), create toolbar and bar item captions that are as short as possible.


Converting Bars to Ribbon

See Also

The difference between a legacy menu/toolbar system and Ribbon is that the latter eliminates the complexity of a multi-layered menu design.

Based on functionality, commands in the Ribbon are positioned into three main regions – Ribbon tabs, the Ribbon Quick Access Toolbar, and Ribbon Application Menu.

Below is a brief description of base Ribbon elements:

•	Each tab group contains commands limited by a specific task.

•	A number of tasks grouped by a common/meaningful task make up a tab page.

•	The Ribbon Quick Access Toolbar contains frequently used commands.

•	The Ribbon Application Menu (available via the Ribbon Application Button) is a place for application-level commands.

What a legacy system and the Ribbon control have in common is a toolbar that is used as a grouping unit for commands.  Toolbars contain most actions found in a Ribbon.  Including them as a base in the migration process facilitates the transition between the two UI metaphors.

With this in mind, the first step is to begin mapping entries of the traditional model to the Ribbon.  Having a mapping plan in hand, you can easily redesign toolbars, create new items and bind them to appropriate Ribbon sites (see the tab group’s ToolBar and the Ribbon Quick Access Toolbar’s Toolbar properties).

The How to Create a Ribbon Control at Design Time help topic provides detailed information on building a Ribbon.

Note:	When converting legacy MDI applications, inherit parent MDI forms from TdxRibbonForm to prevent potential painting problems.


How to Add a Dialog Launcher to the Ribbon Tab Group at Design-Time

See Also

The following example demonstrates how to add a dialog launcher button to the Ribbon tab group, at design-time.

Follow the steps below:

1)	If necessary, create a new Ribbon tab group. To learn how to create a Ribbon tab group, refer to the How to Create a Ribbon Control at Design-Time help topic.

2)	Click the Ribbon tab group’s title to select a toolbar associated with the group.

3)	In the Object Inspector, click the ellipsis button next to the bar’s CaptionButtons property to open the collection editor.

4)	Using the collection editor, create a dialog launcher button, and specify a KeyTip and ScreenTip for it (if necessary).

5)	Handle the button’s OnClick event to respond to the button click. In the following example, the event handler initializes the Font dialog:

// Delphi

// ...

begin

  FontDialog.Font.Assign(Editor.SelAttributes);

  if FontDialog.Execute then

    Editor.SelAttributes.Assign(FontDialog.Font);

end;

The following image shows the code execution result after the button has been clicked:


How to Add a Dialog Launcher to the Ribbon Tab Group in Code

See Also

The following example demonstrates how to add a dialog launcher button to the Ribbon tab group programmatically.

// Delphi

//...

type

  TRibbonDemoMainForm = class(TdxRibbonForm)

    BarManager: TdxBarManager;

    BarManagerBar5: TdxBar;

    dxBarScreenTipRepository1: TdxBarScreenTipRepository;

    procedure FontClick(Sender: TObject);

//...

var

  STBitmap: TBitmap;

//...

// ------------------------------------------------

// Provide implementation for the dialog launcher’s OnClick event

// ------------------------------------------------

procedure TRibbonDemoMainForm.FontClick(Sender: TObject);

begin

  FontDialog.Font.Assign(Editor.SelAttributes);

  if FontDialog.Execute then

    Editor.SelAttributes.Assign(FontDialog.Font);

end;

//...

// ------------------------------------------------

// Create a new ScreenTip for the dialog launcher button

// ------------------------------------------------

var

  stFontDialog: TdxBarScreenTip;

begin

  stFontDialog := dxBarScreenTipRepository1.Items.Add;

  with stFontDialog do

  begin

    Header.Text := 'Font Dialog';

    Description.Glyph := STBitmap;

    Description.Text := 'Show the Font dialog box';

  end;

end;

//...

// ------------------------------------------------

// Create a new dialog launcher button with required attributes

// ------------------------------------------------

with BarManagerBar5.CaptionButtons.Add do

begin

  KeyTip := 'FN';

  ScreenTip := stFontDialog;

  OnClick := FontClick;

end;

//...

initialization

  STBitmap := TBitmap.Create;

  STBitmap.LoadFromFile('FontDlgIcon.bmp');

end.

The following image shows the dialog launcher button’s KeyTip and ScreenTip:

The following image shows the button’s event handler execution result, after the button has been clicked:


How to Create an in-Ribbon Gallery at Design Time

See Also

To quickly build a new gallery inside a Ribbon, first right-click the tab group header and select the Add Group With Toolbar menu item to add a new tab group with an empty toolbar to the Ribbon, as shown in the following image:

Then, perform the following steps:

•	To place a gallery in the toolbar, right-click the toolbar and select Add Item, and then the TdxRibbonGalleryItem in the context menu.

•	In the Object Inspector, click the ellipsis button next to the gallery’s GalleryGroups property to create a gallery group.  Provide it with a header settings and appearance options, as required.

•	When a gallery group is selected, click the ellipsis button next to the group’s Items property to create gallery items that this group will contain.  Provide each gallery item with a caption, description and explanatory image.

•	Using a gallery’s OnGroupItemClick or a gallery item’s OnClick event, implement functionality common to all items or for each item individually.

Run the application to see the result.


How to Create a Ribbon Control at Design Time

See Also

The Ribbon is designed as a band located at the top of the application window.  It represents commands in a tabbed format.  Each tab combines commands by their common functionality.  Commands in a tab are visually separated into tab groups by tasks.

To organize commands around a task, a tab group is designed as a dock container for a toolbar containing related commands (bar items).

To build a new Ribbon in your application, you first need to create toolbars and bar items using the bar manager component.  To do this:

Drop the bar manager [image] component from the Component Palette’s ExpressBars page onto the form.

Use the Customization Form to create toolbars and bar items.  To invoke the Customization Form, double click the bar manager icon located on the form.  For information on how to create both bars and items, see the Customization Form topic.

Drop the Ribbon [image] control from the Component Palette’s ExpressBars page onto the form.  The Ribbon is automatically linked to the bar manager (see the Ribbon’s BarManager property).

By default, one tab is already available in the Ribbon.  To create additional tabs, select the Ribbon and, in the Object Inspector, click the ellipsis button next to the Ribbon’s Tabs property.  Alternatively, use the tab’s context menu.  To create a new tab with the menu, right click any Ribbon tab and select the Add Tab item.

Select the tab and name it as required (using the tab’s Caption property).  To create groups in the tab page, click the ellipsis button next to the tab’s Groups property.  Alternatively, use the tab’s context menu (the Add Empty Group or Add Group With Toolbar menu item).

Select the tab group and, in the Object Inspector, using the tab group’s ToolBar property, link the corresponding toolbar to the group.  When docked, the toolbar’s caption (see the bar’s Caption property) is automatically assigned to the tab group’s title.

Along with the Ribbon, the new UI offers two more areas, located at the top-left corner of the application window:

The Ribbon Application Button – provides access to the Ribbon Application Menu.  This menu is a place for application-level commands.  To make the Ribbon Application Button visible on-screen, provide it with an application logo (use the Ribbon’s ApplicationButton.Glyph property) and place the Ribbon Quick Access Toolbar above the Ribbon (set the Ribbon’s QuickAccessToolbar.Position property to qtpAboveRibbon).  Note that this button is only drawn in the Ribbon Form.  For detailed information on the Ribbon Application Menu creation, see the Ribbon Application Menu topic.

The Ribbon Quick Access Toolbar – is a spotlight for favorite commands always visible on-screen.  Like a tab group, the Ribbon Quick Access Toolbar is the dock container for a toolbar containing these commands.  To dock a toolbar to the Ribbon Quick Access Toolbar, use the Ribbon’s QuickAccessToolbar.Toolbar property.


How to Create a Ribbon Control in Code

See Also

This topic provides the basic information that you will need to create applications with a Ribbon UI from scratch.  The sample application (shown below) uses TdxBarManager and TcxImageList components.

TdxBarManager is a required component for building the Ribbon.  It allows you to develop toolbars that will be further used in the Ribbon.  TcxImageList component helps you prepare a set of preloaded images that can be easily accessed in code.  TdxBarManager [image] is located on the ExpressBars page, and TcxImageList [image] is on the Dev Express page of the Component Pallette.

Two TcxImageList components are used here – one for 16x16 sized bar item icons (for this example it has been named SmallImagesList), and another for 32x32 sized icons (for this example it has been named LargeImagesList).  The following image shows Image List Editors with loaded icons:

The Ribbon UI architecture provides the following elements:

•	Ribbon – has a three-level structure:

1.	tab – contains tab groups

2.	tab group – it is a place for related toolbar items (commands)

3.	toolbar item – represents a command

•	Ribbon Quick Access Toolbar – contains frequently used commands

•	Ribbon Application Button – provides access to the Ribbon Application Menu

•	Ribbon Application Menu – contains application-level commands

•	Ribbon Status Bar – supports Ribbon UI

•	Enhanced ScreenTip – contains element-associated information.

For simplicity, the example only shows three Ribbon elements: the Ribbon with a tab page containing one tab group, the Ribbon Quick Access Toolbar and the Ribbon Application Button.

The following image demonstrates code execution:

// Delphi

unit RibbonDemo;

interface

uses

  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,

  Forms, Dialogs, StdCtrls, cxClasses, dxRibbon, cxControls, dxBar,

  dxBarExtItems, ImgList, cxGraphics;

type

  TForm1 = class(TForm)

    SmallImagesList: TcxImageList;

    LargeImagesList: TcxImageList;

  end;

var

  Form1: TForm1;

  LogoBitmap: TBitmap;

implementation

{$R *.dfm}

// ...

var

  Ribbon: TdxRibbon;

  RibbonTab: TdxRibbonTab;

  BarManager: TdxBarManager;

  FileBar, QuickAccessBar: TdxBar;

  const FileBarItems: array[0..5] of string = ('&New', '&Open', '&Save', '&Print...', 'P&rint Preview...', 'E&xit');

  const QuickAccessBarItems: array[0..2] of string = ('Save &All', '&Undo', '&Repeat');

  procedure AddItems(ABar: TdxBar; ABarItems: array of string);

  var

    I: Integer;

  begin

    for I:= Low(ABarItems) to High(ABarItems) do

    begin

      with ABar.ItemLinks.Add do

      begin

        Item := TdxBarLargeButton.Create(Self);

        with Item as TdxBarLargeButton do

        begin

          Caption := ABarItems[I];

          if ABar = FileBar then

          begin

            LargeImageIndex := I;

            ImageIndex := I;

            // show visual dividers that split the "File" toolbar into three sections

            if (Caption = '&Print...') or (Caption = 'E&xit') then

              BeginGroup := True;

          end

          else

          begin

            LargeImageIndex := I+High(FileBarItems)+1;

            ImageIndex := I+High(FileBarItems)+1;

          end;

        end;

      end;

    end;

  end;

begin

  BarManager := TdxBarManager.Create(Self);

  // ---------------------------------------------------------------

  // create FileBar and QuickAccessBar toolbars with the bar manager

  // ---------------------------------------------------------------

  with BarManager do

  begin

    FileBar := AddToolBar;

    FileBar.Caption := 'File';

    // do not show the "File" toolbar until it’s docked to the Ribbon to prevent dirty regions rendering

    FileBar.Visible := False;

    QuickAccessBar := AddToolBar;

    // do not show the "QuickAccessBar" toolbar until it’s docked to the Ribbon, to prevent dirty regions rendering

    QuickAccessBar.Visible := False;

    // specify small and large icons for bar items

    ImageOptions.Images := SmallImagesList;

    ImageOptions.LargeImages := LargeImagesList;

  end;

  // create the "File" toolbar’s items

  AddItems(FileBar, FileBarItems);

  // create the "QuickAccessBar" toolbar’s items

  AddItems(QuickAccessBar, QuickAccessBarItems);

  // ------------------------------------------------

  // create Ribbon

  // ------------------------------------------------

  Ribbon := TdxRibbon.Create(Self);

  Ribbon.Parent := Self;

  // to prevent flickering, place statements into the BeginUpdate/EndUpdate block

  Ribbon.BeginUpdate;

  // specify the "blue" skin (the default skin is "black")

  Ribbon.ColorSchemeName := 'blue';

  RibbonTab := Ribbon.Tabs.Add;

  RibbonTab.Caption := 'Home';

  Ribbon.BarManager := BarManager;

  // specify the application logo

  Ribbon.ApplicationButton.Glyph := LogoBitmap;

  with Ribbon.QuickAccessToolbar do

  begin

    // place the Ribbon Quick Access Toolbar at the top of the window, in order to show the Ribbon Application Button

    Position := qtpAboveRibbon;

    // dock the "QuickAccessBar" toolbar to the Ribbon Quick Access Toolbar container

    Toolbar := QuickAccessBar;

    Toolbar.Visible := True;

  end;

  // create a tab group in the "Home" tab page and place the "File" toolbar there

  with RibbonTab.Groups.Add do

  begin

    Toolbar := FileBar;

    Toolbar.Visible := True;

  end;

  Ribbon.EndUpdate;

end;

// ...

initialization

  LogoBitmap := TBitmap.Create;

  LogoBitmap.LoadFromFile('LogoIcon.bmp');

finalization

  LogoBitmap.Free;

end.


In-Ribbon Gallery

See Also

An in-Ribbon gallery is a special type of a bar item used to display command options (gallery items) inside a Ribbon.  As a rule, each command is provided with an icon displaying the command’s result sample.

If all gallery items cannot fit the in-Ribbon gallery, the gallery shows only the first few items.  To allow end-users to access items that are beyond the gallery’s boundaries, the gallery is equipped with scroll buttons and a dropdown window, used to display an entire content with categorized gallery items (see gallery groups).

An in-Ribbon gallery is represented by a TdxRibbonGalleryItem object.  This object provides the following interface:

Member	Description
DropDownGallery	Specifies a dropdown gallery used to provide an in-Ribbon gallery with custom dropdown gallery content.
GalleryGroups	Provides access to gallery groups used to combine related gallery items into logical groups within a gallery.
GalleryOptions	Provides access to gallery appearance settings.
OnGroupItemClick	Provides logic common to all gallery items.


Ribbon Application Button

See Also

The Ribbon Application Button is an entry point for the Ribbon Application Menu.  This button is located at the top-left corner of the application window.

The Ribbon Application Button is represented by a TdxRibbonApplicationButton object available via the Ribbon’s ApplicationButton property.  This object provides the following properties:

Member	Description
Glyph	Allows you to provide your own application logo.
KeyTip	Specifies the button’s KeyTip.
Menu	Binds the Ribbon Application Menu to the button.
ScreenTip	Specifies the button’s ScreenTip.
Visible	Specifies the button's visibility.

Note: to enable the Ribbon Application Button, set a Ribbon control’s ShowTabHeaders property to True.  In standard forms, the Ribbon Application Button is displayed only if the Quick Access Toolbar is located at the top of the Ribbon control.


Ribbon Application Menu

See Also

The Ribbon Application Button located at the top-left corner of the application window provides access to the Ribbon Application Menu.  This menu contains the most common application commands.

Visually, the menu is divided into two panels:

•	The main menu (left panel).

•	The extra pane that contains a list of shortcuts, such as recently used files.

Main Menu Customization

To build a new menu, do the following:

1.	Make certain that the bar manager [image] component is on a form, and the required menu items are defined. For details, see the Customization Form topic.

2.	Drop the Ribbon Application Menu [image] control from the Component Palette’s ExpressBars page onto the form. The bar manager will be automatically linked to the menu’s BarManager property.

3.	In the Object Inspector, click the ellipsis button next to the menu’s ItemLinks property to invoke the Customization Form and the menu designer.  Drag menu items from the Customization Form into the menu designer.

4.	Select the Ribbon control and bind the newly created menu to the Ribbon Application Button via the Ribbon’s ApplicationButton.Menu property.

Extra Pane Customization

The list in the menu’s right panel is populated via the menu’s ExtraPane.Items property.  To inform end-users about this list's purpose, provide it with a header using the menu’s ExtraPane.Header property.

To respond to list item clicks, handle the menu’s ExtraPane.OnItemClick event.


Ribbon Control

See Also

The Ribbon combines commands in a tabbed format providing end-users with quick and easy access to them.  It has three hierarchy levels:

•	tab – combines tab groups with common functionality

•	tab group – contains related bar items

•	bar item – represents a command

The Ribbon control [image] is located on the Component Palette’s ExpressBars page.  When dropped onto the form, it’s automatically docked to the top of the form.

One of the Ribbon's key features is its flexible layout.  When the Ribbon is horizontally resized, it tries to keep its entire content visible on-screen.  To accomplish this, it re-arranges elements, collapses or expands tab groups and changes element representation style (from large images with caption to small images).  You can control these operations using the TdxRibbonTabGroup.CanCollapse and TdxBarItemLink.ViewLevels properties.

Paint Styles

Our Ribbon implementation supports the three paint styles available within Microsoft Office - Blue, Black and Silver.  Use the Ribbon’s ColorSchemeName (or ColorScheme) property to switch between these styles.  Traditional painting schemes (Standard, Flat, UltraFlat, Office 2003 and Windows XP theme) are not supported in the Ribbon.

Keyboard Access

The Ribbon provides quick keyboard access to its elements by means of KeyTips.

ScreenTips

The Ribbon allows you to display explanatory information on its elements via ScreenTips.

Galleries

Galleries allow you to display commands with a result-oriented interface.

Help Button

In order to display a Help button in the Ribbon and associate a Help dialog with it, handle the Ribbon’s OnHelpButtonClick event.  If this event is handled, the button is only displayed at run-time.


Ribbon Dropdown Gallery

See Also

A dropdown gallery control [image] is used to display gallery content in a popup window.  The purpose of this control is to invoke a gallery on any TWinControl control when developing Ribbon applications.  To do this, link a dropdown gallery to a TWinControl control using the bar manager’s PopupMenuLinks property.  It is also used to customize a dropdown gallery content for an in-Ribbon gallery (see the gallery’s DropdownGallery property).

According to the Microsoft® Office® 2007 UI guidelines requirement, content views of an in-Ribbon gallery and a dropdown gallery are different.  While an in-Ribbon gallery represents items in linear order, a dropdown gallery is capable of displaying commands (gallery items) separated into gallery groups.  In addition, dropdown galleries allow you to host filters to enable categorized access to gallery items.

A dropdown gallery is represented by a TdxRibbonDropDownGallery object.  This object provides the following interface:

Member	Description
GalleryItem	Specifies a gallery that provides content for a dropdown gallery.


Ribbon Form

See Also

TdxRibbon [image] and TdxRibbonStatusBar [image] controls are only a part of the window’s non-client area.

The Microsoft® Office® 2007 UI guidelines contain requirements that developers must follow when implementing different portions of the non-client area when using a Ribbon.  As such, you must develop numerous routines that paint the form’s elements with the visual appearance and dimensions specified by the license guidelines.

As you can imagine, the TdxRibbonForm class takes care of these requirements.  To benefit from this full-featured form:

•	Add dxRibbonForm.pas unit to your project

•	Derive your form from TdxRibbonForm

•	Drop TdxRibbon and TdxRibbonStatusBar (if needed) controls onto the form and configure them as required

•	Activate the Ribbon’s SupportNonClientDrawing toggle

The following image shows a form painted using a standard style (the Ribbon’s SupportNonClientDrawing property is False) and a Ribbon style (the Ribbon’s SupportNonClientDrawing property is True).

Note:	To prevent potential painting problems in MDI applications with Ribbon controls, inherit a parent MDI form from TdxRibbonForm.


Ribbon Galleries

See Also

The purpose of a gallery is to represent commands with a result-oriented interface, so end-users are informed about potential results prior to a particular command being invoked.

Structurally galleries are organized in the following manner – commands (gallery items) are visually separated into gallery groups.

Galleries come in two types:

•	An in-Ribbon gallery is designed to display its content inside the Ribbon.

•	A dropdown gallery is used to:

•	Provide an in-Ribbon gallery with a custom dropdown gallery content.

•	Provide any TWinControl descendant used in Ribbon applications with a dropdown gallery.

End-users can filter gallery contents by groups and categories via gallery filters.


Ribbon Gallery Groups

See Also

The purpose of gallery groups is to categorize related gallery items.  As the Microsoft® Office® 2007 UI guidelines require, gallery items are displayed across group panels only in a dropdown gallery.

A gallery group is represented by a TdxRibbonGalleryGroup object available via the gallery’s Groups property.  This object provides the following interface:

Member	Description
Header	Provides access to a gallery group header’s settings.
Items	Provides a collection of gallery items displayed within the gallery group.
Options	Provides appearance options for a gallery group.
Visible	Specifies a gallery group's visibility.


Ribbon Gallery Items

See Also

A gallery item represents a single command in a gallery.  Along with a caption and description, a gallery item is provided with an icon that displays the command execution sample.

A gallery provides default hints for items.  Hovering a mouse pointer over an item displays a hint window containing text specified by the gallery item’s Caption property.

A gallery item is represented by a TdxRibbonGalleryGroupItem object available via the gallery group’s Items property.  This object provides the following interface:

Member	Description
Caption	Specifies a gallery item’s caption.
Description	Specifies a descriptive text for the gallery item.
Glyph, ImageIndex	Specify an explanatory image for the gallery item.
Selected	Specifies whether a gallery item is selected.
OnClick	Provides functionality for a gallery item.


Ribbon Gallery Filters

See Also

Gallery filters allow end-users to filter dropdown galleries by:

•	Groups

•	Categories (a category can include more than one group)

End-users can click a gallery filter label displayed at the top of the expanded gallery to access available filter options.

Clicking a filter option refreshes the gallery to display only gallery items in the chosen group or category.

With our gallery filters implementation, you don’t need to manually create categories and assign groups to them.  Filter options are automatically created for each gallery group.

A gallery filter is represented by a TdxRibbonGalleryFilter object available via the gallery group’s GalleryFilter property.  This object provides the following interface:

Member	Description
ActiveCategoryIndex	Specifies the currently active category (filter option).
Caption	Specifies the gallery filter label’s text.
Categories	Provides access to available categories.  Use this property to manage the category list.
Visible	Specifies the filter label’s visibility.


Ribbon Quick Access Toolbar

See Also

The Quick Access Toolbar allows end-users to access frequently used commands regardless of the currently selected tab.

This toolbar is represented by a TdxRibbonQuickAccessToolbar object that can be accessed via the Ribbon's QuickAccessToolbar property.  Use this object's properties to customize the toolbar's position, visibility and content.

Customize Content at Design Time or Via Code

The Quick Access Toolbar is simply a container for a traditional toolbar. To supply content, you first need to create a toolbar and populate it with items.  Then, use the Ribbon’s QuickAccessToolbar.Toolbar property to embed this bar into the Quick Access Toolbar container.

You can also customize the Quick Access Toolbar's dropdown menu. For this purpose, use the Ribbon’s PopupMenuItems property.

End-User Customization

End-users can manually populate the Quick Access Toolbar with required commands using the Ribbon's context menu.  They can also use the dropdown menu to do the following:

•	temporarily hide unnecessary bar items

•	customize Quick Access Toolbar’s content via the Customization Form

•	specify the bar’s location - above or below the Ribbon

•	minimize the Ribbon


Ribbon Status Bar

See Also

The ExpressBars Suite v6 introduces a status bar control designed to support the Ribbon UI.

Our Ribbon Status Bar implementation is represented by a TdxRibbonStatusBar control, derived from TdxCustomStatusBar.  Along with the Ribbon, this control [image] is located on the Component Palette’s ExpressBars page.   When dropped onto the form, the Ribbon and the Ribbon Status Bar controls are automatically docked to the form’s top and bottom, respectively.

To enable proper Ribbon and Status Bar interaction, bind the Ribbon to the Status Bar's Ribbon property.  In this instance, the Status Bar will automatically obtain paint style settings from the bound Ribbon.  To learn more, see the Ribbon’s ColorScheme and ColorSchemeName properties.

You can split the Ribbon status bar into any number of sections, also called panels.  Each section can have its own style based upon the information it displays.  There are five pre-defined styles that can be specified by a status bar section’s PanelStyle property:

•	Toolbar Panel – allows you to embed a toolbar.  Each toolbar is a unique entry in a status bar.  You cannot place the same toolbar in a status bar two or more times;

•	Container Panel – allows you to embed any control;

•	Keyboard State Panel – indicates CAPS LOCK, NUM LOCK, SCROLL LOCK and INSERT key states.  In order to apply the Ribbon’s paint style to state messages, set the panel’s TdxStatusBarKeyStateAppearance.ActiveFontColor and TdxStatusBarKeyStateAppearance.InactiveFontColor properties to clDefault;

•	State Indicator Panel – allows you to display colored indicators to inform end-users about processes performed in the application;

•	Text Panel – allows you to display text messages.

To create and customize panels at design time, you can do one of the following:

•	Invoke the status bar's context menu and select ‘Panels Editor…’;

•	Press the ellipsis button corresponding to the Panels property.


Ribbon Tab

See Also

The Ribbon is comprised of tabs.  Each tab contains bar items that allow end-users to accomplish a common task.  To further categorize related bar items within a tab, items are organized into groups.

Tabs are represented by TdxRibbonTab objects that can be accessed via the Ribbon's Tabs property.  Our Ribbon implementation provides a comprehensive tab management API which is outlined below.

Aspect	Members	Description
Behavior	The Ribbon’s OnTabChanged and OnTabChanging events	Allows you to respond to tab selection.
KeyTip	The tab’s KeyTip property	Specifies the tab’s KeyTip.
Selection	The Ribbon’s ActiveTab or tab’s Active property	Allows you to activate a tab.
Tab Elements	The tab’s Groups property The tab’s AddToolBar method and group’s ToolBar property	Allows you to manage groups within this tab.
Tab Header	The tab’s Caption property	Specifies the tab header’s caption.
Visibility	The Ribbon’s ShowTabGroups and ShowTabHeaders properties The tab’s Visible property	Specify the visibility of tab pages, tab headers and individual tabs.


Ribbon Tab Group

See Also

Related bar items within Ribbon tabs are organized into groups.

Tab groups are represented by TdxRibbonTabGroup objects, available via a tab's Groups property.  Each tab group is a container for a toolbar.  To embed a toolbar into a group, use the group’s ToolBar property.  For this purpose, the bar manager with defined toolbars should be bound to the Ribbon (see the Ribbon’s BarManager property).  No replication of the same toolbar is allowed within one tab page.

To create a group at design time, use the tab’s context menu.  This menu is only available if the bar manager is linked to the Ribbon.

To learn more, see the Customization Form and Creating Toolbar Items and Item Controls help topics.


Ribbon User Interface

See Also

The ExpressBars Suite v6 allows you to create a Ribbon UI (like that found in MS Office 2007).

Our Ribbon implementation includes the following elements:

•	Ribbon control

•	Ribbon Application Button

•	Ribbon Application Menu

•	Ribbon Form

•	Ribbon Quick Access Toolbar

•	Ribbon Status Bar


Ribbon KeyTips

See Also

KeyTips provide quick keyboard access to the following Ribbon control elements:

•	Tabs

•	Tab groups

•	Item Links within tab groups and the Quick Access Toolbar

•	Application Button

•	Toolbar title buttons

When an end-user presses the Alt key, KeyTips appear for all visible tab headers, the Application Button, and item links within the Quick Access Toolbar.

A KeyTip is a string that represents keystrokes required to access a ribbon element.  The maximum length of a KeyTip is three characters.  Typing the keys associated with any ribbon element activates this element, or executes the action associated with it.  When a tab is activated, KeyTips appear for item links, collapsed tab groups, and toolbar title buttons within this tab.

The following image shows the result of pressing the ‘H’ key associated with the ‘Home’ tab.

Using KeyTips, end-users can access ribbon elements within collapsed tab groups, and display the contents of these groups by scrolling them into view.

As seen from the image above, there are five KeyTips starting with the ‘F’ character.  Pressing this character hides other KeyTips.

By default, KeyTips are created based on shortcuts and accelerator keys specified via the element’s ShortCut and Caption properties.  To specify KeyTips for ribbon elements, use the following properties:

•	TdxRibbonTab.KeyTip

•	TdxBar.KeyTip

•	TdxBarItem.KeyTip

•	TdxRibbonApplicationButton.KeyTip

•	TdxBarCaptionButton.KeyTip

Note that KeyTips for tabs and the Application Button should be unique to the Ribbon control, and KeyTips for ribbon elements within a tab should be unique to this tab.


dxRibbonGallery Unit Overview
dxRibbonGallery Unit

Classes

TdxRibbonDropDownGallery

TdxRibbonGalleryControl

TdxRibbonGalleryCustomOptions

TdxRibbonGalleryFilter

TdxRibbonGalleryFilterCategories

TdxRibbonGalleryFilterCategory

TdxRibbonGalleryFilterCategoryGroups

TdxRibbonGalleryGroup

TdxRibbonGalleryGroupHeader

TdxRibbonGalleryGroupItem

TdxRibbonGalleryGroupItems

TdxRibbonGalleryGroupOptions

TdxRibbonGalleryGroups

TdxRibbonGalleryItem

TdxRibbonGalleryOptions

TdxRibbonGalleryItemPullHighlighting

Other Types

TdxRibbonGalleryImagePosition

TdxRibbonGalleryItemSelectionMode

TdxRibbonGalleryGroupItemTextKind

TdxRibbonGallerySubMenuResizing

TdxRibbonGalleryItemPullHighlightingDirection

Global Constants

dxRibbonGalleryDefaultColumnCount

dxRibbonGalleryGroupItemIndent

dxRibbonGalleryMinColumnCount


TdxRibbonGalleryControl
TdxRibbonGalleryControl Object

Hierarchy          Properties          Methods          See Also

Provides visual representation of an associated in-Ribbon gallery on a toolbar.

Unit

dxRibbonGallery

TdxRibbonGalleryControl = class(TdxBarSubItemControl)

Description

When a gallery is added to a toolbar, the corresponding TdxRibbonGalleryControl object is automatically created (see the control’s Item property).  Upon initialization, it is linked to the gallery via TdxBarItemLink.


TdxRibbonGalleryControl Hierarchy
Hierarchy

TdxBarSubItemControl

     |

TdxRibbonGalleryControl


Properties for TdxRibbonGalleryControl
TdxRibbonGalleryControl Properties

TdxRibbonGalleryControl          Legend

In TdxRibbonGalleryControl

Item

Derived from TdxBarSubItemControl

Item

Derived from TdxBarButtonLikeControl

SubMenuControl

Derived from TdxBarItemControl

BarManager

 	Caption

Enabled

Glyph

Height

Hint

IsActive

IsSelected

ImageIndex

Item

ItemLink

PainterClass

Parent

Pressed

ShortCut

Width


Methods for TdxRibbonGalleryControl
TdxRibbonGalleryControl Methods

TdxRibbonGalleryControl          Legend

Derived from TdxBarSubItemControl

GlyphChanged

CanClicked

ControlClick

CreateSubMenuControl

GetDefaultHeight

GetDefaultWidth

Derived from TdxBarItemControl

BeginGroupChanged

CanClicked

CaptionChanged

Click

ControlActivate

ControlClick

ControlInactivate

ControlUnclick

Create

Destroy

DrawSelected

EnabledChanged

GlyphChanged

HasHint

HasWindow

IsDestroyOnClick

Paint

PressedChanged

Repaint

ShortCutChanged

VisibleChanged

WidthChanged


TdxRibbonGalleryControl.Item

TdxRibbonGalleryControl

References an associated in-Ribbon gallery.

property Item: TdxRibbonGalleryItem;

ReadOnly Property


TdxRibbonGalleryGroup
TdxRibbonGalleryGroup Object

Hierarchy          Properties

Represents a gallery group.

Unit

dxRibbonGallery

TdxRibbonGalleryGroup = class(TCollectionItem)

Description

TdxRibbonGalleryGroup is used to visually combine related gallery items into logical groups within a gallery.

The TdxRibbonGalleryGroup object is referenced by the gallery’s Groups property.


TdxRibbonGalleryGroup Hierarchy
Hierarchy

TCollectionItem

     |

TdxRibbonGalleryGroup


Properties for TdxRibbonGalleryGroup
TdxRibbonGalleryGroup Properties

TdxRibbonGalleryGroup          Legend

In TdxRibbonGalleryGroup

Header

Items

Options

Visible


TdxRibbonGalleryGroup.Header

TdxRibbonGalleryGroup

References a gallery group header.

property Header: TdxRibbonGalleryGroupHeader;

Description

A gallery group header is used to visually identify the gallery group.

Use this property to access header settings, including caption text, alignment and visibility.


TdxRibbonGalleryGroup.Items

TdxRibbonGalleryGroup

Holds gallery items that belong to the gallery group.

property Items: TdxRibbonGalleryGroupItems;

Description

Use the TdxRibbonGalleryGroupItems’s Add and Clear methods to add or delete items to or from the group.


TdxRibbonGalleryGroup.Options

TdxRibbonGalleryGroup

Provides access to the appearance settings for gallery group elements.

property Options: TdxRibbonGalleryGroupOptions;


TdxRibbonGalleryGroup.Visible

TdxRibbonGalleryGroup

Specifies whether a gallery group is visible.

property Visible: Boolean;

Description

The gallery group is visible if the Visible property value is True.

The default value of the Visible property is True.


TdxRibbonGalleryGroupHeader
TdxRibbonGalleryGroupHeader Object

Hierarchy          Properties

Represents a gallery group header.

Unit

dxRibbonGallery

TdxRibbonGalleryGroupHeader = class(TPersistent)

Description

A group header is used to visually identify a gallery group within a gallery.

The TdxRibbonGalleryGroupHeader object is referenced by the gallery group’s Header property.


TdxRibbonGalleryGroupHeader Hierarchy
Hierarchy

TPersistent

     |

TdxRibbonGalleryGroupHeader


Properties for TdxRibbonGalleryGroupHeader
TdxRibbonGalleryGroupHeader Properties

TdxRibbonGalleryGroupHeader          Legend

In TdxRibbonGalleryGroupHeader

Alignment

Caption

Visible


TdxRibbonGalleryGroupHeader.Alignment

TdxRibbonGalleryGroupHeader

Specifies the horizontal alignment of a group header’s content.

property Alignment: TAlignment;

The default value of the Alignment property is taLeftJustify.


TdxRibbonGalleryGroupHeader.Caption

TdxRibbonGalleryGroupHeader

Specifies a group header’s caption.

property Caption: string;


TdxRibbonGalleryGroupHeader.Visible

TdxRibbonGalleryGroupHeader

Specifies whether a group header is visible.

property Visible: Boolean;

Description

The group header is visible if the Visible property value is True.

The default value of the Visible property is False.


TdxRibbonGalleryGroupItem
TdxRibbonGalleryGroupItem Object

Hierarchy          Properties          Events

Represents a gallery item.

Unit

dxRibbonGallery

TdxRibbonGalleryGroupItem = class(TCollectionItem)

Description

A gallery item represents a command in a gallery.  Gallery items are displayed in a specified gallery group within a gallery.

Thus, the TdxRibbonGalleryGroupItem object is referenced by the gallery group’s Items property.


TdxRibbonGalleryGroupItem Hierarchy
Hierarchy

TCollectionItem

     |

TdxRibbonGalleryGroupItem


Properties for TdxRibbonGalleryGroupItem
TdxRibbonGalleryGroupItem Properties

TdxRibbonGalleryGroupItem          Legend

In TdxRibbonGalleryGroupItem

Caption

Description

Glyph

ImageIndex

Selected

Tag


Events for TdxRibbonGalleryGroupItem
TdxRibbonGalleryGroupItem Events

TdxRibbonGalleryGroupItem          Legend

In TdxRibbonGalleryGroupItem

OnClick


TdxRibbonGalleryGroupItem.Caption

TdxRibbonGalleryGroupItem          See Also

Specifies a gallery item’s caption.

property Caption: string;


TdxRibbonGalleryGroupItem.Description

TdxRibbonGalleryGroupItem          See Also

Specifies a descriptive text for a gallery item.

property Description: string;

Description

The text specified by the Description property is displayed under the gallery item’s caption.


TdxRibbonGalleryGroupItem.Glyph

TdxRibbonGalleryGroupItem          See Also

Specifies an explanatory image for a gallery item.

property Glyph: TBitmap;

Description

Alternatively, you can use the ImageIndex property to specify an image from the bound image list.


TdxRibbonGalleryGroupItem.ImageIndex

TdxRibbonGalleryGroupItem          See Also

Specifies an explanatory image for a gallery item.

property ImageIndex: Integer;

Description

This property specifies an image by its index in:

•	Gallery group’s Options.Images list.

•	Gallery’s Options.Images list if the gallery group’s Options.Images property is unassigned.

•	Bar manager’s ImageOptions.Images list if both of the above properties are unassigned.

This property is in effect only when the gallery item’s Glyph property is unassigned.


TdxRibbonGalleryGroupItem.Selected

TdxRibbonGalleryGroupItem          See Also

Specifies whether a gallery item is selected.

property Selected: Boolean;

Description

The gallery item is selected if the Selected property’s value is True.  Note that this property allows you to select or deselect a gallery item in any selection and highlighting mode (see the gallery’s GalleryOptions.ItemSelectionMode and GalleryOptions.ItemPullHighlighting properties).

The default value of the Selected property is False.


TdxRibbonGalleryGroupItem.Tag

TdxRibbonGalleryGroupItem

Stores a value associated with a gallery item.

property Tag: TTag;

Description

Use the Tag property for gallery item identification purposes.

The default value of the Tag property is 0.


TdxRibbonGalleryGroupItem.OnClick

TdxRibbonGalleryGroupItem          See Also

Allows implementation of the gallery item's functionality.

property OnClick: TNotifyEvent;

Description

This event fires in response to clicking the gallery item or activating its functionality via the keyboard (using KeyTips, for instance).

Note that the event generation is dependant upon a selection mode (see the gallery’s Options.ItemSelectionMode property).  It meets the following conditions:

Mode	Condition
gsmNone	The event fires in response to clicking a gallery item. It is not generated, if an item is selected or deselected programmatically.
gsmSingle	The event fires in the following cases: • If an item is selected or deselected by an end-user (the item can be deselected by an end-user in this mode, if the gallery’s Options.ItemAllowDeselect property value is True). • If the currently selected item becomes inactive due to the other item selection performed by an end-user or via code. • If an item is selected programmatically.
gsmMultiple	The event fires if an item is selected or deselected by an end-user or programmatically.


TdxRibbonGalleryGroupItems
TdxRibbonGalleryGroupItems Object

Hierarchy          Properties          Methods

Represents a collection of gallery items contained within a gallery group.

Unit

dxRibbonGallery

TdxRibbonGalleryGroupItems = class(TCollection)

Description

The TdxRibbonGalleryGroupItems object is referenced by the gallery group’s Items property.


TdxRibbonGalleryGroupItems Hierarchy
Hierarchy

TCollection

     |

TdxRibbonGalleryGroupItems


Properties for TdxRibbonGalleryGroupItems
TdxRibbonGalleryGroupItems Properties

TdxRibbonGalleryGroupItems          Legend

In TdxRibbonGalleryGroupItems

Items


Methods for TdxRibbonGalleryGroupItems
TdxRibbonGalleryGroupItems Methods

TdxRibbonGalleryGroupItems          Legend

In TdxRibbonGalleryGroupItems

Add

Insert


TdxRibbonGalleryGroupItems.Items

TdxRibbonGalleryGroupItems

Provides indexed access to gallery items.

property Items[Index: Integer]: TdxRibbonGalleryGroupItem;

Description

Use the Items property to obtain a reference to a gallery item by its index in the collection.  The required item is specified by its zero-based index in the collection, via the Index parameter.


TdxRibbonGalleryGroupItems.Add

TdxRibbonGalleryGroupItems

Adds a new gallery item at the end of the collection.

function Add: TdxRibbonGalleryGroupItem;

Description

This method returns a reference to the newly created gallery item.


TdxRibbonGalleryGroupItems.Insert

TdxRibbonGalleryGroupItems

Adds a new gallery item to the collection at the specified position.

function Insert(Index: Integer): TdxRibbonGalleryGroupItem;

Description

This method returns a reference to the newly created gallery item.

Index specifies the item’s position in the collection.


TdxRibbonGalleryGroups
TdxRibbonGalleryGroups Object

Hierarchy          Properties          Methods

Represents a collection of gallery groups used to visually separate gallery items into logical groups within a gallery.

Unit

dxRibbonGallery

TdxRibbonGalleryGroups = class(TCollection)

Description

The TdxRibbonGalleryGroups object is referenced by the gallery’s Groups property.


TdxRibbonGalleryGroups Hierarchy
Hierarchy

TCollection

     |

TdxRibbonGalleryGroups


Properties for TdxRibbonGalleryGroups
TdxRibbonGalleryGroups Properties

TdxRibbonGalleryGroups          Legend

In TdxRibbonGalleryGroups

Items


Methods for TdxRibbonGalleryGroups
TdxRibbonGalleryGroups Methods

TdxRibbonGalleryGroups          Legend

In TdxRibbonGalleryGroups

Add

Insert


TdxRibbonGalleryGroups.Items

TdxRibbonGalleryGroups

Provides indexed access to gallery groups.

property Items[Index: Integer]: TdxRibbonGalleryGroup;

Description

Use the Items property to obtain a reference to a gallery group by its index in the collection.  The required item is specified by its zero-based index in the collection, via the Index parameter.


TdxRibbonGalleryGroups.Add

TdxRibbonGalleryGroups

Adds a new gallery group at the end of the collection.

function Add: TdxRibbonGalleryGroup;

Description

This method returns a reference to the newly created gallery group.


TdxRibbonGalleryGroups.Insert

TdxRibbonGalleryGroups

Adds a new gallery group to the collection at the specified position.

function Insert(Index: Integer): TdxRibbonGalleryGroup;

Description

This method returns a reference to the newly created gallery group.

Index specifies the group’s position in the collection.


TdxRibbonGalleryItem
TdxRibbonGalleryItem Object

Hierarchy          Properties          Methods          Events

Represents an in-Ribbon gallery.

Unit

dxRibbonGallery

TdxRibbonGalleryItem = class(TCustomdxBarSubItem)

Description

A gallery is a bar item used to display a set of command choices.

This type of gallery can only be used in a Ribbon.  To display a gallery as a popup window invoked on any TWinControl control, use TdxRibbonDropDownGallery instead.

The TdxRibbonGalleryItem object is referenced by the toolbar’s ItemLinks.Item property.


TdxRibbonGalleryItem Hierarchy
Hierarchy

TCustomdxBarSubItem

     |

TdxRibbonGalleryItem


Properties for TdxRibbonGalleryItem
TdxRibbonGalleryItem Properties

TdxRibbonGalleryItem          Legend

In TdxRibbonGalleryItem

DropDownGallery

GalleryFilter

GalleryGroups

GalleryOptions

SelectedGroupItem

Derived from TCustomdxBarSubItem

BarSize

Detachable

DetachingBar

ItemLinks

ItemOptions

ShowCaption

Derived from TdxBarItem

ActuallyVisible

Action

ActionLink

Align

Caption

Category

ClickItemLink

CurItemLink

Data

Description

Glyph

HelpContext

Hint

ImageIndex

Index

KeyTip

LargeGlyph

LargeImageIndex

LinkCount

Links

MergeKind

MergeOrder

PaintStyle

ScreenTip

ShortCut

Style

UnclickAfterDoing

VisibleForUser

Derived from TdxBarComponent

BarManager

Enabled

Visible


Methods for TdxRibbonGalleryItem
TdxRibbonGalleryItem Methods

TdxRibbonGalleryItem          Legend

In TdxRibbonGalleryItem

IsGroupVisible

Derived from TCustomdxBarSubItem

CanContainItem

DoCloseUp

DoPopup

DropDown

GetDetachingBar

Derived from TdxBarItem

ActionChange

BarManagerChanged

CanClicked

CaptionChanged

Click

Create

Destroy

DirectClick

DoClick

EnabledChanged

GetActionLinkClass

GetCurImages

GetParentComponent

GlyphChanged

HasAccel

HasParent

HotGlyphChanged

LargeGlyphChanged

SetParentComponent

ShortCutChanged

Update

UpdateEx

UseHotImages

UseLargeImages

VisibleChanged


Events for TdxRibbonGalleryItem
TdxRibbonGalleryItem Events

TCustomdxBarSubItem               Legend

In TdxRibbonGalleryItem

OnFilterChanged

OnGroupItemClick

OnHotTrackedItemChanged

OnInitFilterMenu

Derived from TCustomdxBarSubItem

OnCloseUp

OnDetaching

OnPaintBar

OnPopup

Derived from TdxBarItem

OnClick

OnCreate

OnDestroy


TdxRibbonGalleryItem.DropDownGallery

TdxRibbonGalleryItem          See Also

Specifies a dropdown gallery.

property DropDownGallery: TdxRibbonDropDownGallery;

Description

The dropdown gallery for this gallery will be created automatically, if this property's value is nil.  It will contain the same items as in in-Ribbon gallery and will also inherit all item layout settings.

If you wish to provide custom dropdown gallery content for an in-Ribbon gallery, assign the desired TdxRibbonDropDownGallery object to this property.

The default value of the DropDownGallery property is nil.


TdxRibbonGalleryItem.GalleryFilter

TdxRibbonGalleryItem

Provides access to the object that controls end-users filtering in this gallery.

property GalleryFilter: TdxRibbonGalleryFilter;


TdxRibbonGalleryItem.GalleryGroups

TdxRibbonGalleryItem

Provides access to gallery groups used to combine related gallery items into logical groups within a gallery.

property GalleryGroups: TdxRibbonGalleryGroups;


TdxRibbonGalleryItem.GalleryOptions

TdxRibbonGalleryItem

Provides access to appearance settings for gallery elements.

property GalleryOptions: TdxRibbonGalleryOptions;


TdxRibbonGalleryItem.SelectedGroupItem

TdxRibbonGalleryItem

Specifies a selected gallery item.

property SelectedGroupItem: TdxRibbonGalleryGroupItem;

Description

This property can be used as an alternative to the gallery item’s Selected property.

Note that you can select an item or determine a selected item via the SelectedGroupItem property only in the gsmSingle selection mode (see the gallery’s Options.ItemSelectionMode property).  If the gsmNone or gsmMultiple mode is currently active, this property returns nil.


TdxRibbonGalleryItem.IsGroupVisible

TdxRibbonGalleryItem

Determines whether a group is visible within a gallery.

function IsGroupVisible(AGroupIndex: Integer; AIgnoreVisibleProperty: Boolean = False): Boolean;

Description

This function returns True if the header or gallery items of the gallery group specified by the AGroupIndex parameter are visible.  The AGroupIndex parameter specifies the gallery group’s index in the GalleryGroups collection.

For gallery groups in dropdown galleries, this function returns True if the group is not filtered out and its Visible property is set to True.  Pass True as the AIgnoreVisibleProperty parameter to ignore a group’s Visible property value.

Note that the IsGroupVisible function returns True for groups that are currently not visible in a gallery, but can be brought into view by scrolling.


TdxRibbonGalleryItem.OnFilterChanged

TdxRibbonGalleryItem          See Also

Allows you to respond to end-user actions that change the currently active filter.

type

  TdxRibbonGalleryFilterChangedEvent = procedure(Sender: TdxRibbonGalleryItem) of object;

property OnFilterChanged: TdxRibbonGalleryFilterChangedEvent;

Description

Handle this event to update the gallery filter label's text in response to clicking filter options in the gallery filter menu.

The Sender parameter references the gallery.

Note:	This event is not fired for custom filter options added into this menu by handling the OnInitFilterMenu event.  In this instance, you have to assign OnClick event handlers to these menu items to respond to clicking on them.


TdxRibbonGalleryItem.OnGroupItemClick

TdxRibbonGalleryItem          See Also

Allows you to implement functionality common to all gallery items within a gallery.

type

  TdxRibbonGalleryGroupItemClickEvent = procedure(Sender: TdxRibbonGalleryItem; AItem: TdxRibbonGalleryGroupItem) of object;

property OnGroupItemClick: TdxRibbonGalleryGroupItemClickEvent;

Description

This event fires in response to clicking a gallery item or activating its functionality via the keyboard (using KeyTips, for instance).

Note that the event generation is dependant upon a selection mode (see the gallery’s Options.ItemSelectionMode property).  It meets the following conditions:

Mode	Condition
gsmNone	The event fires in response to clicking a gallery item. It is not generated, if an item is selected or deselected programmatically.
gsmSingle	The event fires in the following cases: • The selection has changed from one item to another by an end-user or programmatically. • A selected item is deselected by an end-user (the item can be deselected by an end-user in this mode, if the gallery’s Options.ItemAllowDeselect property value is True) or programmatically.
gsmMultiple	The event fires if an item is selected or deselected by an end-user or programmatically.


TdxRibbonGalleryItem.OnHotTrackedItemChanged

TdxRibbonGalleryItem

Occurs immediately after a gallery item has been hot-tracked within a gallery.

type

  TdxRibbonGalleryHotTrackedItemChangeEvent = procedure(APrevHotTrackedGroupItem, ANewHotTrackedGroupItem: TdxRibbonGalleryGroupItem) of object;

property OnHotTrackedItemChanged: TdxRibbonGalleryHotTrackedItemChangeEvent;

Description

Handle this event to perform specific actions when an end-user examines available options by pointing to different gallery items.

The APrevHotTrackedGroupItem and ANewHotTrackedGroupItem parameters specify the previously and currently hot-tracked items, respectively.


TdxRibbonGalleryItem.OnInitFilterMenu

TdxRibbonGalleryItem          See Also

Allows you to customize a gallery filter menu before it appears.

type

  TdxRibbonGalleryInitFilterMenuEvent = procedure(Sender: TdxRibbonGalleryItem; AItemLinks: TdxBarItemLinks) of object;

property OnInitFilterMenu: TdxRibbonGalleryInitFilterMenuEvent;

Description

By default, a gallery filter menu is populated with items according to the gallery filter’s Categories collection.  If this collection is empty, items are created automatically, based on existing gallery groups.  In the latter instance, two predefined items are also added – ‘Show all groups’ and ‘Hide all groups’.  Otherwise, the ‘Clear filter’ item is added to the menu.

To add or remove menu items, use the AItemLinks parameter.

Note:	You need to manually assign OnClick event handlers to custom menu items.


TdxRibbonGalleryGroupItemTextKind type

See Also

Enumerates available types of a gallery item’s caption and description visibility.

Unit

dxRibbonGallery

type

  TdxRibbonGalleryGroupItemTextKind = (itkNone, itkCaption, itkCaptionAndDescription);

Description

Values include:

Value	Meaning
itkNone	No text is displayed in gallery items
itkCaption	Item captions are displayed
itkCaptionAndDescription	Both item captions and descriptions are displayed


TdxRibbonGalleryImagePosition type

See Also

Enumerates available gallery item icon’s alignment options relative to the gallery item caption.

Unit

dxRibbonGallery

type

  TdxRibbonGalleryImagePosition = (gipDefault, gipLeft, gipRight, gipTop, gipBottom);

Description

Values include:

Value	Meaning
gipDefault	The icon resides to the top of the item caption
gipLeft	The icon resides to the left of the item caption
gipRight	The icon resides to the right of the item caption
gipTop	The icon resides to the top of the item caption
gipBottom	The icon resides to the bottom of the item caption


TdxRibbonGalleryItemSelectionMode type

See Also

Enumerates available selection modes for gallery items.

Unit

dxRibbonGallery

type

  TdxRibbonGalleryItemSelectionMode = (gsmNone, gsmSingle, gsmMultiple);

Description

Values include:

Value	Meaning
gsmNone	Prohibits item selection
gsmSingle	Gallery items can only be selected one at a time
gsmMultiple	Multiple gallery items can be selected at one time


TdxRibbonGallerySubMenuResizing type

See Also

Enumerates available types of an in-Ribbon gallery‘s dropdown window resizing.

Unit

dxRibbonGallery

type

  TdxRibbonGallerySubMenuResizing = (gsrNone, gsrHeight, gsrWidthAndHeight);

Description

Values include:

Value	Meaning
gsrNone	Disables both horizontal and vertical resizing
gsrHeight	Enables vertical resizing
gsrWidthAndHeight	Enables both horizontal and vertical resizing


dxRibbonGalleryDefaultColumnCount constant
dxRibbonGalleryDefaultColumnCount global constant

See Also

Specifies the default number of columns in which gallery items are arranged within a gallery.

Unit

dxRibbonGallery

dxRibbonGalleryDefaultColumnCount = 5;


dxRibbonGalleryMinColumnCount constant
dxRibbonGalleryMinColumnCount global constant

See Also

Specifies the default minimum number of columns that should be displayed by a gallery.

Unit

dxRibbonGallery

dxRibbonGalleryMinColumnCount = 2;

Description

A gallery’s content is visible, if the gallery’s Options.ColumnCount property is equal to or greater than the gallery’s Options.MinColumnCount property.

The Options.MinColumnCount property’s default value (specified by the dxRibbonGalleryMinColumnCount constant) is two columns.


dxRibbonGalleryGroupItemIndent constant
dxRibbonGalleryGroupItemIndent global constant

See Also

Specifies gallery item padding – in pixels.

Unit

dxRibbonGallery

dxRibbonGalleryGroupItemIndent = 3;

The following image shows the resulting gallery when the dxRibbonGalleryGroupItemIndent constant is set to 10.


TdxRibbonDropDownGallery
 TdxRibbonDropDownGallery Object

Hierarchy          Properties          Methods          Events

Represents a dropdown Ribbon gallery.

Unit

dxRibbonGallery

TdxRibbonDropDownGallery = class(TdxRibbonPopupMenu)

Description

To provide content for the dropdown gallery, you can:

•	Bind it to a Ribbon gallery via the GalleryItem property to display the bound gallery’s content.

•	Manually populate it with the desired Bar item controls.  Since TdxRibbonDropDownGallery is a TdxRibbonPopupMenu descendant, it allows you to add and remove bar item controls and customize their layout at design time via drag and drop.  Note that bar item controls can only be positioned after the bound gallery.


TdxRibbonDropDownGallery Hierarchy
Hierarchy

TComponent

     |

TdxBarComponent

     |

TdxBarCustomPopupMenu

     |

TdxBarPopupMenu

     |

TdxRibbonPopupMenu

     |

TdxRibbonDropDownGallery


Properties for TdxRibbonDropDownGallery
TdxRibbonDropDownGallery Properties

TdxRibbonDropDownGallery          Legend

In TdxRibbonDropDownGallery

GalleryItem

Derived from TdxRibbonPopupMenu

Ribbon

Derived from TdxBarCustomPopupMenu

BackgroundBitmap

BarManager

BarSize

Font

ItemLinks

ItemOptions

SubMenuControl

UseOwnFont

UseRecentItems

Derived from TdxBarComponent

BarManager

Enabled

Visible


Methods for TdxRibbonDropDownGallery
TdxRibbonDropDownGallery Methods

TdxRibbonDropDownGallery          Legend

Derived from TdxBarCustomPopupMenu

Create

Destroy

Popup

PopupEx

PopupFromCursorPos


Events for TdxRibbonDropDownGallery
TdxRibbonDropDownGallery Events

TdxRibbonDropDownGallery          Legend

Derived from TdxBarCustomPopupMenu

OnCloseUp

OnPaintBar

OnPopup


TdxRibbonDropDownGallery.GalleryItem

TdxRibbonDropDownGallery

Specifies the gallery that provides commands to be displayed in the dropdown gallery.

property GalleryItem: TdxRibbonGalleryItem;


TdxRibbonGalleryCustomOptions
TdxRibbonGalleryCustomOptions Object

Hierarchy          Properties          See Also

Represents the base class for classes that contain appearance options for galleries.

Unit

dxRibbonGallery

TdxRibbonGalleryCustomOptions = class(TPersistent)

Description

These options allow you to customize the following gallery aspects:

•	Layout of gallery items (SpaceAfterGroupHeader, and SpaceBetweenItems).

•	Item size (ItemSize).

•	Layout and visibility of item elements (SpaceBetweenItemCaptionAndDescription, SpaceBetweenItemImageAndText, ItemImagePosition, ItemImageSize, and ItemTextKind).

•	Contiguous highlighting options (ItemPullHighlighting).

TdxRibbonGalleryCustomOptions descendants include TdxRibbonGalleryGroupOptions and TdxRibbonGalleryOptions, which provide appearance options for gallery groups and entire galleries, respectively.


TdxRibbonGalleryCustomOptions Hierarchy
Hierarchy

TPersistent

     |

TdxRibbonGalleryCustomOptions


Properties for TdxRibbonGalleryCustomOptions
TdxRibbonGalleryCustomOptions Properties

TdxRibbonGalleryCustomOptions          Legend

In TdxRibbonGalleryCustomOptions

Images

ItemImagePosition

ItemImageSize

ItemPullHighlighting

ItemSize

ItemTextKind

SpaceAfterGroupHeader

SpaceBetweenItemCaptionAndDescription

SpaceBetweenItemImageAndText

SpaceBetweenItems


TdxRibbonGalleryCustomOptions.Images

TdxRibbonGalleryCustomOptions

Provides images for gallery items.

property Images: TCustomImageList;

Description

To associate a gallery item with an image from this image list, use the gallery item’s ImageIndex property.


TdxRibbonGalleryCustomOptions.ItemImagePosition

TdxRibbonGalleryCustomOptions

Specifies the manner in which a gallery item’s image and text (caption and description) are aligned.

type

  TdxRibbonGalleryImagePosition = (gipLeft, gipRight, gipTop, gipBottom);

property ItemImageLocation: TdxRibbonGalleryImagePosition;

Description

Refer to the description of the TdxRibbonGalleryImagePosition type to learn about available options.

The default value of the ItemImagePosition property is gipLeft.


TdxRibbonGalleryCustomOptions.ItemImageSize

TdxRibbonGalleryCustomOptions

Specifies the height and width of item images within a gallery group.

property ItemImageSize: TcxSize;

Description

Use this property to scale images within the group.  Setting either the ItemImageSize.Height or ItemImageSize.Width property to 0 restores the original image size.  By default, both these properties are set to 0.

Note that the image size cannot be more than the item size specified by the ItemSize property.


TdxRibbonGalleryCustomOptions.ItemPullHighlighting

TdxRibbonGalleryCustomOptions

Provides access to contiguous highlighting options.

property ItemPullHighlighting: TdxRibbonGalleryItemPullHighlighting;

Description

Refer to the description of the TdxRibbonGalleryItemPullHighlighting type to learn about available options.


TdxRibbonGalleryCustomOptions.ItemSize

TdxRibbonGalleryCustomOptions

Specifies the height and width of gallery items within a gallery group.

property ItemSize: TcxSize;

Description

Use this property to scale items within the group.  Setting either the ItemSize.Height or ItemSize.Width property to 0 restores the original item size, which is determined by the item’s image and text.  By default, both these properties are set to 0.

Use the ItemImageSize property to customize the size of item images.


TdxRibbonGalleryCustomOptions.ItemTextKind

TdxRibbonGalleryCustomOptions

Specifies the caption and description visibility for a gallery group’s items.

type

  TdxRibbonGalleryGroupItemTextKind = (itkNone, itkCaption, itkCaptionAndDescription);

property ItemTextKind: TdxRibbonGalleryGroupItemTextKind;

Description

Refer to the TdxRibbonGalleryGroupItemTextKind type description to learn more about available options.

The default value of the ItemTextKind property is itkCaption.


TdxRibbonGalleryCustomOptions.SpaceAfterGroupHeader

TdxRibbonGalleryCustomOptions

Specifies the additional offset (in pixels) from a group header to gallery items.

property SpaceAfterGroupHeader: Integer;

Description

By default, the offset is determined based on the item top padding specified by the dxRibbonGalleryGroupItemIndent constant.  Use the SpaceAfterGroupHeader property to increase this offset.

The following image shows the resulting gallery when the SpaceAfterGroupHeader property is set to 5.

The default value of the SpaceAfterGroupHeader property is 0.


TdxRibbonGalleryCustomOptions.SpaceBetweenItemCaptionAndDescription

TdxRibbonGalleryCustomOptions

Specifies the distance (in pixels) between a gallery item’s caption and description.

property SpaceBetweenItemCaptionAndDescription: Integer;

Description

This property is in effect if the ItemTextKind property is set to itkCaptionAndDescription.

The following table shows examples of using the SpaceBetweenItemImageAndText property.

Value	Sample
0
10

The default value of the SpaceBetweenItemCaptionAndDescription property is 0.


TdxRibbonGalleryCustomOptions.SpaceBetweenItemImageAndText

TdxRibbonGalleryCustomOptions

Specifies the distance (in pixels) between a gallery item’s image and text (caption and description).

property SpaceBetweenItemImageAndText: Integer;

Description

This property is in effect if the ItemTextKind property is set to itkCaption or itkCaptionAndDescription.

The following table shows examples of using the SpaceBetweenItemImageAndText property.

Value	Sample
0
10

The default value of the SpaceBetweenItemImageAndText property is 0.


TdxRibbonGalleryCustomOptions.SpaceBetweenItems

TdxRibbonGalleryCustomOptions

Specifies the additional offset (in pixels) between gallery items.

property SpaceBetweenItems: Integer;

Description

Use this property to increase the item padding specified by the dxRibbonGalleryGroupItemIndent constant.

The following table shows examples of using the SpaceBetweenItems property.

Value	Sample
0
10

The default value of the SpaceBetweenItems property is 0.


TdxRibbonGalleryGroupOptions
TdxRibbonGalleryGroupOptions Object

Hierarchy          Properties

Provides appearance options for gallery groups.

Unit

dxRibbonGallery

TdxRibbonGalleryGroupOptions = class(TdxRibbonGalleryCustomOptions)

Description

Use a gallery group’s Options property to access these options.

In addition to the settings inherited from its ancestor class, the TdxRibbonGalleryGroupOptions class introduces the AssignedValues property that allows you to determine which appearance options have been modified.


TdxRibbonGalleryGroupOptions Hierarchy
Hierarchy

TPersistent

     |

TdxRibbonGalleryCustomOptions

     |

TdxRibbonGalleryGroupOptions


Properties for TdxRibbonGalleryGroupOptions
TdxRibbonGalleryGroupOptions Properties

TdxRibbonGalleryGroupOptions          Legend

In TdxRibbonGalleryGroupOptions

AssignedValues

Derived from TdxRibbonGalleryCustomOptions

Images

ItemImagePosition

ItemImageSize

ItemPullHighlighting

ItemSize

ItemTextKind

SpaceAfterGroupHeader

SpaceBetweenItems

SpaceBetweenItemCaptionAndDescription

SpaceBetweenItemImageAndText


TdxRibbonGalleryGroupOptions.AssignedValues

TdxRibbonGalleryGroupOptions

Provides access to a set of flags that determine which appearance options have been modified.

type

  TdxRibbonGalleryGroupOptionsAssignedValue = (avItemImagePosition, avItemImageSize, avItemSize, avItemTextKind, avItemPullHighlighting, avSpaceAfterGroupHeader, avSpaceBetweenItemCaptionAndDescription, avSpaceBetweenItemImageAndText, avSpaceBetweenItems);

  TdxRibbonGalleryGroupOptionsAssignedValues = set of TdxRibbonGalleryGroupOptionsAssignedValue;

property AssignedValues: TdxRibbonGalleryGroupOptionsAssignedValues;

Description

Changing the ItemImagePosition, ItemImageSize, ItemSize, ItemTextKind, ItemPullHighlighting SpaceAfterGroupHeader, SpaceBetweenItemCaptionAndDescription, SpaceBetweenItemImageAndText, and SpaceBetweenItems properties sets the corresponding option flag in the AssignedValues property.  When an option flag is not set or reset, the default property value is used.  For gallery groups, this value is determined by the corresponding option in a gallery’s GalleryOptions property.

The default value of the AssignedValues property is [].


TdxRibbonGalleryOptions
TdxRibbonGalleryOptions Object

Hierarchy          Properties

Provides appearance options for galleries.

Unit

dxRibbonGallery

TdxRibbonGalleryOptions = class(TdxRibbonGalleryCustomOptions)

Description

Use a gallery’s GalleryOptions property to access gallery options.  Note that these options are common to all gallery groups and items within the gallery.  To customize appearance settings for an individual group, use the group’s Options property.

In addition to the settings inherited from its ancestor class, the TdxRibbonGalleryOptions class introduces options that allow you to customize the following gallery aspects:

•	For dropdown galleries and in-Ribbon galleries:

o	Item layout (ColumnCount)

o	Item selection settings (ItemSelectionMode and ItemAllowDeselect)

•	For dropdown galleries:

o	Group layout (SpaceBetweenGroups)

o	Gallery item layout (RowCount, EqualItemSizeInAllGroups)

•	For in-Ribbon galleries:

o	Collapsed state settings (Collapsed, CanCollapse, MinColumnCount, and SubMenuResizing)


TdxRibbonGalleryOptions Hierarchy
Hierarchy

TPersistent

     |

TdxRibbonGalleryCustomOptions

     |

TdxRibbonGalleryOptions


Properties for TdxRibbonGalleryOptions
TdxRibbonGalleryOptions Properties

TdxRibbonGalleryOptions          Legend

In TdxRibbonGalleryOptions

CanCollapse

Collapsed

ColumnCount

Images

ItemAllowDeselect

ItemSelectionMode

SpaceBetweenGroups

EqualItemSizeInAllGroups

MinColumnCount

RowCount

ShowScrollBar

SubMenuResizing

Derived from TdxRibbonGalleryCustomOptions

ItemImagePosition

ItemImageSize

ItemPullHighlighting

ItemSize

ItemTextKind

SpaceAfterGroupHeader

SpaceBetweenItems

SpaceBetweenItemCaptionAndDescription

SpaceBetweenItemImageAndText


TdxRibbonGalleryOptions.CanCollapse

TdxRibbonGalleryOptions          See Also

Specifies whether an in-Ribbon gallery can be automatically collapsed to a sub-menu when the Ribbon control is resized.

property CanCollapse: Boolean;

Description

Set this property to False to prohibit an in-Ribbon gallery from being collapsed to a sub-menu when the number of visible columns in the gallery becomes less than MinColumnCount.

The default value of the CanCollapse property is True.


TdxRibbonGalleryOptions.Collapsed

TdxRibbonGalleryOptions          See Also

Specifies whether an in-Ribbon gallery is collapsed to a sub-menu.

property Collapsed: Boolean;

Description

Set this property to True to collapse an in-Ribbon gallery to a sub-menu.  When opened, this sub-menu displays the gallery’s contents as a dropdown gallery.  The same dropdown gallery appears when the dropdown button is clicked in the expanded in-Ribbon gallery.

Use the CanCollapse property to enable the mode in which galleries are automatically collapsed when the Ribbon control is resized.

The default value of the Collapsed property is False.


TdxRibbonGalleryOptions.ColumnCount

TdxRibbonGalleryOptions

Specifies the number of columns displayed in a gallery.

property ColumnCount: Integer;

Description

For in-Ribbon galleries, the specified number of columns is displayed only if the gallery is wide enough to fit them.  Otherwise, the number of columns is reduced accordingly.

The ColumnCount property value cannot be less than MinColumnCount.

The default value of the ColumnCount property is dxRibbonGalleryDefaultColumnCount.


TdxRibbonGalleryOptions.ItemAllowDeselect

TdxRibbonGalleryOptions          See Also

Specifies whether end-users can deselect gallery items.

property ItemAllowDeselect: Boolean;

Description

Set this property to True to allow end-users to deselect gallery items by clicking on them.  Otherwise, gallery items can only be deselected programmatically via an item’s Selected property.

Note that the ItemAllowDeselect option is automatically enabled if the ItemSelectionMode property is set to gsmMultiple.

The default value of the ItemAllowDeselect property is False.


TdxRibbonGalleryOptions.ItemSelectionMode

TdxRibbonGalleryOptions          See Also

Specifies whether gallery items support the selected state and whether multiple item selection is allowed.

type

  TdxRibbonGalleryItemSelectionMode = (gsmNone, gsmSingle, gsmMultiple);

property ItemSelectionMode: TdxRibbonGalleryItemSelectionMode;

Description

Refer to the TdxRibbonGalleryItemSelectionMode type description to learn about available options.

The gallery item selection feature can be additionally controlled by the ItemAllowDeselect property, which specifies whether end-users are allowed to deselect items.

The default value of the ItemSelectionMode property is gsmSingle.


TdxRibbonGalleryOptions.SpaceBetweenGroups

TdxRibbonGalleryOptions

Specifies the group spacing (in pixels) in a dropdown gallery.

property SpaceBetweenGroups: Integer;

Description

The following image shows the resulting gallery when the SpaceBetweenGroups property is set to 10.

The default value of the SpaceBetweenGroups property is 0.


TdxRibbonGalleryOptions.EqualItemSizeInAllGroups

TdxRibbonGalleryOptions

Specifies whether all the item sizes in gallery groups are identical.

property EqualItemSizeInAllGroups: Boolean;

Description

If this property is set to False, the item size for each group is determined based on a group’s ItemSize property value.  Otherwise, the item size is automatically set to the maximum item size among all groups.

The following table shows examples of using the EqualItemSizeInAllGroups property.

Value	Sample
True
False

The default value of the EqualItemSizeInAllGroups property is True.


TdxRibbonGalleryOptions.MinColumnCount

TdxRibbonGalleryOptions

Specifies the minimum number of columns displayed in an in-Ribbon gallery.

property MinColumnCount: Integer;

Description

This property is in effect only if the CanCollapse property value is True.  In this case, the gallery is automatically collapsed to a sub-menu when the Ribbon control is resized so that the gallery cannot fit the specified number of columns.

Note that MinColumnCount cannot be greater than ColumnCount.

The default value of the MinColumnCount property is dxRibbonGalleryMinColumnCount.


TdxRibbonGalleryOptions.RowCount

TdxRibbonGalleryOptions

Specifies the maximum number of rows visible in a dropdown gallery at one time.

property RowCount: Integer;

Description

The size of a dropdown gallery is specified by the RowCount and ColumnCount properties.  If all gallery items cannot fit into the gallery area, a vertical scrollbar is displayed in a gallery window.

Assigning 0 to the RowCount property indicates that the number of rows is determined automatically, so that the entire gallery fits its window.

The default value of the RowCount property is 0.


TdxRibbonGalleryOptions.ShowScrollbar

TdxRibbonGalleryOptions

This property is obsolete.  The scrollbar’s visibility is determined automatically, based on the RowCount property value.

property ShowScrollbar: Boolean;


TdxRibbonGalleryOptions.SubMenuResizing

TdxRibbonGalleryOptions          See Also

Specifies the manner in which a sub-menu’s dropdown window for a collapsed in-Ribbon gallery can be resized by end-users.

type

  TdxRibbonGallerySubMenuResizing = (gsrNone, gsrHeight, gsrWidthAndHeight);

property SubMenuResizing: TdxRibbonGallerySubMenuResizing;

Description

Refer to the TdxRibbonGallerySubMenuResizing type description to learn more about available options.

The default value of the SubMenuResizing property is gsrWidthAndHeight.


TdxRibbonGalleryItemPullHighlighting
TdxRibbonGalleryItemPullHighlighting Object

Hierarchy          Properties

Provides contiguous highlighting options for galleries.

Unit

dxRibbonGallery

TdxRibbonGalleryItemPullHighlighting = class(TPersistent)

Description

Use a gallery’s GalleryOptions.ItemPullHighlighting property to access the options that control the contiguous highlighting within this gallery.  These options apply to all its groups and items.  To customize contiguous highlighting settings for an individual group, use the group’s Options.ItemPullHighlighting property.

The TdxRibbonGalleryItemPullHighlighting class introduces options that allow you to do the following:

•	Enable/disable the contiguous highlighting mode (Active).

•	Specify the direction in which group items are highlighted (Direction).


TdxRibbonGalleryItemPullHighlighting Hierarchy
Hierarchy

TPersistent

     |

TdxRibbonGalleryItemPullHighlighting


Properties for TdxRibbonGalleryItemPullHighlighting
TdxRibbonGalleryItemPullHighlighting Properties

TdxRibbonGalleryItemPullHighlighting          Legend

In TdxRibbonGalleryItemPullHighlighting

Active

Direction


TdxRibbonGalleryItemPullHighlighting.Active

TdxRibbonGalleryItemPullHighlighting

Activates the contiguous highlighting mode.

property Active: Boolean;

Description

In this mode, hot-tracking a group item, automatically highlights all items between this item and the start of the highlighting.  End-users can move the mouse pointer within a gallery or group to adjust the highlighting.  Using this mode allows you to emulate list functionality of the "Undo" button found in Microsoft Word.

To activate this mode, set the Active property is True.  Use the Direction property to specify the start and direction of highlighting.

Note:	In contiguous highlighting mode, clicking a group item doesn’t change the Selected property of highlighted items.  However, this does fire a gallery’s OnGroupItemClick event and the item’s OnClick event to enable you to respond to the click.

The default value of the Active property is False.


TdxRibbonGalleryItemPullHighlighting.Direction

TdxRibbonGalleryItemPullHighlighting

Specifies the direction in which group items are highlighted in contiguous highlighting mode.

type

  TdxRibbonGalleryItemPullHighlightingDirection = (gphdStartToFinish, gphdFinishToStart);

property Direction: TdxRibbonGalleryItemPullHighlightingDirection;

Description

Options include:

Option	Description	Sample
gphdStartToFinish	In groups, items are highlighted starting from the beginning of a group. In galleries, items are highlighted in all groups starting from the first item in the first visible group.
gphdFinishToStart	In groups, items are highlighted starting from the end of a group. In galleries, items are highlighted in all groups starting from the last item in the last visible group.

The default value of the Direction property is gphdStartToFinish.


TdxRibbonGalleryFilterCategory
TdxRibbonGalleryFilterCategory Object

Hierarchy          Properties

Represents a filter category in a gallery filter.

Unit

dxRibbonGallery

TdxRibbonGalleryFilterCategory = class(TCollectionItem)

Description

A category is represented by a TdxRibbonGalleryFilterCategory class instance.  This class introduces members that allow you to:

•	Specify a filter category’s caption (Caption).

•	Associate gallery groups with the filter category (Groups).

•	Access the gallery that owns this filter (GalleryItem).

To access categories that belong to a gallery filter, use the gallery filter’s Categories collection.


TdxRibbonGalleryFilterCategory Hierarchy
Hierarchy

TCollectionItem

     |

TdxRibbonDropDownGallery


Properties for TdxRibbonGalleryFilterCategory
TdxRibbonGalleryFilterCategory Properties

TdxRibbonGalleryFilterCategory          Legend

In TdxRibbonGalleryFilterCategory

Caption

GalleryItem

Groups


TdxRibbonGalleryFilterCategory.Caption

TdxRibbonGalleryFilterCategory

Specifies the text that represents this filter category in the UI.

property Caption: string;


TdxRibbonGalleryFilterCategory.GalleryItem

TdxRibbonGalleryFilterCategory

Provides access to the gallery that owns the filter category.

property GalleryItem: TdxRibbonGalleryItem;

ReadOnly Property


TdxRibbonGalleryFilterCategory.Groups

TdxRibbonGalleryFilterCategory

Provides access to gallery groups associated with this filter category.

property Groups: TdxRibbonGalleryFilterCategoryGroups;

Description

At design time, this property provides a specially designed editor that allows you to choose gallery groups to associate with the current category.

ReadOnly Property


TdxRibbonGalleryFilterCategories
TdxRibbonGalleryFilterCategories Object

Hierarchy          Properties          Methods

Represents a collection of filter categories for gallery filters.

Unit

dxRibbonGallery

TdxRibbonGalleryFilterCategories = class(TCollection)

Description

The TdxRibbonGalleryFilterCategories object is referenced by a gallery filter’s Categories property.


TdxRibbonGalleryFilterCategories Hierarchy
Hierarchy

TCollection

     |

TdxRibbonGalleryFilterCategories


Properties for TdxRibbonGalleryFilterCategories
TdxRibbonGalleryFilterCategories Properties

TdxRibbonGalleryFilterCategories          Legend

In TdxRibbonGalleryFilterCategories

Items


Methods for TdxRibbonGalleryFilterCategories
TdxRibbonGalleryFilterCategories Methods

TdxRibbonGalleryFilterCategories          Legend

In TdxRibbonGalleryFilterCategories

Add


TdxRibbonGalleryFilterCategories.Items

TdxRibbonGalleryFilterCategories          See Also

Provides zero-based indexed access to filter categories within the current collection.

property Items[Index: Integer]: TdxRibbonGalleryFilterCategory;

ReadOnly Property


TdxRibbonGalleryFilterCategories.Add

TdxRibbonGalleryFilterCategories

Adds a new filter category to the end of the collection.

function Add: TdxRibbonGalleryFilterCategory;

Description

This function returns a reference to the newly created filter category.


TdxRibbonGalleryFilterCategoryGroups
TdxRibbonGalleryFilterCategoryGroups Object

Hierarchy          Properties          Methods

Represents a collection of gallery groups associated with a filter category.

Unit

dxRibbonGallery

TdxRibbonGalleryFilterCategoryGroups = class(TList)

Description

The TdxRibbonGalleryFilterCategoryGroups object is referenced by a category’s Groups property.


TdxRibbonGalleryFilterCategoryGroups Hierarchy
Hierarchy

TList

     |

TdxRibbonGalleryFilterCategoryGroups


Properties for TdxRibbonGalleryFilterCategoryGroups
TdxRibbonGalleryFilterCategoryGroups Properties

TdxRibbonGalleryFilterCategoryGroups          Legend

In TdxRibbonGalleryFilterCategoryGroups

Items

FilterCategory


Methods for TdxRibbonGalleryFilterCategoryGroups
TdxRibbonGalleryFilterCategoryGroups Methods

TdxRibbonGalleryFilterCategoryGroups          Legend

In TdxRibbonGalleryFilterCategoryGroups

Add


TdxRibbonGalleryFilterCategoryGroups.FilterCategory

TdxRibbonGalleryFilterCategoryGroups

Provides access to the filter category that owns this group collection.

property FilterCategory: TdxRibbonGalleryFilterCategory;

ReadOnly Property


TdxRibbonGalleryFilterCategoryGroups.Items

TdxRibbonGalleryFilterCategoryGroups

Provides zero-based indexed access to gallery groups within the current collection.

property Items[Index: Integer]: TdxRibbonGalleryGroup;

ReadOnly Property


TdxRibbonGalleryFilterCategoryGroups.Add

TdxRibbonGalleryFilterCategoryGroups

Adds the specified gallery group to the end of the collection.

function Add(AGroup: TdxRibbonGalleryGroup): Integer;

Description

The AGroup parameter represents the group to be added.

A gallery group cannot be added if the collection already contains it.  In this instance, the function returns –1.  Otherwise, this function returns the group’s position within the collection.


TdxRibbonGalleryFilter
TdxRibbonGalleryFilter Object

Hierarchy          Properties          Methods

Represents a gallery filter.

Unit

dxRibbonGallery

TdxRibbonGalleryFilter = class(TPersistent)

Description

To provide content for the gallery filter, you can:

•	Manually create filter categories by populating the Categories collection.

•	Leave the Categories collection empty.  In this case, filter options are automatically created (one per each group), based on the gallery’s GalleryGroups collection.

Use a gallery’s GalleryFilter property to access its filter.


TdxRibbonGalleryFilter Hierarchy
Hierarchy

TPersistent

     |

TdxRibbonGalleryFilter


Properties for TdxRibbonGalleryFilter
TdxRibbonGalleryFilter Properties

TdxRibbonGalleryFilter          Legend

In TdxRibbonGalleryFilter

ActiveCategoryIndex

Caption

Categories

Visible


Methods for TdxRibbonGalleryFilter
TdxRibbonGalleryFilter Methods

TdxRibbonGalleryFilter          Legend

In TdxRibbonGalleryFilter

IsGroupFiltered


TdxRibbonGalleryFilter.ActiveCategoryIndex

TdxRibbonGalleryFilter          See Also

Specifies the active filter category by its index.

property ActiveCategoryIndex: Integer;

Description

Use this property to activate the desired filter category so that the gallery displays only the groups associated with this category.  Categories are identified by their index in the Categories collection.

Set the ActiveCategoryIndex property to –1 to cancel filtering.

End-users can activate a category by clicking a corresponding filter option in the gallery filter menu.

The default value of the ActiveCategoryIndex property is –1.


TdxRibbonGalleryFilter.Caption

TdxRibbonGalleryFilter

Specifies the gallery filter label’s text.

property Caption: string;

Description

If this property is set to an empty string, the label’s text is updated automatically based on the currently active filter options.  To specify the text manually, handle the OnFilterChanged event.  This event is raised when end-users toggle filter options.

Note:	If no categories are defined within the gallery filter, the label displays header captions of the visible gallery groups, delimited by commas.


TdxRibbonGalleryFilter.Categories

TdxRibbonGalleryFilter

Provides zero-based indexed access to categories associated with this gallery filter.

property Categories: TdxRibbonGalleryFilterCategories;

Description

If this collection is empty, filter options are automatically created (one per each group), based on a gallery’s GalleryGroups collection.

Handle the OnInitFilterMenu event to customize the gallery filter menu’s contents.


TdxRibbonGalleryFilter.Visible

TdxRibbonGalleryFilter

Specifies whether the gallery’s filter is visible in an expanded dropdown gallery.

property Visible: Boolean;

Description

Set this property to True to display the gallery filter at the top of the dropdown gallery.

The default value of the Visible property is False.


TdxRibbonGalleryFilter.IsGroupFiltered

TdxRibbonGalleryFilter          See Also

Determines whether the group specified by the AGroup parameter is filtered out.

function IsGroupFiltered(AGroup: TdxRibbonGalleryGroup): Boolean;

Description

This function returns True if the specified group is not associated with the currently active category.  If the ActiveCategoryIndex property is set to –1, the return value is always False.


Filter Category

Filter categories allow the gallery content to be split into logical groups.

A filter category corresponds to a single entry in the filter menu and can include any number of gallery groups.  End-users can click a filter option to display only the gallery groups that are associated with the chosen filter option (category).