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


About ExpressSideBar
About The ExpressSideBar

ExpressSideBar is a VCL implementation of the MS Outlook™ bar.  Designed to be easy to use and built with a significant feature set...Just drop it on a form, double click the control and in a few moments, you can customize the ExpressSideBar for your needs.

The ExpressSideBar includes a variety of features including:

•	Small and large icon views

•	Group and item customization

•	Full drag & drop support (including copying)

•	Animation on group change

•	Gradient color fills

•	Background picture

•	Mark sidebar items after they are clicked

•	Change font of group text

•	Change font of item text

•	Set the popup menu for groups and items

•	Change the paint style to Standard, Flat, or XP (Office 97™, Office 2000™, or Office XP™)

•	Store/restore ExpressSideBar™ states in the registry

And of course a runtime customization window so that your end users can manipulate the layout of the SideBar to meet specific requirements.


Getting started with ExpressSideBar tm
Getting Started with ExpressSideBar™

Before compiling an application using the ExpressSideBar™, you must first determine whether you wish to enable runtime customization for your end-users.

Using the runtime customization capabilities of the ExpressSideBar™, your end-users can easily add/remove sidebar items by calling the ExpressSideBar customization window.  You determine at design time the set of SideBar items to make available, then in turn, make only a subset visible at runtime.  This provides your end users with the ability to customize the application as their needs require.

If you wish to implement SideBar customization, you must use the TdxSideBarStore component in conjunction with ExpressSideBar.  Regardless of the decision to incorporate runtime customization in an application, you will ultimately write the same amount of event handlers (OnClick event of SideBar items only).

This help file describes both variants and how to implement them in your application.

A. ExpressSideBar - Without Runtime Customization

After installing the ExpressBars package, you will find the dxSideBar component within the ExpressBars component palette tab page.

1.	Drop a dxSideBar component onto a form.  The control automatically aligns itself to the left edge of the form.

2.	Drop two TImageList components on your form and set their properties: Height, Width, and Images.  Rename the first image component to imgSmall.  Name the second image component imgLarge.  We will use imgSmall to store 16X16 images and imgLarge to store 32X32 pixel images.  Double click imgSmall and select the appropriate images.  Repeat the same steps for imgLarge.

Note: You are free to use images of any size.  We recommend these sizes as they are the most popular image sizes and meet the design guidelines set forth by Microsoft®.

3.	Link the LargeImages and SmallImages properties of the dxSideBar to the newly created image lists.

4.	Double click the dxSideBar control to call its component editor.  Press the Add command button within the Groups panel and enter the name of your first group.  You are now ready to add individual items to the active SideBar group.

Note: The active sidebar group is the last group at the top of the ExpressSideBar group area.

5.	Press the Add command button within the Item Properties panel and set its properties (Caption, Hint, LargeImage, Smallimage, CustomData and Tag).  Move to the SideBar and select the newly added item.  Note: A selected item will display a frame around along its edge. Use Drag & Drop to move and copy items.  To change the icon type (Large/Small) of the active group, use the Icon Type check box.

