Copyright: Copyright © 1998-2006 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 maniuplate 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 ImageList 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 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, Large and Small images, Custom Data 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 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 ImageList 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 LargeImages and SmallImages of the TdxSideBarStore 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 Store property of the ExpressSideBar 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 SideBar 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 GroupPoupMenu 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 Scroll delay 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.


Unit dxsbar

Controls

TdxSideBar

Visible components

TdxSideBarStore

TdxSideBarPopupMenu

Invisible components

TdxStoredSideItem

Objects

TdxSideBarItem

TdxSideBarItems

TdxSideGroup

TdxSideGroups

Variables

dxSideBarDragObject


TdxSideBar

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

    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

GetGroupAtPos

GetItemAtPos

GetPopupGroup

IsGroupEditing

IsItemEditing

IsEditing

EditGroup

EditItem

EndEdit

GetSmallImages

GetLargeImages

LoadFromRegistry

SaveToRegistry

XPBackgroundColor


TdxSideBar Events

TdxSideBar               Legend

   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

Use BkGround to change the background color of a TdxSideBar control.

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;

Description

Use BkPicture to specify the background picture of a TdxSideBar control.

Note: Use BkColor 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 CanSelected to True to force a selected item to remain depressed once focus moves away from an item.  Default value = 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 Groups to directly access a particular group in a TdxSideBar control.  For example, use Groups to change IconStyle 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 IconStyle 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].IconStyle := 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

Read 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 change Font, specify a new TFont object.  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 item in TdxSideBar when active group IconStyle equals dxsgLargeIcon.

property LargeImages: TImageList;

Description

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

Note: If you use the TdxSideBarStore component (Store property of the TdxSideBar control for runtime customization and restoration of control properties), you must assign an ImageList to LargeImages of TdxSideBarStore and leave the LargeImages property of the TdxSideBar control 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 IconStyle equals dxsgSmallIcon.

property SmallImages: TImageList;

Description

Set SmallImages 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 (Store property of the TdxSideBar control for runtime customization and restoration of control properties) you must assign an ImageList to SmallImages of the TdxSideBarStore and leave the SmallImages property of the TdxSideBar controls 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 ScrollDelay 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.

TdxSideBar 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

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

property TransparentImages : Boolean;

Description

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

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

Run Time 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 EditControl 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.

Read-Only


TdxSideBar.EditingGroup

TdxSideBar            See Also

Represents the current editing group.

property EditingGroup : TdxSideGroup;

Description

Use EditingGroup to access the current editing group.  If a user is not editing a group, it returns Nil.

Read-Only


TdxSideBar.EditingItem

TdxSideBar            See Also

Represents the current editing item.

property EditingItem : TdxSideBarItem;

Description

Use EditingItem to access the current editing item.


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.

Read-Only

Example

This example determines which item is selected with the mouse and displays its caption as the Form 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.

Read-Only


TdxSideBar.IsMakingUpdate

TdxSideBar

Determines whether a TdxSideBar control is locked and not repainted.

property IsMakingUpdate : Boolean;

Description

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

Read 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 group of TdxSideBar 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 an item of TdxSideBar 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 TdxSideBar group.

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 GroupPopup 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 TdxSideBar item.

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 ItemPopup 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);

Description

Use EndEdit to cancel editing of a TdxSideBar group or label.


TdxSideBar.GetSmallImages

TdxSideBar            See Also

Returns the ImageList used for small images in a TdxSideBar component.

function GetSmallImages : TImageList;

Description

Use GetSmallImages to return the ImageList used for small images in TdxSideBar.  If a non null value, it returns the value of the SmallImages property or SmallImages of an associated TdxSideBarStore component.


TdxSideBar.GetLargeImages

TdxSideBar            See Also

Returns the ImageList used for large images in a TdxSideBar component.

function GetLargeImages : TImageList;

Description

Use GetLargeImages to return the ImageList used as large images in TdxSideBar. If a non null value, it returns the value of the LargeImages property or LargeImages of an associated TdxSideBarStore component.


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

Use LoadFromRegistry to restore configurations of a TdxSidebar control (item, groups) from the registry using the ARegistryPath path.

