XTPImageState Enumeration
Description
Specifies when an image/icon/bitmap will be displayed. This is specified when it is added to the GridControl's collection of images.
Members
| Member | Description |
|---|---|
| xtpImageNormal | Specifies a normal icon. This is the image displayed when the item is displayed normally. |
| xtpImageDisabled | Specifies a disabled icon. This is the image displayed when the item is disabled. |
| xtpImageHot | Specifies a hot icon. This is the image displayed when the mouse pointer is positioned over the item. |
| xtpImageChecked | Specifies a "checked" or selected icon. This is the image displayed when the item is in a selected state. |
| xtpImagePressed | Specifies a "pressed" or pushed icon. This is the image displayed when the item is currently pressed by the mouse cursor. |
Remarks
Only the "Normal" icon is used in the GridControl. You can add "Hot" and "Disabled" icons, but they will not be used.
If you have the CommandBars component installed, you can use the icons added to the ImageManager.
Example
Adding Images to the GridControl (Visual Basic)
This sample illustrates how to add an icon to the GridControl using the AddIcon method.
' Add this to the General code section
Const COLUMN_CHECK = 0
' This code is placed in the Form_Load event
Dim Column As GridColumn
Set Column = wndGridControl.Columns.Add(COLUMN_CHECK, "Selected", 18, False)
Column.Icon = COLUMN_CHECK
Dim hIcon As IPictureDisp
' Only the "Normal" state icon is used in the Grid control
Set hIcon = ImageListGrid.ListImages(1).ExtractIcon
wndGridControl.Icons.AddIcon hIcon, COLUMN_CHECK, xtpImageNormal
Adding Existing Images from the CommandBars ImageManager Control (Visual Basic)
This sample illustrates how to add and use images from a CommandBars ImageManager control.
' Add this to the General code section
Const COLUMN_CHECK = 0
' This code is placed in the Form_Load event
Dim Column As GridColumn
Set Column = wndGridControl.Columns.Add(COLUMN_CHECK, "Selected", 18, False)
' The value assigned to the Icon property corresponds to the IconId of an icon in the ImageManager control
Column.Icon = 1
wndGridControl.Icons = ImageManager.Icons
See Also
- ImageManagerIcons Object
- AddIcon Method
- LoadBitmap Method
- LoadIcon Method
- Icons Property
- Icon Property
- Icon Property
- SetImageList Method
Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.