property Items.CellImage (Index as Long, ColIndex as Variant) as Long
Retrieves or sets a value that indicates the index of the cell's image into Images collection.

 TypeDescription 
   Index as Long A long expression that indicates the index of the item.  
   ColIndex as Variant A long expression that indicates the column's index, or a string expression that indicates the column's caption or column's key.  
   Long A long value that indicates the index of the cell's image into Images collection. The last 7 bits in the high significant byte of the long expression indicates the identifier of the skin being used to paint the object. Use the Add method to add new skins to the control. If you need to remove the skin appearance from a part of the control you need to reset the last 7 bits in the high significant byte of the color being applied to the part.  

Use the CellImage to attach a single icon to a cell. Use the CellImages property to assign multiple icons to a cell. Use the CellPicture property to associate a larger picture to a cell. The cell's icon size is (16x16). If the index of image is not contained by the Images collection, no icon is displayed in the cell. If the cell contains an icon, the control fires CellImageClick event when the cell's icon is clicked. Use the ItemFromPoint property to retrieve the part of the control being clicked. Use the CellHasCheckBox property to add a check box to a cell. Use the CellHasRadioButton property to assign a radio button to a cell. Use the CellPicture property to load a custom size picture to a cell. Use the <img> HTML tag to insert icons inside the cell's caption, if the CaptionFormat property is exHTML. Use the FilterType property on exImage to filter items by icons

The following VB sample displays the first icon in the focused cell:

With List1.Items
    .CellImage(.FocusItem, 0) = 1
End With

The following C++ sample displays the first icon in the focused cell:

#include "Items.h"
CItems items = m_list.GetItems();
items.SetCellImage( items.GetFocusItem() , COleVariant( (long)0 ), 1 );

The following C# sample displays the first icon in the focused cell:

axList1.Items.set_CellImage(axList1.Items.FocusItem, 0, 1);

The following VB.NET sample displays the first icon in the focused cell:

With AxList1.Items
    .CellImage(.FocusItem, 0) = 1
End With

The following VFP sample displays the first icon in the focused cell:

with thisform.List1.Items
	.CellImage(.FocusItem,0) = 1
endwith

 


Send comments on this topic.
1999-2017 Exontrol.COM, Software. All rights reserved.