Note: Set the RegistryPath property and activate the StoreInRegistry property to allow 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

Use SaveToRegistry to save configuration of a TdxSidebar control (item, groups) to the registry.

Notes: 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 TdxSideBar Item.

type

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

property OnItemClick : TdxSideBarItemClickEvent;

Description

Write an OnItemClick event handler to perform specific actions immediately after a user clicks a TdxSideBar Item.

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 TdxSideBar item is removed.

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

property OnDeleteItem : TdxSideBarDeleteItemEvent;

Description

Write an OnDeleteItem event handler to perform specific actions before a TdxSideBar item is removed.  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 ActiveGroup.

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;

Description

Write an OnChangeFocusedItem event handler to perform specific actions immediately after the FocusedItem is changed.


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

Write an OnChangeGroupCaption event handler to perform specific actions immediately after the Caption of a particular group is changed.  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;

Description

Write an OnChangeFocusedItem event handler to perform specific actions immediately after the FocusedItem is changed.


TdxSideBar.OnAfterEdit

TdxSideBar            See Also

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

property OnAfterEdit: TNotifyEvent;

Description

Use OnAfterEdit to perform specific actions when a user finishes editing a shortcut or a group.


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.

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

property OnDragDropItem: TdxSideBarDragDropItemEvent;

Description

Write an OnDeleteItem 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

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 Store property of TdxSideBar to TdxSideBarStore and TdxSideBarStore must contain at least one TdxStoredSideItem.  An item of TdxSideBar includes a StoredItem property which cannot be Nil.  TdxSideBarStore can work with any number of TdxSideBar controls.

To create TdxStoredSideItem 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

   Categories

   Count

   DefaultLargeImage

   DefaultSmallImage

   Items

   LargeImages

   SmallImages

   SideBarCount

   SideBars


TdxSideBarStore Methods

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

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

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

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

Default value = –1


TdxSideBarStore.LargeImages

TdxSideBarStore            See Also

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

property LargeImages: TImageList;

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 IconStyle of an Active group equals dxsgSmallIcon.

property LargeImages: TImageList;

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.

Read Only

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

Represents an indexed array of all TdxStoredSideItems in TdxSideBarStore.

property Items[Index : Integer]: TdxStoredSideItem;

Description

Use Items to directly 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.

Read Only


TdxSideBarStore.SideBarCount

TdxSideBarStore            See Also

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

property SideBarCount : Integer;

Description

Use SideBarCount to determine the number of TdxSideBar having a Store property equal to TdxSideBarStore.

Read Only


TdxSideBarStore.SideBars

TdxSideBarStore            See Also

Represents an indexed array of all TdxSideBars in a TdxSideBarStore having the Store property equal to TdxSideBarStore.

property SideBars[Index : Integer] : TdxSideBar;

Description

Use SideBars to directly access a particular TdxSideBar which has a Store property equal to TdxSideBar. Specify which TdxSideBar to access using Index, where 0 specifies the first SideBar, 1 specifies the second SideBar, etc.

Read Only


TdxSideBarStore.GetCountByCategory

TdxSideBarStore            See Also

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

function GetCountByCategory(St: String): Integer;

Description

Use GetCountByCategory to determine the number of TdxStoredSideItem which 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

Use GetItemByCategory to return a particular TdxStoredSideItem from a TdxSideBarStore.  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 GetItemsByCategory to retrieve a list of TdxStoredSideItem components which belong to a particular category.  List is a list object, created and maintained by the application, to which a pointer to TdxStoredSideItem components is retrieved.  The function returns the number of List items.


TdxSideBarStore.Customize

TdxSideBarStore

Activates the ExpressSideBar Customizing form.

procedure Customize;

Description

Call Customize to activate the ExpressSideBar Customizing form.


TdxStoredSideItem

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).  Items of TdxSideBar 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

   Caption

   Category

   Hint

   LargeImage

   PopupMenu

   SmallImage

   Store


TdxStoredSideItem Events

TdxStoredSideItem               Legend

   OnClick


TdxStoredSideItem.Caption