6.	You can now populate the ExpressSideBar with additional items and implement an OnClick event handler for each item.  Write the following TdxSideBar.OnItemClick event.  (You can distinguish the sidebar item by its Tag property.

procedure TForm1.dxSideBar1ItemClick(Sender: TObject;

  Item: TdxSideBarItem);

begin

  case Item.Tag do

    0: ShowMessage('You have chosen the side item with Tag=0');

    10: ShowMessage('Hello');

    else ShowMessage('Unknown sidebar item. I'm Sorry!');

  end;

end;

You now have a fully functional SideBar.

B. ExpressSideBar - Full Runtime Customization

To allow end users the flexibility to modify the ExpressSideBar™ as their needs require, you must take the following steps:

1.	Drop a dxSideBar component on your form.  The control automatically aligns itself to the left edge of the form.

2.	Drop two TImageList components on your form and set their properties: Height, Width, and Images.  Rename the first image component imgSmall.  Name the second image component imgLarge.  We will use imgSmall to store 16X16 images and imgLarge to store 32X32 pixel images.  Double click imgSmall and select the appropriate images.  Repeat the same step for imgLarge.

Note: You are free to use images of any size.  We recommend these sizes as they are the most popular image sizes and meet the design guidelines set forth by Microsoft®.

3.	Link the TdxSideBarStore.LargeImages and TdxSideBarStore.SmallImages to the newly created image lists.

4.	Double click on TdxSideBarStore to call its component editor.

Rename the default category and add a second category.  Add the stored items to the active category and set appropriate properties:

5.	Write an on click event handler for the stored items by using the following code:

procedure TForm1.dxSideBarStore1Item3Click(Sender: TObject;

  Item: TdxSideBarItem);

begin

  ShowMessage ('Hello, thank you!');

end;

6.	Set up the TdxSideBar.Store property to TdxSideBarStore and double click on dxSideBar in order to call its component editor.

7.	To associate the dxSideBar to the modified store, press the Default command on the bottom portion of the component editor.  This action links the dxSideBar to the TdxSideBarStore items.  You may then continue to add, copy, change or modify the properties of the dxSideBar as your needs require.

By using the TdxSideBarStore, you allow your end-users full runtime control over the behavior of the sidebar.

The ExpressSideBar was designed to allow you to have total control over your GUI design with minimal or no coding whatsoever.  Here are even more features that can easily be added to your application  - without writing a single line of code:

•	Gradient color fills; set by using the BkGround property of the dxSideBar.

•	Background picture; set by using the BkPicture property.

•	You can display the SideBar item as selected after it has been clicked by setting the CanSelected property to True.

•	You can allow the end user to move and copy SideBar items, by using Drag & Drop. Set the DragMode property to dmAutomatic.

•	Change the font of the group text using the GroupFont property.

•	Change the font of the item text using the ItemFont property.

•	Set the popup menu for Groups and Items by using the GroupPopupMenu and ItemPopupMenu. Use the TdxSideBarPopupMenu that has the following default items (you won't need to write a single line of code to implement this - we have already done it for you): 'Add Group', 'Remove Group', 'Rename Group', 'Remove ShortCut', 'Rename ShortCut', 'Large Icons', 'Small Icons', 'Customize...'

•	Change the paint style to Standard, Flat, or XP by setting the PaintStyle property.

•	Change the scroll delay on scrolling items by adjusting the ScrollDelay property. The default value is 300 (ms).

•	Change the spacing between items by adjusting the SpaceHeight property. The default value is 7 (pixels).

•	Finally, you can store/restore the ExpressSideBar™ states in the Windows Registry, by setting the registry path in the RegistryPath property and setting the SaveToRegistry property to True.


ExpressSideBar: Resource Strings

See Also

This section describes resource strings used by the ExpressSideBar.  See Resource Strings for general information.

Each time an ExpressSideBar control needs a resource string for display, it calls the dxSideBarGetResourceString function.  You can replace default resource strings at runtime, using the cxSetResourceString procedure.  In this instance, you also need to specify the dxSideBarGetResourceString function, to call the cxGetResourceString function to retrieve resource strings.  To do this, assign the cxGetResourceString function to the dxSideBarGetResourceStringFunc variable, as shown below.

// Delphi

uses

  dxsbstrs, cxClasses;

// ...

initialization

  dxSideBarGetResourceStringFunc := cxGetResourceString;

The resource strings used by ExpressSideBar are declared in the dxsbstrs unit.

Resource identifier	Value	Description
DXSB_DEFAULTGROUPCAPTION	'New Group'	The default caption of a newly created group.
DXSB_CUSTOMIZECLOSEBUTTON	'Close'	The Close button's caption in the Customizing form.

Group Popup Menu

#	Resource identifier	Value
1	DXSB_LARGEICONTYPE	'Large Icons'
2	DXSB_SMALLICONTYPE	'Small Icons'
3	DXSB_ADDGROUP	'Add Group'
4	DXSB_REMOVEGROUP	'Remove Group'
5	DXSB_RENAMEGROUP	'Rename Group'
6	DXSB_CUSTOMIZE	'Customize...'

Item Popup Menu

#	Resource identifier	Value
1	DXSB_REMOVEITEM	'Remove ShortCut'
2	DXSB_RENAMEITEM	'Rename ShortCut'


Unit dxsbar

Controls

TdxSideBar

Visible components

TdxSideBarStore

TdxSideBarPopupMenu

Invisible components

TdxStoredSideItem

Objects

TdxSideBarItem

TdxSideBarItems

TdxSideGroup

TdxSideGroups

Variables

dxSideBarDragObject


TdxSideBar
TdxSideBar Object

Hierarchy          Properties           Methods           Events

The TdxSidbar control is a VCL implementation of the sidebar element used in many commercial software applications.

Unit

dxsbar

Description

The TdxSideBar is used to create an ExpressSideBar control.  Groups of a TdxSideBar are TdxSideGroup objects.  A user selects a group by clicking a group's button which appears at the top or bottom of the control.

To add a new (delete or edit an existing) group to a TdxSideBar control at design time use its component editor or TdxSideBarStore component.


Hierarchy

TCustomControl

     |


TdxSideBar Properties

TdxSideBar               Legend

In TdxSideBar

ActiveGroup

EditControl

EditingGroup

EditingItem

FocusedItem

GroupCount

IsMakingUpdate

SelectedItem

BkGround

BkPicture

CanSelected

GroupFont

Groups

GroupHeightOffSet

ActiveGroupIndex

GroupPopupMenu

ItemFont

ItemPopupMenu

LargeImages

PaintStyle

SmallImages

ScrollDelay

SpaceHeight

Store

TransparentImages

RegistryPath

StoreInRegistry


TdxSideBar Methods

TdxSideBar

In TdxSideBar

GetGroupAtPos

GetItemAtPos

GetPopupGroup

IsGroupEditing

IsItemEditing

IsEditing

EditGroup

EditItem

EndEdit

GetSmallImages

GetLargeImages

LoadFromRegistry

SaveToRegistry

XPBackgroundColor


TdxSideBar Events

TdxSideBar               Legend

In TdxSideBar

OnItemClick

OnDeleteItem

OnChangeActiveGroup

OnChangeFocusedItem

OnChangeGroupCaption

OnDeleteItem

OnChangeSelectedItem

OnAfterEdit

OnBeforeEdit

OnDragDropItem


TdxSideBar.BkGround

TdxSideBar            See Also

Specifies the background color of a TdxSideBar control.

type

  TdxSideBarFillStyle = (bfsNone, bfsHorz, bfsVert);

  TdxSideBarBackGround = class(TPersistent);

published

  property BeginColor: TColor;

  property EndColor: TColor;

  property FillStyle: TdxSideBarFillStyle;

end;

property BkGround : TdxSideBarBackGround;

Description

The following fill styles are available:

bfsNone	There is no background color.
bfsHorz	Background color changes horizontally from BeginColor to EndColor.
bfsVert	Background color changes vertically from BeginColor to EndColor.
Note: Use the BkPicture property to paint the picture as background of the control.


TdxSideBar.BkPicture

TdxSideBar            See Also

Specifies the background picture of a TdxSideBar control.

property BkPicture: TPicture;

Note: Use BkGround to change the background color of the control.


TdxSideBar.CanSelected

TdxSideBar            See Also

Determines whether a selected item (the last shortcut pressed with a mouse) remains depressed once focus moves away from an item.

property CanSelected : Boolean;

Description

Set this property to True to force a selected item to remain depressed once focus moves away from an item.

The default value of the CanSelected property is False.


TdxSideBar.GroupFont

TdxSideBar            See Also

Represents Caption font attributes for a Group’s button.

property GroupFont: TFont;

Description

To change font, specify a new TFont object.  To modify a font, change the value of Color, Height, Name, Pitch, Size, or Style properties of the TFont object.


TdxSideBar.Groups

TdxSideBar            See Also

Represent an indexed array of all groups in TdxSideBar.

property Groups: TdxSideGroups;

Description

Use this property to directly access a particular group in a TdxSideBar control.  For example, use Groups to change IconType of individual pages in TdxSideBar.  Specify a group to access by using Index; where 0 specifies the first group, 1 specifies the second group, etc.  Each group is a TdxSideGroup object.

Example

Clicking Button1 changes IconType of every other group to dxsgSmallIcon.

procedure TForm1.Button1Click(Sender: TObject);

Var

 I : Integer;

begin

 for I := 0 to dxSideBar1.GroupCount – 1 do

   if(I mod 2 = 1) then

     dxSideBar1.Groups[I].IconType := dxsgSmallIcon;

end;


TdxSideBar.GroupHeightOffSet

TdxSideBar            See Also

Specifies the height of a group.

property GroupHeightOffSet : Integer;

Description

Use GroupHeightOffSet to specify the height of a group.

[group height] = [group font height] + 2 * GroupHeightOffSet.

If 0, group height equals [group font height] + 4 for standard paint style and [group font height] + 6 for flat paint style.  Default value = 0.


TdxSideBar.ActiveGroupIndex

TdxSideBar            See Also

Represents the index of a group whose items are currently displayed in TdxSideBar.

property ActiveGroupIndex: Integer;

Description

Use ActiveGroupIndex to determine the number of a group currently selected by a user.  A user selects a group by clicking the mouse on the group's button.  Set ActiveGroupIndex to display a group's items whose indexes equal ActiveGroupIndex.

Example:

This example sets ActiveGroup to the first or last group in the Groups list of TdxSideBar.

procedure Form1.Button1Click(Sender : TObject);

begin

 if(dxSideBar1.ActiveGroupIndex = 0) then

 dxSideBar1.ActiveGroupIndex := dxSideBar1.GroupCount – 1

 else dxSideBar1.ActiveGroupIndex := 0;

end;


TdxSideBar.GroupPopupMenu

TdxSideBar            See Also

Identifies the pop-up menu associated with groups.

property GroupPopupMenu: TPopupMenu;

Description

Assign a value to GroupPopupMenu to call a pop-up menu when a user selects a group and presses the right mouse button within that group.  Use the GetPopupGroup method and the OnPopup event of the popup menu to determine the group on which the popup menu appears.

Example:

This example determines the group wherein a popup menu appears.

procedure TForm1.PopupMenu1Popup(Sender: TObject);

begin

 ShowMessage(dxSideBar1.GetPopupGroup.Caption);

end;


TdxSideBar.ItemFont

TdxSideBar            See Also

Represents font attributes of an item’s label.

property ItemFont : TFont;

Description

To modify a Font, change the values of the Color, Height, Name, Pitch, Size, or Style properties of the TFont object.


TdxSideBar.ItemPopupMenu

TdxSideBar            See Also

Identifies the pop-up menu associated with items.

property ItemPopupMenu : TPopupMenu;

Description

Assign a value to ItemPopupMenu to call a pop-up menu when a user selects an item and presses the right mouse button.  Use FocusedItem and the OnPopup event of the popup menu to determine the item on which the popup menu appears.

Example:

This example determines the item on which a popup menu appears.

procedure TForm1.PopupMenu1Popup(Sender: TObject);

begin

   if (dxSideBar1.FocusedItem <> nil) //the focused item may be nil

   ShowMessage(dxSideBar1.FocusedItem.Caption);

end;


TdxSideBar.LargeImages

TdxSideBar            See Also

Provides a list of images to display for each TdxSideBar item when active group’s IconType equals dxsgLargeIcon.

property LargeImages: TCustomImageList;

Description

Set this property to specify bitmaps to display above an item’s caption in TdxSideBar when the active group’s IconType equals dxsgLargeIcon.  Use the TdxSideBar component editor to associate images with specific sidebar items.

Note: If you use the TdxSideBarStore component (the TdxSideBar.Store property for runtime customization and restoration of control properties), you must assign an image list to TdxSideBarStore.LargeImages and leave the TdxSideBar.LargeImages property empty.


TdxSideBar.PaintStyle

TdxSideBar          See Also

Determines the paint style of a TdxSideBar control.

type

  TdxsbPaintStyle = (sbpsStandard, sbpsFlat, sbpsXP, sbpsW2K);

property PaintStyle : TdxsbPaintStyle;

Description

The table below lists values available for the PaintStyle property, provides their descriptions and examples.

Value	Description	Example
sbpsStandard	Group buttons are painted with the standard 3D look. Once pressed, Group buttons are not depressed. Once pressed, Item buttons are depressed.
SbpsFlat	Group buttons are painted with a flatter look. Once pressed, Group buttons are depressed. Once pressed, Item buttons are depressed.
SbpsXP	Group buttons are painted with a flatter look. Once pressed, Group buttons are depressed. Item buttons are highlighted like MS Office XP™ when the cursor is above an Item button.
sbpsW2K	Group buttons are painted with a flatter look. Once pressed, Group buttons and Item buttons are depressed. Group buttons and Item buttons are painted raised when hot-tracked.


TdxSideBar.XPBackgroundColor

TdxSideBar          See Also

Returns the appropriate background color for an item when applying the Office XP™ style of a TdxSideBar control.

class function XPBackgroundColor: TColor;

Description

Call the XPBackgroundColor method to return the appropriate background color for an item.  This color is used when applying the Office XP™ style and depends upon current system button color.


TdxSideBar.SmallImages

TdxSideBar            See Also

Provides a list of icon images for each item in TdxSideBar when an active group’s IconType equals dxsgSmallIcon.

property SmallImages: TCustomImageList;

Description

Set this property to specify bitmaps to use above an item’s caption in TdxSideBar.

Use the TdxSideBar component editor to associate images with sidebar items.

Note: If you use the TdxSideBarStore component (TdxSideBar.Store property for runtime customization and restoration of control properties) you must assign an image list to TdxSideBarStore.SmallImages and leave the TdxSideBar.SmallImages property empty.


TdxSideBar.ScrollDelay

TdxSideBar

Determines, in milliseconds, the delay invoked when scrolling items in an active group when a user presses the up-down scroll buttons or performs Drag & Drop operations.

property ScrollDelay : Integer;

Description

Use this property to determine the delay in milliseconds invoked when scrolling items in an active group.  Default value = 300 (0.3 second).


TdxSideBar.SpaceHeight

TdxSideBar

Determines the distance in pixels between items.

property SpaceHeight : Integer;

Description

Use SpaceHeight to determine the distance in pixels between items.  Default value = 7


TdxSideBar.Store

TdxSideBar            See Also

Determines the TdxSideBarStore of TdxSideBar.

property Store : TdxSideBarStore;

Description

Use Store to specify a TdxSideBarStore for TdxSideBar.  You must use the TdxSideBarStore component to enable end user runtime customization within an application.

SideBar customization allows end users to easily remove and or add SideBar items at run time, by calling the ExpressSideBar customization window.  You can specify the set of SideBar items, but make visible only a subset.  End-user may then decide which items to make available as their needs warrant.

SideBar items have a StoredItem property, which determines the TdxStoredSideItem component.

Note: All groups of TdxSideBar are deleted when changing the Store property.


TdxSideBar.TransparentImages

TdxSideBar

Determines whether TdxSideBar draws images using a mask regardless of Color settings.

property TransparentImages : Boolean;

Description

Set this property to True to draw images using a mask regardless of Color.  Default value = False.


TdxSideBar.RegistryPath

TdxSideBar            See Also

Specifies the registry path wherein to save TdxSideBar configurations when the StoreInRegistry property equals True.

property RegistryPath : String;

Description

Use RegistryPath to specify a registry path for saving configurations of TdxSideBar.  Activate the StoreInRegistry property to allow the saving and restoration to and from the registry for TdxSideBar.


TdxSideBar.StoreInRegistry

TdxSideBar            See Also

Determines whether the configurations of TdxSideBar are stored in the registry.

property StoreInRegistry : Boolean;

Description

Set the RegistryPath property and activate the StoreInRegistry property to allow a TdxSideBar to save and restore its configuration to/from the registry using RegistryPath.


TdxSideBar.ActiveGroup

TdxSideBar            See Also

Represents the group whose items are currently displayed within TdxSideBar.

property ActiveGroup: TdxSideGroup;

Description

Use ActiveGroup to determine which group is selected by a user.  Users select groups by clicking their mouse on a group button.  Set ActiveGroup to display the items within a group. Only one group may be active at any given time.

RunTime Only

Example

This example allows users to select the ActiveGroup property by using a ComboBox item.  During form creation, the Combo Box control is loaded with captions of each of the groups, as well as instance pointers to the corresponding group.  When the user selects the Combo Box item, the associated TdxSideGroup object contained in the Combo Box Objects array is used to set the ActiveGroup property.

procedure TForm1.FormCreate(Sender: TObject);

var

 I: integer;

begin

  for I := 0 to dxSideBar1.GroupCount - 1 do

    ComboBox1.Items.AddObject(dxSideBar1.Groups[I].Caption,

      dxSideBar1.Groups[I]);

  if(dxSideBar1.GroupCount > 0) then

  ComboBox1.ItemIndex := 0;

end;

procedure TForm1.ComboBox1Change(Sender: TObject);

begin

 if (Sender is TComboBox) then

 with (Sender as TComboBox) do

  dxSideBar1.ActiveGroup := TdxSideGroup(Items.Objects[ItemIndex]);

end;


TdxSideBar.EditControl

TdxSideBar            See Also

Represents the edit control used by TdxSideBar to edit a group or a shortcut.

property EditControl : TEdit;

Description

Use this property to access an instance of the edit control used by TdxSideBar to edit a group or shortcut.  It is created before and disposed of after editing.  Use OnBeforeEdit to perform special actions on this control, e.g. to assign the OnKeyDown or OnKeyPress handlers.

ReadOnly Property


TdxSideBar.EditingGroup

TdxSideBar            See Also

Represents the current editing group.

property EditingGroup : TdxSideGroup;

Description

Use this property to access the current editing group.  If a user is not editing a group, it returns nil.

ReadOnly Property


TdxSideBar.EditingItem

TdxSideBar            See Also

Provides access to the item being edited.

property EditingItem : TdxSideBarItem;


TdxSideBar.FocusedItem

TdxSideBar            See Also

Represents an item with current focus.

property FocusedItem : TdxSideBarItem;

Description

Read FocusedItem to determine the item selected by a user.  A user selects an item by moving the mouse over the group region.  If no items are selected, FocusedItem is nil.

ReadOnly Property

Example

This example determines which item is selected with the mouse and displays its caption as a form’s caption.

procedure TForm1.dxSideBar1ChangeFocusedItem (Sender: TObject);

begin

 if (dxSideBar1.FocusedItem <> nil) then

 Caption := dxSideBar1.FocusedItem.Caption

 else Caption := ’’;

end;


TdxSideBar.GroupCount

TdxSideBar            See Also

Represents the number of groups in a TdxSideBar object.

property GroupCount : Integer;

Description

Use GroupCount to determine the number of groups listed by the Groups property.

ReadOnly Property


TdxSideBar.IsMakingUpdate

TdxSideBar

Determines whether a TdxSideBar control is locked and not repainted.

property IsMakingUpdate : Boolean;

Description

Set this property to True, to prevent repaint operations of a TdxSideBar control.  Use this property when adding/deleting groups and items in TdxSideBar.

Note: Make certain to set IsMakingUpdate to False when you finish updating the control. Use a try – finally construction.


TdxSideBar.SelectedItem

TdxSideBar            See Also

Specifies a selected item (i.e. the last shortcut clicked with a mouse).

property SelectedItem: TdxSideBarItem;

Description

Use SelectedItem to determine the last shortcut clicked with a mouse.  SelectedItem remains as a flat button.  If CanSelected is False, then SelectedItem is always nil.  You can also change SelectedItem programmatically.


TdxSideBar.GetGroupAtPos

TdxSideBar            See Also

Returns the group located at a specified position within TdxSideBar.

TPoint = record

 X: Longint;

 Y: Longint;

end;

function GetGroupAtPos(p: TPoint): TdxSideGroup;

Description

Use GetGroupAtPos when you wish to know which group is at a specified location within TdxSideBar.

Specify the position in client coordinates as the value of the p parameter; p can be anywhere within the boundaries of a group.  If there is no group at a specified position, GetGroupAtPos returns nil.


TdxSideBar.GetItemAtPos

TdxSideBar            See Also

Returns an item located at a specified position within TdxSideBar.

TPoint = record

 X: Longint;

 Y: Longint;

end;

function GetItemAtPos(p: TPoint): TdxSideBarItem;

Description

Use GetItemAtPos when you wish to discover which item is at a specified location within TdxSideBar.

Specify the position in client coordinates as the value of the p parameter; p can be anywhere within the boundaries of an item.  If there is no item at a specified position, GetItemAtPos returns nil.

Note: To retrieve an item from current cursor position, use the FocusedItem property.


TdxSideBar.GetPopupGroup

TdxSideBar            See Also

Determines the currently selected group.

function GetPopupGroup: TdxSideGroup;

Description

Use GetPopupGroup to determine the currently selected group.  If the mouse is in the "item’s" area, the function returns ActiveGroup.  Use the GetPopupGroup method and the OnPopup event of the Group popup menu to determine the group on which a popup menu appears.


TdxSideBar.IsGroupEditing

TdxSideBar            See Also

Determines whether a group of TdxSideBar is currently being edited.

function IsGroupEditing : Boolean;

Description

Use IsGroupEditing to determine if a TdxSideGroup is currently being edited.

If a group is being edited IsGroupEditing returns True, otherwise returns False.

Note: Only one group or item can be edited at any given point in time.


TdxSideBar.IsItemEditing

TdxSideBar            See Also

Determines whether an item of TdxSideBar is currently being edited.

function IsItemEditing : Boolean;

Description

Use IsItemEditing to determine if a TdxSideBarItem is currently being edited.

If any item is currently being edited, IsItemEditing returns True, otherwise returns False.

Note: Only one group or item can be edited at any given point in time.


TdxSideBar.IsEditing

TdxSideBar            See Also

Determines whether an item or group of TdxSideBar is currently being edited.

function IsEditing : Boolean;

Description

Use IsEditing to determine if an item or group of TdxSideBar is currently being edited.

If any item or group is currently being edited, IsEditing returns True, otherwise returns False.

Note: Only one group or item can be edited at any given point in time.

Example

This code will prevent a form from closing when a user presses Enter on an item being edited or on the group caption of TdxSideBar.

procedure TForm1.Button1Click(Sender: TObject);

begin

 if(Bar.IsEditing) then begin

 ModalResult := mrNone;

 Bar.EndEdit(True);

 end;

end;


TdxSideBar.EditGroup

TdxSideBar            See Also

Begins editing of a TdxSideGroup.

procedure EditGroup(Group: TdxSideGroup);

Description

Use EditGroup to immediately begin editing a particular group.  The Group parameter represents the group to be edited.

Example:

This code will edit a group on which a group popup menu appears.

var

 PopupMenuGroup : TdxSideGroup;

procedure TForm1.GroupPopupMenuPopup(Sender: TObject);

begin

 PopupMenuGroup := dxSideBar1.GetPopupGroup;

end;

procedure TForm1.PMIGroupEditClick(Sender: TObject);

begin

 dxSideBar1.EditGroup(PopupMenuGroup);

end;


TdxSideBar.EditItem

TdxSideBar            See Also

Begins editing of a TdxSideBarItem.

procedure EditItem(Item : TdxSideBarItem);

Description

Use EditItem to immediately begin editing a particular item.  The Item parameter represents the item to be edited.

Note: EditItem makes the item visible if it was invisible and changes the ActiveGroup property to make the group to which the item belongs Active.

Example:

This code will edit the item on which an Item Popup menu appears.

Var

 PopupMenuItem : TdxSideBarItem;

procedure TForm1.ItemPopupMenuPopup(Sender: TObject);

begin

 PopupMenuItem := TdxSideBar1.FocusedItem;

end;

procedure TForm1.PMIItemEditClick(Sender: TObject);

begin

 TdxSideBarBar1.EditItem(PopupMenuItem);

end;


TdxSideBar.EndEdit

TdxSideBar

Immediately cancels editing of a TdxSideBar group or label.

procedure EndEdit(Accept : Boolean);


TdxSideBar.GetSmallImages

TdxSideBar            See Also

Returns the image list used for small images in a TdxSideBar component.

function GetSmallImages: TCustomImageList;

Description

If a non null value, it returns the value of the TdxSideBar.SmallImages or TdxSideBarStore.SmallImages property.


TdxSideBar.GetLargeImages

TdxSideBar            See Also

Returns the image list used for large images in a TdxSideBar component.

function GetLargeImages: TCustomImageList;

Description

If a non null value, it returns the value of the TdxSideBar.LargeImages or TdxSideBarStore.LargeImages property.


TdxSideBar.LoadFromRegistry

TdxSideBar            See Also

Restores the configuration of a TdxSideBar control (items, groups) from the registry using the ARegistryPath path.

procedure LoadFromRegistry(ARegistryPath: string);

Description

Set the RegistryPath property and activate the StoreInRegistry property to allow the TdxSideBar to save and restore its configuration to/from the registry using RegistryPath automatically when creating (loading data from the stream) and destroying the control.


TdxSideBar.SaveToRegistry

TdxSideBar            See Also

Save the configuration of a TdxSideBar control (items, groups) to the registry using the ARegistryPath path.

procedure SaveToRegistry(ARegistryPath: string);

Description

Set the RegistryPath property and activate the StoreInRegistry property to allow saving and restoration of a TdxSideBar’s configuration automatically to/from the registry.


TdxSideBar.OnItemClick

TdxSideBar            See Also

Occurs when a user clicks a TdxSideBarItem.

type

  TdxSideBarItemClickEvent = procedure(Sender: TObject; Item: TdxSideBarItem) of object;

property OnItemClick : TdxSideBarItemClickEvent;

Example

In this example, Sidebar items are distinguished by the Tag property.

procedure TForm1.dxSideBar1ItemClick(Sender: TObject;

  Item: TdxSideBarItem);

begin

  case Item.Tag of

    0: ShowMessage('You have chosen the side item with Tag=0');

    10: ShowMessage('Hello');

    else ShowMessage('Unknown sidebar item. I''m Sorry, I don''t implement any action on this click');

  end;

end;


TdxSideBar.OnDeleteItem

TdxSideBar            See Also

Occurs before a TdxSideBarItem is removed.

type

  TdxSideBarDeleteItemEvent = procedure(Sender: TObject; Item: TdxSideBarItem) of object;

property OnDeleteItem : TdxSideBarDeleteItemEvent;

Description

The Item parameter represents the shortcut to be removed.


TdxSideBar.OnChangeActiveGroup

TdxSideBar            See Also

Occurs immediately after a new group is made active.

property OnChangeActiveGroup: TNotifyEvent;

Description

Write an OnChangeActiveGroup event handler to perform specific actions immediately after the active group is changed.

Example

This code fills a listbox with the item captions of the active group.

procedure TForm1.dxSideBar1ChangeActiveGroup(Sender: TObject);

var

 I : Integer;

begin

 ListBox1.Items.Clear;

 if(dxSideBar1.ActiveGroup <> Nil) then

 for I := 0 to dxSideBar1.ActiveGroup.ItemCount – 1 do

 ListBox1.Items.Add(dxSideBar1.ActiveGroup.Items[I].Caption);

end;


TdxSideBar.OnChangeFocusedItem

TdxSideBar            See Also

Occurs immediately after the FocusedItem property is changed.

property OnChangeFocusedItem: TNotifyEvent;


TdxSideBar.OnChangeGroupCaption

TdxSideBar            See Also

Occurs immediately after the Caption of a particular group is changed.

type

  TdxSideBarChangeGroupCaptionEvent = procedure(Sender: TObject; Group: TdxSideGroup) of object;

property OnChangeGroupCaption : TdxSideBarChangeGroupCaptionEvent;

Description

The Group parameter is the group whose caption has been changed.


TdxSideBar.OnChangeSelectedItem

TdxSideBar            See Also

Occurs immediately after the SelectedItem property is changed.

property OnChangeFocusedItem: TNotifyEvent;


TdxSideBar.OnAfterEdit

TdxSideBar            See Also

Occurs after a user completes editing a shortcut or a group.

property OnAfterEdit: TNotifyEvent;


TdxSideBar.OnBeforeEdit

TdxSideBar            See Also

Occurs before a user begins editing a shortcut or a group.

property OnBeforeEdit: TNotifyEvent;

Description

Use OnBeforeEdit to perform specific actions using EditControl, for instance to assign the OnKeyDown or OnKeyPress handler events.


TdxSideBar.OnDragDropItem

TdxSideBar            See Also

Occurs before drag & drop operations are finished successfully and a new shortcut is added or shortcut position is changed.

type

  TdxSideBarDragDropItemEvent = procedure(Sender: TObject; Source, Target: TdxSideBarItem; IsCopy: Boolean) of object;

property OnDragDropItem: TdxSideBarDragDropItemEvent;

Description

Write an OnDragDropItem event handler to perform specific actions before drag & drop operations are finished successfully and a new shortcut is added or shortcut position is changed.  The Source parameter is the drag & drop shortcut, Target is the newly created shortcut.  The IsCopy parameter determines whether the user has pressed the CTRL key.


TdxSideBarStore
TdxSideBarStore Object

Hierarchy          Properties           Methods

TdxSideBarStore is used by TdxSideBar controls.

Unit

dxsbar

Description

Use the TdxSideBarStore component to allow end user runtime customization in your applications.

SideBar customization allows end users to easily remove and or add SideBar items at run-time, by calling the ExpressSideBar customization window.  You can specify a set of the SideBar items, but make visible only a subset.  End-users may then determine the items to display to meet their specific needs.

TdxSideBarStore is the parent of TdxStoredSideItem components and contains the information about Large and Small images.

TdxSideBar uses the information to create items and display them to the user.  To create an item in a TdxSideBar control you must assign the TdxSideBar.Store property to TdxSideBarStore and TdxSideBarStore must contain at least one TdxStoredSideItem.  A TdxSideBarItem includes a StoredItem property which cannot be nil.  TdxSideBarStore can work with any number of TdxSideBar controls.

To create TdxSideBarItem at design time, double-click the TdxSideBarStore in your IDE.

For your convenience, you can group TdxStoredSideItem components in a TdxSideBarStore by categories.


Hierarchy

TComponent

     |


TdxSideBarStore Properties

TdxSideBarStore               Legend

In TdxSideBarStore

Categories

Count

DefaultLargeImage

DefaultSmallImage

Items

LargeImages

SmallImages

SideBarCount

SideBars


TdxSideBarStore Methods

TdxSideBarStore

In TdxSideBarStore

GetCountByCategory

GetItemByCategory

GetItemsByCategory

Customize


TdxSideBarStore.Categories

TdxSideBarStore            See Also

Represents a category name.

property Categories: TStrings;

Description

TdxSideBarStore contains TdxStoredSideItem components and divides them into categories.

Use Categories to add, insert, delete, and move categories.  Categories must always contain at least one category.

Note: You cannot delete a category which contains TdxStoredSideItem components.


TdxSideBarStore.DefaultLargeImage

TdxSideBarStore            See Also

Used to display the image of a TdxSideBarItem in LargeIcon view if the value of the LargeImage property of a corresponding TdxStoredSideItem is –1 or incorrect.

property DefaultLargeImage: Integer;

Description

Default value = –1


TdxSideBarStore.DefaultSmallImage

TdxSideBarStore            See Also

Used to display the image of a TdxSideBarItem in SmallIcon view if the value of the SmallImage property of a corresponding TdxStoredSideItem is –1 or incorrect.

property DefaultSmallImage: Integer;

Description

Default value = –1


TdxSideBarStore.LargeImages

TdxSideBarStore            See Also

Provides a list of icons for each item in TdxSideBar where the IconType of an active group equals dxsgLargeIcon.

property LargeImages: TCustomImageList;

Description

Each TdxStoredSideItem in TdxSideBarStore may be associated with a large bitmap in an image list by setting its LargeImage property.


TdxSideBarStore.SmallImages

TdxSideBarStore            See Also

Provides a list of icons for each item in TdxSideBar where the IconType of an active group equals dxsgSmallIcon.

property LargeImages: TCustomImageList;

Description

Each TdxStoredSideItem in TdxSideBarStore may be associated with a small bitmap in an image list by setting its SmallImage property.


TdxSideBarStore.Count

TdxSideBarStore            See Also

Count is the number of TdxStoredSideItems in a TdxSideBarStore object.

property Count: Integer;

Description

Use Count to determine the number of TdxStoredSideItems listed in the Items property.

ReadOnly Property

Example

This code example fills a listbox with the captions of TdxStoredSideItems.

procedure TForm1.Form1Create(Sender : TObject);

var

 I : Integer;

begin

 for I := 0 to dxSidebarStore1.Count – 1 do

   ListBox1.Items.Add(dxSidebarStore1.Items[I].Caption);

end;


TdxSideBarStore.Items

TdxSideBarStore            See Also

Provides indexed access to TdxStoredSideItems in a TdxSideBarStore object.

property Items[Index : Integer]: TdxStoredSideItem;

Description

Use this property to access a particular Item in a TdxSideBarStore component.  Specify the item to access using Index, where 0 specifies the first item, 1 specifies the second item, etc.  Each item is a TdxStoredSideItem component.

ReadOnly Property


TdxSideBarStore.SideBarCount

TdxSideBarStore            See Also

Represents the number of TdxSideBars having the Store property equal to the current TdxSideBarStore.

property SideBarCount : Integer;

ReadOnly Property


TdxSideBarStore.SideBars

TdxSideBarStore            See Also

Provides indexed access to all TdxSideBars having the Store property equal to the current TdxSideBarStore.

property SideBars[Index : Integer] : TdxSideBar;

ReadOnly Property


TdxSideBarStore.GetCountByCategory

TdxSideBarStore            See Also

Determines the number of TdxStoredSideItem which belong to a particular category.

function GetCountByCategory(St: string): Integer;

Description

Use this function to determine the number of TdxStoredSideItems that belong to a particular category.  The St parameter is the name of the category.

Example

This code example fills a combobox with the names of categories and a listbox with the captions of TdxStoredSideItem belonging to the category selected in the combobox.

procedure TForm1.Form1Create(Sender : TObject);

var

 I : Integer;

begin

 for I := 0 to dxSideBarStore1.Categories.Count – 1 do

   ComboBox1.Items.Add(dxSideBarStore1.Categories);

 ComboBox1.ItemIndex := 0;

 ComboBox1Click(ComboBox1);

end;

procedure TForm1.ComboBox1Click(Sender: TObject);

var

 List : TList;

 I : Integer;

 item : TdxStoredSideItem;

begin

 ListBox1.Items.Clear;

 List := TList.Create;

dxSideBarStore1.GetItemsByCategory(ComboBox1.Items[ComboBox1.ItemIndex], List);

 for I := 0 to List.Count - 1 do begin

   Item := TdxStoredSideItem(List[I]);

   ListBox1.Items.Add(Item.Caption)

 end;

 List.Free;

end;


TdxSideBarStore.GetItemByCategory

TdxSideBarStore            See Also

Returns a particular TdxStoredSideItem from a TdxSideBarStore.

function GetItemByCategory(St: string; Index: Integer): TdxStoredSideItem;

Description

The St parameter is the name of the category and Index is the number of the item in this category (the range is from 0 to GetCountByCategory - 1).


TdxSideBarStore.GetItemsByCategory

TdxSideBarStore            See Also

Retrieves a list of TdxStoredSideItem components which belong to a particular category.

function GetItemsByCategory(St: string; List: TList): Integer;

Description

Call this function to retrieve a list of TdxStoredSideItem components which belong to a particular category.  The list is returned as the List parameter.  The function returns the number of items in this list.


TdxSideBarStore.Customize

TdxSideBarStore

Activates the ExpressSideBar Customizing form.

procedure Customize;


TdxStoredSideItem
TdxStoredSideItem Object

Hierarchy          Properties           Events

TdxStoredSideItem is used by a TdxSideBarItem object.

Unit

dxsbar

Description

TdxStoredSideItem is a child of TdxSideBarStore components.  It contains information about Large and Small indexes of images, the default Caption, PopupMenu and the OnClick event.

TdxSideBar uses this information to create items and then display them (the Store property).  TdxSideBarItems have a StoredItem property.  This allows for creation of a TdxStoredSideItem with the same properties, and to use these predefined properties for different TdxSideBars.

For convenience, you can group TdxStoredSideItem components in a TdxSideBarStore using categories.


Hierarchy

TComponent

     |

TdxSideBarStore

     |


TdxStoredSideItem Properties

TdxStoredSideItem               Legend

In TdxStoredSideItem

Caption

Category

Hint

LargeImage

PopupMenu

SmallImage

Store


TdxStoredSideItem Events

TdxStoredSideItem               Legend

In TdxStoredSideItem

OnClick


TdxStoredSideItem.Caption

TdxStoredSideItem            See Also

Specifies text which identifies the StoredItem to users.

property Caption: string;

Description

This value is also copied to the Caption property of TdxSideBarItem which has the StoredItem property equal to the current TdxStoredSideItem.


TdxStoredSideItem.Category

TdxStoredSideItem            See Also

Specifies the index of a TdxSideBarStore category to which the current TdxStoredSideItem belongs.

property Category : Integer;


TdxStoredSideItem.Hint

TdxStoredSideItem            See Also

Specifies the hint for a Sidebar item which has the StoredItem property equal to the current TdxStoredSideItem.

property Hint : string;


TdxStoredSideItem.LargeImage

TdxStoredSideItem            See Also

Determines the image displayed as a large icon in TdxSideBar.

property LargeImage : Integer;

Description

Set this property to specify the large image displayed in a TdxSideBar for items having the StoredItem property equal to the current TdxStoredSideItem (If a group’s IconType equals dxsgLargeIcon).


TdxStoredSideItem.SmallImage

TdxStoredSideItem            See Also

Determines the image displayed as a small icon in TdxSideBar.

property SmallImage : Integer;

Description

Set this property to specify the small image displayed in a TdxSideBar for items having the StoredItem property equal to the current TdxStoredSideItem (If a group’s IconType equals dxsgSmallIcon).


TdxStoredSideItem.PopupMenu

TdxStoredSideItem            See Also

Identifies the popup menu associated with a TdxSideBarItem which has the StoredItem property equal to the current TdxStoredSideItem.

property PopupMenu : TPopupMenu;

Description

Assign a value to this property to enable a popup menu when a user selects an item and clicks the right mouse button over it.


TdxStoredSideItem.Store

TdxStoredSideItem            See Also

Provides access the TdxSideBarStore to which the current TdxStoredSideItem belongs.

property Store : TdxSideBarStore;

ReadOnly Property


TdxStoredSideItem.OnClick

TdxStoredSideItem            See Also

Occurs when a user clicks the TdxSideBarItem which has the StoredItem property equal to the current TdxStoredSideItem.

type

  TdxSideBarItemClickEvent = procedure(Sender: TObject; Item: TdxSideBarItem) of object;

property OnClick : TdxSideBarItemClickEvent;

Description

The Item parameter references the item that has been clicked.


TdxSideGroups
TdxSideGroups Object

Hierarchy          Properties           Methods

Represents a container for TdxSideGroup objects.

Unit

dxsbar

Description

TdxSideGroups maintains an index of columns in its Items array.  The Count property contains the number of columns in the collection.  At design time, use the TdxSideBar component editor to add, remove, or modify groups.


Hierarchy

TCollection

     |


TdxSideGroups Properties

TdxSideGroups

In TdxSideGroups

Items


TdxSideGroups Methods

TdxSideGroups

In TdxSideGroups

Add


TdxSideGroups.Items

TdxSideGroups            See Also

Provides an indexed access to groups in the collection.

property Items[Index: Integer]: TdxSideGroup;

Description

The Index parameter corresponds to the TdxSideGroup.Index property.  It represents the position of a group in a TdxSideBar control.


TdxSideGroups.Add

TdxSideGroups

Creates a new TdxSideGroup instance and adds it to the Items array.

function Add: TdxSideGroup;

Description

At design time, use the dxSideBar component editor to add groups.


TdxSideGroup
TdxSideGroup Object

Hierarchy          Properties           Methods

Represents a group in a TdxSideBar control.

Unit

dxsbar

Description

Each TdxSideBar uses TdxSideGroups to maintain a collection of TdxSideGroup objects.


Hierarchy

TCollectionItem

     |


TdxSideGroup Properties

TdxSideGroup               Legend

In TdxSideGroup

Active

Caption

ItemCount

IconType

Items

TopVisibleItem


TdxSideGroup Methods

TdxSideGroup

In TdxSideGroup

Assign

MakeActive

GetVisibleCount


TdxSideGroup.IconType

TdxSideGroup

Determines whether items of a group are displayed using a large or small icon.

type

  TdxSideGroupIconType = (dxsgLargeIcon, dxsgSmallIcon);

property IconType : TdxSideGroupIconType;

Description

If this property is set to dxsgLargeIcon, items of a group are displayed using large icons.  Otherwise, small icons are displayed.


TdxSideGroup.Items

TdxSideGroup            See Also

Represents an indexed array of all the TdxSideBarItem objects in the current group.

property Items : TdxSideBarItems;


TdxSideGroup.Active

TdxSideGroup            See Also

Determines whether the current TdxSideGroup object is active.

property Active : Boolean;

ReadOnly Property


TdxSideGroup.ItemCount

TdxSideGroup            See Also

Determines the number of TdxSideBarItems in a group.

property ItemCount : Integer;


TdxSideGroup.TopVisibleItem

TdxSideGroup            See Also

Determines the topmost visible item index of TdxSideBarItem.

property TopVisibleItem : Integer;

Run-Time ReadOnly Property


TdxSideGroup.Caption

TdxSideGroup            See Also

Specifies the text which identifies a group to a user.

property Caption : string;

Description

Use this property to associate a group with unique text in order to identify it to end-users.  The string’s value is displayed on the group button.


TdxSideGroup.Assign

TdxSideGroup

Copies the contents of the source group into a group.

procedure Assign(Source: TPersistent);

Description

Assign copies Caption, Items, IconType from the source object to a group.


TdxSideGroup.MakeActive

TdxSideGroup            See Also

Activates the current group in a TdxSideBar control.

procedure MakeActive;


TdxSideGroup.GetVisibleCount

TdxSideGroup            See Also

Determines the number of Items currently displayed in the ‘item area’ of TdxSideBar.

function GetVisibleCount : Integer;


TdxSideBarItems
TdxSideBarItems Object

Hierarchy          Properties           Methods

Represents a container for TdxSideBarItem objects.

Unit

dxsbar

Description

TdxSideBarItems maintains an indexed collection of TdxSideBarItems in its Items array.  The Count property contains the number of items in this collection.  At design time, use the dxSideBar component editor to add, remove, or modify items.


Hierarchy

TCollection

     |


TdxSideBarItems Properties

TdxSideBarItems

In TdxSideBarItems

Items


TdxSideBarItems Methods

TdxSideBarItems

In TdxSideBarItems

Add


TdxSideBarItems.Items

TdxSideBarItems            See Also

Provides indexed access to TdxSideBarItems in the collection.

property Items[Index : Integer]: TdxSideBarItem;

Description

The Index parameter corresponds to the TdxSideBarItem.Index property.  It represents the position of the sidebar item in the group object.


TdxSideBarItems.Add

TdxSideBarItems

Creates a TdxSideBarItem instance and adds it to the Items array.

function Add: TdxSideBarItem;

Description

At design time, use the dxSidebar component editor to add items.


TdxSideBarItem
TdxSideBarItem Object

Hierarchy          Properties           Methods

Represents an item in a TdxSideGroup.

Unit

dxsbar

Description

Each TdxSideGroup uses TdxSideBarItems to maintain a collection of TdxSideBarItem objects.


Hierarchy

TCollectionItem

     |


TdxSideBarItem Properties

TdxSideBarItem               Legend

In TdxSideBarItem

Caption

CustomData

Enabled

Group

Hint

IsDefault

ItemObject

LargeImage

SmallImage

StoredItem

Tag

Visible


TdxSideBarItem Methods

TdxSideBarItem

In TdxSideBarItem

Assign

MakeVisible


TdxSideBarItem.Caption

TdxSideBarItem            See Also

Specifies the text which identifies an item to a user.

property Caption: string;

Description

If IsDefault is equal to True and StoredItem is not nil, Caption is not stored in the *.dfm file and its value is retrieved from the TdxStoredSideItem.Caption property.


TdxSideBarItem.CustomData

TdxSideBarItem            See Also

Stores a string value as a part of the object.

property CustomData: string;

Description

This property is provided for convenience of storing an additional string value in the application for special needs.  For example, use the Custom property to recognize the object that has been clicked and perform a particular operation on the click event of the TdxSideBar control or associated TdxStoredSideItem component.


TdxSideBarItem.Hint

TdxSideBarItem            See Also

Specifies the hint for a sidebar item.

property Hint : string;

Description

If IsDefault is equal to True and StoredItem is not nil, Hint is not stored in the *.dfm file and its value is retrieved from the TdxStoredSideItem.Hint property.


TdxSideBarItem.IsDefault

TdxSideBarItem            See Also

Determines whether the Caption, Hint, LargeImage and SmallImage properties of an item are the same as the TdxStoredSideItem.Caption, TdxStoredSideItem.Hint, TdxStoredSideItem.LargeImage and TdxStoredSideItem.SmallImage properties.

property IsDefault : Boolean;

Description

Set this property to True to reset these properties to their default values.


TdxSideBarItem.LargeImage

TdxSideBarItem            See Also

Determines the large image displayed for a given item.

property LargeImage : Integer;

Description

Set LargeImage to determine the image displayed as a large icon for a specific item when IconType of a group equals dxsgLargeIcon.


TdxSideBarItem.SmallImage

TdxSideBarItem            See Also

Determines the small image displayed for a given item.

property SmallImage : Integer;

Description

Set SmallImage to determine the image displayed as a small icon for a specific item when IconType of a group equals dxsgSmallIcon.


TdxSideBarItem.StoredItem

TdxSideBarItem            See Also

Specifies a TdxStoredSideItem component for the current item.

property StoredItem: TdxStoredSideItem;

Description

The behavior of TdxSideBarItem depends on corresponding TdxStoredSideItem components:

Large and Small images, Item Popup Menu, Caption properties and the OnClick event.


TdxSideBarItem.Tag

TdxSideBarItem            See Also

Stores an integer value as a part of the object.

property Tag: Longint;

Description

This property is provided for the convenience of storing an additional integer value or pointer information for an application’s specific needs.


TdxSideBarItem.Enabled

TdxSideBarItem

Controls whether a sidebar item responds to mouse events.

property  Enabled : Boolean;

Description

To disable a sidebar item, set Enabled to False.  Disabled sidebar item draws its caption in gray and ignores mouse events.  Users may only drag & drop the disabled sidebar item (if DragMode is set to dmAutomatic).

To re-enable a sidebar item, set Enabled to True.  Default value = True.


TdxSideBarItem.Group

TdxSideBarItem            See Also

Determines the group to which a sidebar item belongs.

property Group : TdxSideGroup;

Description

Read Group to determine the group to which a sidebar item belongs.

Read Only


TdxSideBarItem.ItemObject

TdxSideBarItem            See Also

Contains a pointer to an application-defined object associated with a sidebar item.

property ItemObject: TObject;

Description

This property allows applications to quickly access information about an entity represented by a sidebar item.


TdxSideBarItem.Visible

TdxSideBarItem            See Also

Determines whether an item is currently displayed in the ‘item area’ of a TdxSideBar control.

property Visible : Boolean;

ReadOnly Property


TdxSideBarItem.Assign

TdxSideBarItem

Copies the contents of the source item to the current item.

procedure Assign(Source: TPersistent);

Description

Assign copies StoredItem, Caption, CustomData, Hint, IsDefault, LargeImage, SmallImage and Tag properties from the source object to an item.


TdxSideBarItem.MakeVisible

TdxSideBarItem            See Also

Makes an item visible.

function MakeVisible : Boolean;

Description

Call this function to make the item visible.  If the item’s group is inactive, MakeVisible activates it.


TdxSideBarPopupMenu
TdxSideBarPopupMenu Object

Hierarchy          Properties           Events

Encapsulates the properties, methods, and events of a popup menu and includes predefined menu items designed to function with TdxSideBar.

Unit

dxsbar

Description

Use TdxSideBarPopupMenu to define a popup menu which appears when a user clicks an item or a TdxSideBar group with the right mouse button.  To make a popup menu available, assign the TdxSideBarPopupMenu object to the TdxSideBar.GroupPopupMenu and TdxSideBar.ItemPopupMenu properties.


Hierarchy

TPopupMenu

     |


TdxSideBarPopupMenu Properties

TdxSideBarPopupMenu               Legend

In TdxSideBarPopupMenu

Options


TdxSideBarPopupMenu Events

TdxSideBarPopupMenu               Legend

In TdxSideBarPopupMenu

OnAfterClick

OnPopupClose


TdxSideBarPopupMenu.Options

TdxSideBarPopupMenu          See Also

Specifies the menu item visibility in all TdxSideBar popup menus.

type

  TdxSideBarPopupMenuOption = (sbmIconType, sbmAddGroup, sbmRemoveGroup, sbmCustomize, sbmRenameGroup, sbmRenameItem, sbmRemoveItem);

  TdxSideBarPopupMenuOptions = set of TdxSideBarPopupMenuOption;

property Options : TdxSideBarPopupMenuOptions;

Description

Options include:

Value	Meaning
sbmIconType	Both ‘Large Icon’ and ‘Small Icon’ menu items are included.  A user can change a group’s IconType by selecting one of these items.
sbmAddGroup	The ‘Add Group’ menu item is included.  A user can add a group by selecting this item.
sbmRemoveGroup	The ‘Remove Group’ menu item is included.  A user can remove the current group by selecting this item.
sbmCustomize	The ‘Customize’ menu item is included.  A user can activate the customization form by selecting this item.
sbmRenameGroup	The ‘Rename Group’ menu item is included.  A user can rename the current group by selecting this item.
sbmRenameItem	The ‘Rename Item’ menu item is included.  A user can rename the current TdxSideBarItem by selecting this item.
sbmRemoveItem	The ‘Remove Item’ menu item is included.  A user can remove the current TdxSideBarItem by selecting this item.


TdxSideBarPopupMenu.OnAfterClick

TdxSideBarPopupMenu

Occurs after a user clicks a popup menu item.

property OnAfterClick: TNotifyEvent;


TdxSideBarPopupMenu.OnPopupClose

TdxSideBarPopupMenu

Occurs after closing a popup menu.

property OnPopupClose: TNotifyEvent;


dxSideBarDragObject Variable

Used for generating custom Drag & Drop operations for a TdxSideBar control.

var dxSideBarDragObject: TdxSideBarDragObject;

Unit

dxsbar

Description

Use this variable if you wish to enable custom Drag & Drop operations.  You must create the variable at the beginning of the Drag event and destroy it when finished.

Example:

The following code allows you to drag a list box item (the values of the list box items are associated with TdxStoredSideItem) to TdxSideBar and create a new SideBar item using a predefined TdxStoredSideItem.

procedure TForm1.ListBox1StartDrag(Sender: TObject;

 var DragObject: TDragObject);

begin

 dxSideBarDragObject := dxSideBarDragObject.Create(ListBox1,   DragObject, Nil, dxSideBarStore.Items[ListBox1.ItemIndex]);

end;

procedure TForm1.ListBox1EndDrag(Sender, Target: TObject; X, Y: Integer);

begin

 dxSideBarDragObject.EndDrag(Target, X, Y);

end;


Legend

Protected

Published

ReadOnly


Unit dximctrl

Controls

TdxCustomImageListBox

TdxImageListBox

TdxCustomImageComboBox

TdxImageComboBox

TdxCustomSpinImage

TdxSpinImage

Objects

TdxSpinImageItem

TdxSpinImageItems


TdxCustomImageListBox

Hierarchy          Properties           Methods           Events

Represents a base class for ExpressImage list-box controls.

Unit

dximctrl

Description

Use TdxCustomImageListBox as a base class when defining a control which represents a Windows list box with images.  Do not create instances of TdxCustomImageListBox.  To place an image list box on a form, use a TdxCustomImageListBox descendant, such as TdxImageListBox or TdxDBImageListBox.


Hierarchy

TCustomListBox

     |


TdxCustomImageListBox Properties

TdxCustomImageListBox               Legend

In TdxCustomImageListBox

Alignment

ImageAlign

ImageIndexes

ImageList

MultiLines

Values

VertAlignment


TdxCustomImageListBox Methods

TdxCustomImageListBox               Legend

In TdxCustomImageListBox

AddItem

InsertItem

ExchangeItems

MoveItem

ValuesIndexOf


TdxCustomImageListBox Events

TdxCustomImageListBox               Legend

In TdxCustomImageListBox

OnDrawItem


TdxCustomImageListBox.Alignment

TdxCustomImageListBox            See Also

Manages horizontal placement of text within TdxCustomImageListBox.

type

  TAlignment = (taLeftJustify, taRightJustify, taCenter);

property Alignment : TAlignment;

Description

Options include:

Value	Meaning
taLeftJustify	Text appears aligned along the left edge of the item rectangle.
taRightJustify	Text appears aligned along the right edge of the item rectangle.
taCenter	Text is horizontally centered in the item rectangle.


TdxCustomImageListBox.ImageAlign

TdxCustomImageListBox            See Also

Manages placement of an image within TdxCustomImageListBox.

type

  TdxImageAlign = (dxliLeft, dxliRight);

property ImageAlign : TdxImageAlign;

Description

Set this property to specify how an item image is aligned within the item rectangle of TdxCustomImageListBox.  Options include:

Value	Meaning
dxliLeft	The image appears aligned at the left edge of the item rectangle.
dxliRight	The image appears aligned at the right edge of the item rectangle.


TdxCustomImageListBox.ImageList

TdxCustomImageListBox            See Also

Determines which image list to use for image display in TdxCustomImageListBox.

property ImageList: TCustomImageList;

Description

By setting the ImageIndexes property, each item in the control can be associated with a bitmap in this image list.


TdxCustomImageListBox.MultiLines

TdxCustomImageListBox            See Also

Specifies whether text wraps when it is too large for the width of the control.

property MultiLines : Boolean;

Description

Set this property to True to enable multi-line display of text within the control.  In this instance, text that is too large for an item rectangle wraps and continues on additional lines.  Otherwise, the text is truncated.


TdxCustomImageListBox.VertAlignment

TdxCustomImageListBox            See Also

Controls the vertical placement of text within TdxCustomImageListBox.

TVertAlignment = (tvaTop, tvaCenter, tvaBottom);

property VertAlignment : TVertAlignment;

Description

Options include:

Value	Meaning
taLeftJustify	Text appears aligned along the left edge of the item rectangle.
taRightJustify	Text appears aligned along the right edge of the item rectangle.
taCenter	Text is horizontally centered in the item rectangle.


TdxCustomImageListBox.ImageIndexes

TdxCustomImageListBox            See Also

ImageIndexes contains an array of image indexes.

property ImageIndexes[Index : Integer] : Integer;

Description

Use this property to determine the ImageIndex for a particular TdxCustomImageListBox item.

For example, the following code assigns the second image from the TdxCustomImageListBox.ImageList to the fourth item:

dxImageComboBox.ImageIndexes[3] := 1;


TdxCustomImageListBox.Values

TdxCustomImageListBox

Represents an array of strings each of which is associated with a TdxCustomImageListBox item.

property Values[Index : Integer] : string;

Description

Use this property to associate a particular item with a string value.

The following code snippet associates the second item with the string ‘MC’.

dxImageComboBox.Values[2] := ‘MC’; //Items[2] = ‘Master Card’


TdxCustomImageListBox.ValuesIndexOf

TdxCustomImageListBox

Returns the index of an item by its value.

function ValuesIndexOf(Text : string) : Integer;

Description

If no items exists with specified Text value, this function returns -1.


TdxCustomImageListBox.AddItem

TdxCustomImageListBox            See Also

Appends an item to the end of the list.

procedure AddItem(St: string; ImageIndex: Integer);

Description

You can add a new item by using the Items.Add and AddItem methods.  The following lines of code are equivalent:

// Items.Add

dxImageComboBox1.Items.Add(‘Item 1’);

dxImageComboBox1.ImageIndexes[dxImageComboBox1.Items.Count - 1] := 0;

// Items.AddItem

dxImageComboBox1.AddItem(‘Item 1’, 0);


TdxCustomImageListBox.InsertItem

TdxCustomImageListBox            See Also

Inserts an item to a specified position.

procedure InsertItem(Index: Integer; St: string; ImageIndex: Integer);

Description

You can insert a new item by using the Items.Insert and InsertItem methods.  The following lines of code are equivalent:

// Items.Insert

dxImageComboBox1.Items.Insert(Index, ‘Item 1’);

dxImageComboBox1.ImageIndexes[Index] := 0;

// Items.AddItem

dxImageComboBox1.InsertItem(Index, ‘Item 1’, 0);


TdxCustomImageListBox.ExchangeItems

TdxCustomImageListBox            See Also

Swaps items identified by the Index1 and Index2 parameters.

procedure ExchangeItems(Index1, Index2: Integer);

Description

This method is similar to Items.Exchange, except that ExchangeItems also changes the position of ImageIndexes and Values.


TdxCustomImageListBox.MoveItem

TdxCustomImageListBox            See Also

Changes the position of an item.

procedure MoveItem(CurIndex, NewIndex: Integer);

Description

Use this method to move an item at CurIndex position to the NewIndex position.  Positions are specified as zero-based indexes.

This method is similar to Items.Move, except that MoveItem also changes the position of ImageIndexes and Values.


TdxCustomImageListBox.OnDrawItem

TdxCustomImageListBox            See Also

Occurs whenever an item in an image list box needs to be redisplayed.

type

  TdxImageDrawItemEvent = procedure(Sender: TObject; Index: Integer; Rect: TRect) of object;

property OnDrawItem : TdxImageDrawItemEvent;

Description

The Index parameter is the position of an item in a list box.  Rect represents the area in the list box where an item is to be drawn.


TdxImageListBox
TdxImageListBox Object

Hierarchy

Represents an easy method for adding an image to a standard TListBox control.

Unit

dximctrl

Description

Use TdxImageListBox to display images from a list box control’s ImageList.  TdxImageListBox implements generic behavior introduced in TdxCustomImageListbox.


Hierarchy

TCustomListBox

     |

TdxCustomImageListBox

     |


TdxCustomImageComboBox
TdxCustomImageComboBox Object

Hierarchy          Properties           Methods           Events

Represents the base class for ExpressImage list-box controls.

Unit

dximctrl

Description

Use TdxCustomImageComboBox as a base class when defining a control which represents a Windows Combo box with images.  Do not create instances of TdxCustomImageComboBox.  To place an image combo box on a form, use a descendant of TdxCustomImageComboBox, such as TdxImageComboBox or TdxDBImageComboBox.


Hierarchy

TCustomListBox

     |


TdxCustomImageComboBox Properties

TdxCustomImageComboBox               Legend

In TdxCustomImageComboBox

Alignment

ImageAlign

ImageIndexes

ImageList

MultiLines

Values

VertAlignment


TdxCustomImageComboBox Methods

TdxCustomImageComboBox               Legend

In TdxCustomImageComboBox

AddItem

InsertItem

ExchangeItems

MoveItem

ValuesIndexOf


TdxCustomImageComboBox Events

TdxCustomImageComboBox               Legend

In TdxCustomImageComboBox

OnDrawItem


TdxCustomImageComboBox.Alignment

TdxCustomImageComboBox            See Also

Manages horizontal placement of text within TdxCustomImageComboBox.

type

  TAlignment = (taLeftJustify, taRightJustify, taCenter);

property Alignment : TAlignment;

Description

Options include:

Value	Meaning
taLeftJustify	Text appears aligned along the left edge of the item rectangle.
taRightJustify	Text appears aligned along the right edge of the item rectangle.
taCenter	Text is horizontally centered in the item rectangle.


TdxCustomImageComboBox.ImageAlign

TdxCustomImageComboBox            See Also

Manages placement of an image within TdxCustomImageComboBox.

type

  TdxImageAlign = (dxliLeft, dxliRight);

property ImageAlign : TdxImageAlign;

Description

Set this property to specify how an item image is aligned within the item rectangle of TdxCustomImageComboBox.  Options include:

Value	Meaning
dxliLeft	The image appears aligned at the left edge of the item rectangle.
dxliRight	The image appears aligned at the right edge of the item rectangle.


TdxCustomImageComboBox.ImageList

TdxCustomImageComboBox            See Also

Specifies the image list to use for image display in TdxCustomImageComboBox.

property ImageList: TCustomImageList;

Description

By setting ImageIndexes, each item in a control may be associated with a bitmap in this image list.


TdxCustomImageComboBox.MultiLines

TdxCustomImageComboBox            See Also

Specifies whether text wraps when it is too large for the width of the control.

property MultiLines : Boolean;

Description

Set this property to True to enable multi-line display of text within the control.  In this instance, text that is too large for an item rectangle wraps and continues on additional lines.  Otherwise, the text is truncated.


TdxCustomImageComboBox.VertAlignment

TdxCustomImageComboBox            See Also

Controls the vertical placement of text within TdxCustomImageComboBox.

TVertAlignment = (tvaTop, tvaCenter, tvaBottom);

property VertAlignment : TVertAlignment;

Description

Options include:

Value	Meaning
taLeftJustify	Text appears aligned along the left edge of the item rectangle.
taRightJustify	Text appears aligned along the right edge of the item rectangle.
taCenter	Text is horizontally centered in the item rectangle.


TdxCustomImageComboBox.ImageIndexes

TdxCustomImageComboBox            See Also

Contains an array of image indexes.

property ImageIndexes[Index : Integer] : Integer;

Description

Use this property to specify the ImageIndex for a particular item of TdxCustomImageComboBox.

The following code snippet assigns the second image from ImageList to the fourth item:

dxImageComboBox.ImageIndexes[3] := 1;


TdxCustomImageComboBox.Values

TdxCustomImageComboBox

Represents an array of strings each of which is associated with a TdxCustomImageComboBox item.

property Values[Index : Integer] : string;

Description

Use this property to associate a particular item with a string value.

The following code snippet associates the second item with the string ‘MC’

dxImageComboBox.Values[2] := ‘MC’; //Items[2] = 'Master Card'


TdxCustomImageComboBox.ValuesIndexOf

TdxCustomImageComboBox

Returns the index of an item by its value.

function ValuesIndexOf(Text : string) : Integer;

Description

If no items exists with specified Text value, this function returns -1.


TdxCustomImageComboBox.AddItem

TdxCustomImageComboBox            See Also

Appends an item to the end of a combo box.

procedure AddItem(St: string; ImageIndex: Integer);

Description

You can add a new item by using the Items.Add and AddItem methods.  The following lines of code are equivalent:

// Items.Add

dxImageComboBox1.Items.Add('Item 1');

dxImageComboBox1.ImageIndexes[dxImageComboBox1.Items.Count - 1] := 0;

// Items.AddItem

dxImageComboBox1.AddItem('Item 1', 0);


TdxCustomImageComboBox.InsertItem

TdxCustomImageComboBox            See Also

Inserts an item at a specified position.

procedure InsertItem(Index: Integer; St :String; ImageIndex: Integer);

Description

You can insert a new item by using the Items.Insert and InsertItem methods.  The following lines of code are equivalent:

// Items.Insert

dxImageComboBox1.Items.Insert(Index, ‘Item 1’);

dxImageComboBox1.ImageIndexes[Index] := 0;

// Items.AddItem

dxImageComboBox1.InsertItem(Index, ‘Item 1’, 0);


TdxCustomImageComboBox.ExchangeItems

TdxCustomImageComboBox            See Also

Swaps the position of two items in TdxCustomImageComboBox.

procedure ExchangeItems(Index1, Index2: Integer);

Description

This method is similar to Items.Exchange, except that ExchangeItems also changes the position of ImageIndexes and Values.


TdxCustomImageComboBox.MoveItem

TdxCustomImageComboBox            See Also

Changes the position of an item.

procedure MoveItem(CurIndex, NewIndex: Integer);

Description

Use this method to move an item at CurIndex position to the NewIndex position.  Positions are specified as zero-based indexes.

This method is similar to Items.Move, except that MoveItem also changes the position of ImageIndexes and Values.


TdxCustomImageComboBox.OnDrawItem

TdxCustomImageComboBox            See Also

Occurs whenever an item in an image combo box needs to be redisplayed.

type

TdxImageDrawItemEvent = procedure(Sender: TObject; Index: Integer; Rect: TRect) of object;

property OnDrawItem : TdxImageDrawItemEvent;

Description

The Index parameter is the position of an item in a list box.  Rect represents the area in the list box where an item is to be drawn.


TdxImageComboBox
TdxImageComboBox Object

Hierarchy

With TdxImageComboBox, you can easily add an image to a standard TComboBox control.

Unit

dximctrl

Description

Use TdxImageComboBox to display images from ListImage within a combo box control.  TdxImageComboBox implements generic behavior introduced in TdxCustomImageCombobox.


Hierarchy

TCustomListBox

     |

TdxCustomImageListBox

     |

TdxImageListBox

     |


TdxCustomSpinImage
TdxCustomSpinImage Object

Hierarchy          Properties           Methods           Events

TdxCustomSpinImage is the base class for ExpressSpinImage components.

Unit

dximctrl

Description

Use TdxCustomSpinImage as a base class when defining a control which represents an image control with spin buttons.  Images for a spin image control are drawn from an ImageList.  Users can change an image by pressing Up, Down, Home or End keys or by using the Up-Down control and mouse actions.  Do not create instances of TdxCustomSpinImage.  To place a spin image on a form, use TdxCustomSpinImage descendants, such as TdxSpinImage or TdxDBSpinImage.

Note: TdxCustomSpinImage does not use the TUpDown control and draws spinners and obtains messages in the non-client control area itself.


Hierarchy

TCustomControl

     |


TdxCustomSpinImage Properties

TdxCustomSpinImage               Legend

In TdxCustomSpinImage

AutoSize

DefaultImages

ImageHAlign

ImageList

ImageVAlign

ItemIndex

Items

ReadOnly

Stretch

UpDownAlign

UpDownOrientation

UpDownWidth

UseDblClick


TdxCustomSpinImage Methods

TdxCustomSpinImage               Legend

In TdxCustomSpinImage

Change

CanChange


TdxCustomSpinImage Events

TdxCustomSpinImage               Legend

In TdxCustomSpinImage

OnChange


TdxCustomSpinImage.AutoSize

TdxCustomSpinImage            See Also

Determines whether a spin control resizes to accommodate the image displayed.

property AutoSize: Boolean;

Description

Set this property to True to ensure that the entire image is visible within the spin image control.  When True, a spin image control is resized to accommodate the image specified by the ImageList property.  Otherwise, the spin image control keeps its original size regardless of image size.  If the spin image control is smaller than its image, only the portion of the picture that fits into the spin image control is visible.

Note: If you prefer to resize an image to fit within the spin image control, use the Stretch property instead.


TdxCustomSpinImage.DefaultImages

TdxCustomSpinImage            See Also

property DefaultImages : Boolean;

Description

Use this property to display the image when the ImageIndex is set to –1 or incorrect.


TdxCustomSpinImage.ImageHAlign

TdxCustomSpinImage            See Also

Specifies the horizontal placement of an image within a spin image control.

type

  TdxHSpinImageAlign = (hsiLeft, hsiCenter, hsiRight);

property ImageHAlign: TdxHSpinImageAlign;

Description

This property is used if the AutoSize and Stretch properties are set to False and the size of an image is smaller than the size of a spin image control.

Options include:

Value	Meaning
hsiLeft	The image appears at the left edge of the spin image control.
hsiCenter	The image appears in the center of the spin image control.
hsiRight	The image appears at the right edge of the spin image control.


TdxCustomSpinImage.ImageVAlign

TdxCustomSpinImage            See Also

Specifies the vertical placement of an image within a spin image control.

type

  TdxVSpinImageAlign = (vsiTop, vsiCenter, vsiBottom);

property ImageVAlign : TdxVSpinImageAlign;

Description

This property is used if the AutoSize and Stretch properties are set to False and the size of an image is smaller than the size of a spin image control.

Options include:

Value	Meaning
vsiTop	The image appears at the top edge of the spin image control.
vsiCenter	The image appears in the center of the spin image control.
vsiBottom	The image appears at the bottom edge of the spin image control.


TdxCustomSpinImage.ItemIndex

TdxCustomSpinImage            See Also

Specifies the index of a selected item within a spin image item list.

property ItemIndex : Integer;

Description

If no item is selected, the property value is -1, (-1 is the default value).  Users can change an image by pressing the Up, Down, Home or End keys or by using the Up-Down buttons.


TdxCustomSpinImage.ReadOnly

TdxCustomSpinImage            See Also

Determines whether users can change the ImageIndex value of a spin image control.

property ReadOnly : Boolean;

Description

If this property is set to True, the spin image control can only display the image associated with the current item.  Otherwise, the spin image control can be used to select a particular item.


TdxCustomSpinImage.Stretch

TdxCustomSpinImage            See Also

Resizes the image specified by ImageList so that it exactly fits to the spin image control.

property Stretch : Boolean;

Description

Set this property to True to draw an image with the size and shape of a spin image control.  When the spin image control is resized, the image is also resized.  Stretch resizes the height and width of the image independently.  Unlike simple scaling, Stretch can distort the image if the spin image control is not of the same shape as the image.

Note: To resize the control rather than the image, use the AutoSize property instead.


TdxCustomSpinImage.UpDownAlign

TdxCustomSpinImage            See Also

Specifies the position of the up-down control relative to the image control of the spin image.

type

  TdxUpDownAlign = (udaBottom, udaLeft, udaRight, udaTop);

property UpDownAlign: TdxUpDownAlign;

Description

Options include:

Value	Meaning
udaBottom	The control appears at the top edge of an image.
udaLeft	The control appears at the left edge of an image.
udaRight	The control appears at the right edge of an image.
udaTop	The control appears at the bottom edge of an image.


TdxCustomSpinImage.UpDownOrientation

TdxCustomSpinImage            See Also

Determines the orientation of Up Down arrow buttons

type

  TdxsiOrientation = (udHorizontal, udVertical);

property UpDownOrientation: TdxsiOrientation;

Description

Options include:

Value	Meaning
udHorizontal	Arrow buttons point to the left and right and appear side by side.
udVertical	Arrow buttons are stacked vertically and point up/down.


TdxCustomSpinImage.UpDownWidth

TdxCustomSpinImage

Determines the width of Up/Down arrows in pixels.

property UpDownWidth: Integer;

Description

Default value = 16.


TdxCustomSpinImage.UseDblClick

TdxCustomSpinImage

Determines whether the index in a spin image control changes on mouse double click events.

property UseDblClick: Boolean;

Description

Set this property to True to allow end-users to change the index in a spin image control via double clicks.  Default value = True.


TdxCustomSpinImage.ImageList

TdxCustomSpinImage            See Also

Determines the image list used for image display in a spin image control.

property ImageList: TCustomImageList;

Description

If this property is set, each item in a control may be associated with a bitmap using this image list.


TdxCustomSpinImage.Items

TdxCustomSpinImage            See Also

Provides indexed access to all items in TdxCustomSpinImage.

property Items: TdxSpinImageItems;


TdxCustomSpinImage.Change

TdxCustomSpinImage            See Also

Generates an OnChange event.

procedure Change; virtual;

Description

Override this method to perform additional processing when the ImageIndex changes in a spin image control.

Note: While overriding the Change method, make certain to call the inherited Change method.


TdxCustomSpinImage.CanChange

TdxCustomSpinImage

Returns True if a spin image control can change the ImageIndex property.

function CanChange : Boolean; virtual;

Description

Note: When overriding the CanChange method, make certain to call the inherited CanChange method.


TdxCustomSpinImage.OnChange

TdxCustomSpinImage            See Also

Occurs when the value of ItemIndex is about to be changed.

type

  TdxSIChange = procedure(Sender: TObject; ItemIndex: Integer) of object;

property OnChange: TdxSIChange;

Description

The ItemIndex parameter represents the new value of the ItemIndex property.


TdxSpinImage
TdxSpinImage Object

Hierarchy

Represents an image control with Up/Down buttons.

Unit

dximctrl

Description

Images for a spin image control are obtained from an ImageList.  User can change an image by pressing the Up, Down, Home or End keys or by using the Up-Down buttons.  TdxSpinImage implements generic behavior introduced in TdxCustomSpinImage.

Note: TdxSpinImage does not use the TUpDown control and draws spinners and obtains messages in the non-client control area itself.


Hierarchy

TCustomControl

     |

TdxCustomSpinImage

     |


TdxSpinImageItems
TdxSpinImageItems Object

Hierarchy          Properties           Methods

Maintains a list of items in a spin image control.

Unit

dximctrl

Description

The Items property of the spin image control is a TdxSpinImageItem object and maintains a collection of items in a spin image.  Items can be added, deleted, inserted and moved within the spin image.  You can access the nodes in a spin image via the Items property of the spin image.


Hierarchy

TCollection

     |


TdxSpinImageItems Properties

TdxSpinImageItems

In TdxSpinImageItems

Items


TdxSpinImageItems Methods

TdxSpinImageItems

In TdxSpinImageItems

Add

IndexOf


TdxSpinImageItems.Items

TdxSpinImageItems

Provides indexed access to all tree nodes managed by the TdxSpinImageItems object.

property Items[Index : Integer]: TdxSpinImageItem;


TdxSpinImageItems.Add

TdxSpinImageItems

Adds a new item to a spin image control.

function Add: TdxSpinImageItem;


TdxSpinImageItems.IndexOf

TdxSpinImageItems          See Also

Returns the index of the first entry in the Items array with the specified Value.

function IndexOf(Value : string): Integer;


TdxSpinImageItem
TdxSpinImageItem Object

Hierarchy          Properties

Describes an individual item in a spin image control.

Unit

dximctrl

Description

Each item in a spin image control is associated with a Value and optional image and hint referenced by the ImageIndex and Hint properties.


Hierarchy

TCollectionItem

     |


TdxSpinImageItem Properties

TdxSpinImageItem               Legend

In TdxSpinImageItem

ImageIndex

Hint

Value


TdxSpinImageItem.ImageIndex

TdxSpinImageItem

Specifies the image from an ImageList to display for a spin image item.

property ImageIndex: Integer;


TdxSpinImageItem.Hint

TdxSpinImageItem

Specifies the text string which appears when a user selects a specific item.

property Hint: string;


TdxSpinImageItem.Value

TdxSpinImageItem

Stores string values as part of the object.

property Value: string;

Description

The Value property is provided for convenient storage of additional string values for unique application needs.  For instance, you can use this property to recognize a clicked object and perform specific operations on the click event of the spin image control.