TdxStoredSideItem            See Also

Specifies text which identifies StoredItems to users.

property Caption: String;

Description

Use Caption to associate StoredItems with text which uniquely identifies a StoredItem.  This value is also copied to the Caption property of TdxSideBarItem which has a StoredItem property equal to TdxStoredSideItem.


TdxStoredSideItem.Category

TdxStoredSideItem            See Also

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

property Category : Integer;

Description

Use Category to read or change the index of a TdxSideBarStore category to which the TdxStoredSideItem belongs.


TdxStoredSideItem.Hint

TdxStoredSideItem            See Also

Specifies the hint for a Sidebar item.

property Hint : String;

Description

Set Hint to specify a hint for a sidebar items having a StoredItem property equal to TdxStoredSideItem.


TdxStoredSideItem.LargeImage

TdxStoredSideItem            See Also

Determines the image displayed as a large icon in TdxSideBar.

property LargeImage : Integer;

Set LargeImage to specify the large image displayed in a TdxSideBar for items having a StoredItem property equal to TdxStoredSideItem (If IconStyle of a groups equals dxsgLargeIcon).


TdxStoredSideItem.SmallImage

TdxStoredSideItem            See Also

Determines the image displayed as a small icon in TdxSideBar.

property SmallImage : Integer;

Set SmallImage to specify the small image displayed in a TdxSideBar for items having a StoredItem property equal to TdxStoredSideItem (If IconStyle of a groups equals dxsgSmallIcon).


TdxStoredSideItem.PopupMenu

TdxStoredSideItem            See Also

Identifies the pop-up menu associated with a TdxSideBarItem which has a StoredItem property equal to TdxStoredSideItem.

property PopupMenu : TPopupMenu;

Description

Assign a value to PopupMenu to enable a pop-up menu when a user selects an item and clicks the right mouse button over it.  (For a TdxSideBarItem which has a StoredItem property equal to TdxStoredSideItem.)


TdxStoredSideItem.Store

TdxStoredSideItem            See Also

Specifies the TdxSideBarStore to which a TdxStoredSideItem belongs.

property Store : TdxSideBarStore;

Description

Read Store to determine the TdxSideBarStore to which a TdxStoredSideItem belongs.

Read Only

Note: TdxSideBarStore is the parent component for TdxStoredSideItem.


TdxStoredSideItem.OnClick

TdxStoredSideItem            See Also

Occurs when a user clicks the TdxSideBarItem having a StoredItem property equal to TdxStoredSideItem.

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

property OnClick : TdxSideBarItemClickEvent;

Description

Use the OnClick event handler to create a procedure which responds to the click event of a TdxSideBarItem which has a StoredItem property equal to TdxStoredSideItem.

The Item parameter is the TdxSideBarItem that has been clicked.


TdxSideGroups

Hierarchy          Properties           Methods

TdxSideGroups is a container for TdxSideGroup objects.

Unit

dxsbar

Description

Each TdxSideGroups holds a collection of TdxSideGroup objects in a TdxSideBar. 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

Items


TdxSideGroups Methods

TdxSideGroups

Add


TdxSideGroups.Items

TdxSideGroups            See Also

An index of groups in a collection.

property Items[Index: Integer]: TdxSideGroup default;

Description

The value of the Index parameter corresponds to the Index property of TdxSideGroup.  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

Add returns the new group. At design time, use the dxSidebar component editor to add groups to the dxSideBar.


TdxSideGroup

Hierarchy          Properties           Methods

TdxSideGroup represents a group in a SideBar control (TdxSideBar).

Unit

dxsbar

Description

Each TdxSideBar uses TdxSideBarGroups to maintain a collection of TdxSideBarGroup objects.


Hierarchy

TCollectionItem

     |


TdxSideGroup Properties

TdxSideGroup               Legend

   Active

   Caption

     ItemCount

   IconType

   Items

   TopVisibleItem


TdxSideGroup Methods

TdxSideGroup

Assign

MakeActive

GetVisibleCount


TdxSideGroup.IconType

TdxSideGroup

Determines whether items of a group are displayed using a LargeIcon or SmallIcon style.

TdxSideGroupIconType = (dxsgLargeIcon, dxsgSmallIcon);

property IconType : TdxSideGroupIconType;

Description

If IconType is dxsgLargeIcon, items of a group are displayed using LargeIcons. If IconType is dxsgSmallIcon, items of a group are displayed using SmallIcons.


TdxSideGroup.Items

TdxSideGroup            See Also

Items is  an indexed array of all the TdxSideBarItem objects in TdxSideGroup.

property Items : TdxSideBarItems;

Description

Use Items to have direct access to a particular Item in the TdxSideGroup component. Specify which item to access by using Index, where 0 specifies the first item, 1 specifies the second item, and so on. Each item is a TdxSideBarItem component.


TdxSideGroup.Active

TdxSideGroup            See Also

Determines whether a TdxSideGroup object is active.

property Active : Boolean;

Description

Read Active to determine whether a TdxSideGroup object is the active TdxSideBar group.

Read Only


TdxSideGroup.ItemCount

TdxSideGroup            See Also

Determines the number of TdxSideBarItem(s) in a group.

property ItemCount : Integer;

Description

Use ItemCount to determine the number of TdxSideBarItem(s) in a group.


TdxSideGroup.TopVisibleItem

TdxSideGroup            See Also

Determines the topmost visible item index of TdxSideBarItem.

property TopVisibleItem : Integer;

Run-Time Read Only


TdxSideGroup.Caption

TdxSideGroup            See Also

Caption specifies the text which identifies a group to a user.

property Caption : String;

Description

Use Caption 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, IconStyle from the source object to a group.


TdxSideGroup.MakeActive

TdxSideGroup            See Also

Activates a group in a TdxSideBar control

procedure MakeActive;

Description

Call MakeActive to activate a group in a TdxSideBar control.


TdxSideGroup.GetVisibleCount

TdxSideGroup            See Also

Determines the number of Items currently displayed.

function GetVisibleCount : Integer;

Description

Call GetVisibleCount to determine the number of items currently displayed. Items are visible in the ‘item area’ of TdxSideBar.


TdxSideBarItems

Hierarchy          Properties           Methods

TdxSideBarItems is a container for TdxSideBarItem objects.

Unit

dxsbar

Description

Each TdxSideBarItems holds a collection of TdxSideBarItem objects in TdxSideGroup. TdxSideBarItems maintains the index of columns in its Items array.  The Count property contains the number of items in a collection.  At design time, use the TdxSideBar component editor to add, remove, or modify items.


Hierarchy

TCollection

     |


TdxSideBarItems Properties

TdxSideBarItems

Items


TdxSideBarItems Methods

TdxSideBarItems

Add


TdxSideBarItems.Items

TdxSideBarItems            See Also

An index of groups in a collection.

property Items[Index : Integer]: TdxSideBarItem;

Description

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


TdxSideBarItems.Add

TdxSideBarItems

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

function Add: TdxSideBarItem;

Description

Add returns a new sidebar item.  At design time, use the TdxSidebar component editor to add items to TdxSideBar.


TdxSideBarItem

Hierarchy          Properties           Methods

TdxSideBarItem represents an item in a SideBar group (TdxSideGroup).

Unit

dxsbar

Description

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


Hierarchy

TCollectionItem

     |


TdxSideBarItem Properties

TdxSideBarItem               Legend

   Caption

   CustomData

     Enabled

   Group

   Hint

   IsDefault

     ItemObject

   LargeImage

   SmallImage

   StoredItem

   Tag

   Visible


TdxSideBarItem Methods

TdxSideBarItem

Assign

MakeVisible


TdxSideBarItem.Caption

TdxSideBarItem            See Also

Specifies the text which identifies an item to a user.

property Caption : String;

Description

Use Caption to associate an item with text which specifically identifies a TdxSideBarItem.  If IsDefault equals True and StoredItem is not Nil ,Caption is not stored in the *.dfm file and its value is retrieved from the Caption property of a corresponding StoredItem.


TdxSideBarItem.CustomData

TdxSideBarItem            See Also

CustomData stores a string value as a part of the object.

property CustomData: String;

Description

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

Hint specifies the hint for a sidebar item.

property Hint : String;

Description

Use Hint to set a hint for an item.  If IsDefault equals True and StoredItem is not Nil, Hint is not stored in the dfm file and its value is retrieved from the Hint property of the corresponding StoredItem.


TdxSideBarItem.IsDefault

TdxSideBarItem            See Also

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

property IsDefault : Boolean;

Description

Read IsDefault to determine whether the Caption, Hint, LargeImage and SmallImage properties of an item are the same as the Caption, Hint, LargeImage and SmallImage properties of a corresponding StoredItem.  Set to True to set 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 IconStyle 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 IconStyle of a group equals dxsgSmallIcon.


TdxSideBarItem.StoredItem

TdxSideBarItem            See Also

Specifies a TdxStoredSideItem component.

property StoredItem: TdxStoredSideItem;

Description

Set StoredItem to specify a TdxStoredSideItem component.  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

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

Use Enabled to change the availability of a sidebar item to a user.  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

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

property ItemObject: TObject;

Description

Use ItemObject to associate an object with a sidebar item.  ItemObject 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;

Description

Read Visible to determine whether an item is currently displayed in the ‘item area’ of a TdxSideBar control.

Read Only


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 MakeVisible to make an item Visible.  If an item’s group is inactive, MakeVisible activates it.


TdxSideBarPopupMenu

Hierarchy          Properties           Events

TdxSideBarPopupMenu encapsulates the properties, methods, and events of a pop-up menu and includes predefined menu items designed to function with TdxSideBar.

Unit

dxsbar

Description

Use TdxSideBarPopupMenu to define a pop-up menu which appears when a user clicks an item or a TdxSideBar group with the right mouse button.  To make a pop-up menu available, assign the TdxSideBarPopupMenu object to the TdxSideBar’s GroupPopupMenu and Item PopupMenu properties.


Hierarchy

TPopupMenu

     |


TdxSideBarPopupMenu Properties

TdxSideBarPopupMenu               Legend

  Options


TdxSideBarPopupMenu Events

TdxSideBarPopupMenu               Legend

  OnAfterClick

  OnPopupClose


TdxSideBarPopupMenu.Options

TdxSideBarPopupMenu

Specifies various predefined menu items available for all TdxSideBar popup menus.

type

TdxSideBarPopupMenuOption = (sbmIconType, sbmAddGroup,

         sbmRemoveGroup, sbmCustomize, sbmRenameGroup,

         sbmRenameItem, sbmRemoveItem);

property Options : TdxSideBarPopupMenuOptions;

Description

Set Options to select specific menu items for a TdxSideBar popup menu.  Options is a set combined from the following values:

Value	Meaning
sbmIconType	Both ‘Large Icon’ and ‘Small Icon’ menu items are included.  A User can change IconType of a group 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 TdxSideBar item by selecting this item.
sbmRemoveItem	The ‘Remove Item’ menu item is included.  A user can remove the current TdxSideBar item by selecting this item.


TdxSideBarPopupMenu.OnAfterClick

TdxSideBarPopupMenu

Occurs after a user clicks a popup menu item

property OnAfterClick: TNotifyEvent;

Description

Use the OnAfterClick event to carry out specific actions after a user clicks a popup menu item.


TdxSideBarPopupMenu.OnPopupClose

TdxSideBarPopupMenu

Occurs after closing a popup menu.

property OnPopupClose: TNotifyEvent;

Description

Use the OnPopupClose event to carry out specific actions after closing a popup menu.


dxSideBarDragObject Variable

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

var dxSideBarDragObject: TdxSideBarDragObject;

Unit

dxsbar

Description

Employ 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 with a predefined StoreItem.

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

Accessibility

 	ReadOnly


Unit dximctrl

Controls

TdxCustomImageListBox

TdxImageListBox

TdxCustomImageComboBox

TdxImageComboBox

TdxCustomSpinImage

TdxSpinImage

Objects

TdxSpinImageItem

TdxSpinImageItems


TdxCustomImageListBox

Hierarchy          Properties           Methods           Events

TdxCustomImageListBox is 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 descendant of TdxCustomImageListBox, such as TdxImageListBox or TdxDBImageListBox.


Hierarchy

TCustomListBox

     |


TdxCustomImageListBox Properties

TdxCustomImageListBox               Legend

   Alignment

   ImageAlign

     ImageIndexes

   ImageList

   MultiLines

     Values

   VertAlignment


TdxCustomImageListBox Methods

TdxCustomImageListBox               Legend

     AddItem

     InsertItem

     ExchangeItems

     MoveItem

   ValuesIndexOf


TdxCustomImageListBox Events

TdxCustomImageListBox               Legend

  OnDrawItem


TdxCustomImageListBox.Alignment

TdxCustomImageListBox            See Also

Manages horizontal placement of text within TdxCustomImageListBox.

TAlignment = (taLeftJustify, taRightJustify, taCenter);

property Alignment : TAlignment;

Description

Set Alignment to specify how item text is aligned within the item rectangle of TdxCustomImageListBox.  Alignment can include one of the following values:

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.

TdxImageAlign = (dxliLeft, dxliRight);

property ImageAlign : TdxImageAlign;

Description

Set ImageAlign to specify how an item image is aligned within the item rectangle of TdxCustomImageListBox.  ImageAlign can include one of the following values:

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: TImageList;

Description

Set ImageList to specify bitmaps to display in TdxCustomImageListBox.  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 MultiLines to True to enable multi line display of text within the control.  When MultiLines is True, text that is too large for an item rectangle wraps and continues on additional lines. When MultiLines is False, text that is too large appears truncated.


TdxCustomImageListBox.VertAlignment

TdxCustomImageListBox            See Also

Controls the vertical placement of text within TdxCustomImageListBox.

TVertAlignment = (tvaTop, tvaCenter, tvaBottom);

property VertAlignment : TVertAlignment;

Description

Set Alignment to specify how item text aligns within the item rectangle of TdxCustomImageListBox.  Alignment can include one of the following values:

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 ImageIndexes to determine the ImageIndex for a particular item of TdxCustomImageListBox.

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

dxImageComboBox.ImageIndexes[3] := 1;


TdxCustomImageListBox.Values

TdxCustomImageListBox

Represents an array of strings.  Any item of TdxCustomImageListBox can be associated with a string value

property Values[Index : Integer] : String;

Description

Use Values to associate a particular item with a string value.

For example, the following code 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

Use ValueIndexOf to return the index of an item by its value.  If no items exists with specified value Text, ValueIndexOf 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 the position of two items.

procedure ExchangeItems(Index1, Index2: Integer);

Description

Call ExchangeItems to rearrange items in TdxCustomImageListBox.  Items are specified by their index values in the Index1 and Index2 parameters.  Indexes are zero-based, so the first item in TdxCustomImageListBox has an index value of 0, the second an index value 1, etc.

Note: ExchangeItems is similar to Items.Exchange ,except that ExchangeItms 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 MoveItem to move an item at CurIndex position so that it occupies the NewIndex position.  Positions are specified as zero-based indexes.

Note: MoveItem 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

Hierarchy

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

Unit

dximctrl

Description

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


Hierarchy

TCustomListBox

     |

TdxCustomImageListBox

     |


TdxCustomImageComboBox

Hierarchy          Properties           Methods           Events

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

   Alignment

   ImageAlign

     ImageIndexes

   ImageList

   MultiLines

     Values

   VertAlignment


TdxCustomImageComboBox Methods

TdxCustomImageComboBox               Legend

     AddItem

     InsertItem

     ExchangeItems

     MoveItem

   ValuesIndexOf


TdxCustomImageComboBox Events

TdxCustomImageComboBox               Legend

  OnDrawItem


TdxCustomImageComboBox.Alignment

TdxCustomImageComboBox            See Also

Manages horizontal placement of text within TdxCustomImageComboBox.

TAlignment = (taLeftJustify, taRightJustify, taCenter);

property Alignment : TAlignment;

Description

Set Alignment to specify how item text is aligned within the item rectangle of TdxCustomImageComboBox.  Alignment can include one of the following values:

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.

TdxImageAlign = (dxliLeft, dxliRight);

property ImageAlign : TdxImageAlign;

Description

Set ImageAlign to specify how an item image is aligned within the item rectangle of TdxCustomImageComboBox. ImageAlign can include one of the following values:

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

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

property ImageList: TImageList;

Description

Set ImageList to specify bitmaps to display in TdxCustomImageComboBox.  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 MultiLines to True to enable multi line display of text within the control.  When MultiLines is True, text that is too large for an item rectangle wraps and continues on additional lines. When MultiLines is False, text that is too large appears truncated.


TdxCustomImageComboBox.VertAlignment

TdxCustomImageComboBox            See Also

Controls the vertical placement of text within TdxCustomImageComboBox.

TVertAlignment = (tvaTop, tvaCenter, tvaBottom);

property VertAlignment : TVertAlignment;

Description

Set Alignment to specify how item text aligns within the item rectangle of TdxCustomImageComboBox control.  Alignment can include one of the following values:

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

ImageIndexes contains an array of image indexes.

property ImageIndexes[Index : Integer] : Integer;

Description

Use ImageIndexes to determine the ImageIndex for a particular item of TdxCustomImageComboBox.

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

dxImageComboBox.ImageIndexes[3] := 1;


TdxCustomImageComboBox.Values

TdxCustomImageComboBox

Represents an array of strings.  Any item of TdxCustomImageComboBox can be associated with a string value

property Values[Index : Integer] : String;

Description

Use Values to associate a particular item with a string value.

For example, the following code 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

Use ValueIndexOf to return the index of an item by its value.  If no items exists with specified value Text, ValueIndexOf 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

Call ExchangeItems to rearrange items in TdxCustomImageComboBox. Items are specified by their index values in the Index1 and Index2 parameters.  Indexes are zero-based, so the first item in TdxCustomImageListBox has an index value of 0, the second an index value 1, etc.

Note: ExchangeItems is similar to Items.Exchange ,except that ExchangeItms also changes the position of ImageIndexes and Values.


TdxCustomImageComboBox.MoveItem

TdxCustomImageComboBox            See Also

Changes the position of an item.

Description

Use MoveItem to move an item at CurIndex position so that it occupies the NewIndex position.  Positions are specified as zero-based indexes.

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


TdxCustomImageComboBox.OnDrawItem

TdxCustomImageComboBox            See Also

OnDrawItem 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 Combo box.  Rect represents the area in the Combo box where an item is to be drawn.


TdxImageComboBox

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

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 a descendant of TdxCustomSpinImage, 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

   AutoSize

   DefaultImages

   ImageHAlign

     ImageList

   ImageVAlign

   ItemIndex

     Items

   ReadOnly

   Stretch

   UpDownAlign

   UpDownOrientation

   UpDownWidth

   UseDblClick


TdxCustomSpinImage Methods

TdxCustomSpinImage               Legend

   Change

   CanChange


TdxCustomSpinImage Events

TdxCustomSpinImage               Legend

  OnChange


TdxCustomSpinImage.AutoSize

TdxCustomSpinImage            See Also

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

property AutoSize: Boolean;

Description

Set AutoSize 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. When False, 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 DefaultImages to display the image of a spin image if the ImageIndex value of the current item (TdxSpinImageItem) property is –1 or incorrect.


TdxCustomSpinImage.ImageHAlign

TdxCustomSpinImage            See Also

ImageHAlign controls the horizontal placement of an image within a spin image control.

type

TdxHSpinImageAlign = (hsiLeft, hsiCenter, hsiRight);

property ImageHAlign: TdxHSpinImageAlign;

Description

Set ImageHAlign to specify how an image aligns within a spin image control.  Used if the AutoSize and Strech properties are set to False and the size of an image is smaller than the size of a spin image control.

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

ImageVAlign controls the horizontal placement of an image within a spin image control.

type

TdxVSpinImageAlign = (vsiTop, vsiCenter, vsiBottom);

property ImageVAlign : TdxVSpinImageAlign;

Description

Set ImageVAlign to specify how an image aligns within a spin image control.  Used if the AutoSize and Strech properties are set to False and the size of an image is smaller then the size of a spin image control.

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 ordinal number of a selected item within a spin image item list.

property ItemIndex : Integer;

Description

Use ItemIndex to select an item at runtime.  Set the value of ItemIndex to the index of the item to be selected.  ItemIndex of the first item in a spin image is 0.  If no item is selected, the 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

Set ReadOnly to specify whether a spin image control is used for display purposes only.  If True, the spin image control can only display the image associated with the current item.  If False, 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 within the boundaries of a spin image control.

property Stretch : Boolean;

Description

Set 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

Set UpDownAlign to indicate placement of the up-down control. The following values are available:

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

Use UpDownOrientation to determine the orientation of arrow buttons.  The following values are available:

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 horizontal (vertical) size of Up Down arrows in pixels.

property UpDownWidth: Integer;

Description

Use UpDownWidth to read or change the width of up down arrows.  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 UseDblClick to True to change the index in a spin image control on mouse double click events.  Default value = True.


TdxCustomSpinImage.ImageList

TdxCustomSpinImage            See Also

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

property ImageList: TImageList;

Description

Set ImageList to specify a list of bitmaps to display in a spin image control.  By setting ImageIndexes, each item in a control may be associated with a bitmap using this image list.


TdxCustomSpinImage.Items

TdxCustomSpinImage            See Also

Represents an indexed array of all the items in TdxCustomSpinImage.

property Items: TdxSpinImageItems;

Description

Use Items to gain direct access to a particular item in a spin image control.  For instance, use Items to change the ImageIndex property.  Specify which item to access by using Index, where 0 specifies the first item, 1 specifies the second item, etc.  Each item is a TdxSpinImageItem object.


TdxCustomSpinImage.Change

TdxCustomSpinImage            See Also

Generates an OnChange event.

procedure Change; virtual;

Description

Change is the protected method for the OnChange event.  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

Use CanChange to determine whether a spin image control can change the ImageIndex property.

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

type

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

property OnChange: TdxSIChange;

Description

Use OnChange to write an event handler to process actions when the current item is about to change.  The ItemIndex parameter represents the new value of the ItemIndex property.


TdxSpinImage

Hierarchy

TdxSpinImage represents an image control with UpDown 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

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

  Items


TdxSpinImageItems Methods

TdxSpinImageItems

  Add

  IndexOf


TdxSpinImageItems.Items

TdxSpinImageItems

Represents an indexed array of all tree nodes managed by the TdxSpinImageItem object.

property Items[Index : Integer]: TdxSpinImageItem;

Description

Use Items to access a TdxSpinImageItems object by its position in the spin image control.  The first item has index 0, the second index 1, etc.


TdxSpinImageItems.Add

TdxSpinImageItems

Adds a new item to a spin image control.

function Add: TdxSpinImageItem;

Description

Use the Add method to add a new item to a spin image control.


TdxSpinImageItems.IndexOf

TdxSpinImageItems

Represents the index of the first entry in the Items array with the value of Value property.

function IndexOf(Value : String): Integer;

Description

Call IndexOf to access the index for a Value in the Items array.  The first item in the array has index 0, the second index 1, etc.  If an item is not in the array, IndexOf returns -1.  If the value appears more than once in the array, IndexOf returns the index of the first entry.


TdxSpinImageItem

Hierarchy          Properties

Describes an individual item in a spin image control.

Unit

dximctrl

Description

Each item in a spin image control consists of a Value and an optional bitmap image.


Hierarchy

TCollectionItem

     |


TdxSpinImageItem Properties

TdxSpinImageItem               Legend

  ImageIndex

  Hint

  Value


TdxSpinImageItem.ImageIndex

TdxSpinImageItem

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

property ImageIndex: Integer;

Description

Use ImageIndex to display an image for an item.


TdxSpinImageItem.Hint

TdxSpinImageItem

Contains text string which appears when a user selects a specific item.

property Hint: String;

Description

Use hint to display text when a user selects an item


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 Value to recognize a clicked object and perform specific operations on the click event of the spin image control.