GroupCollapseIcon Property

Description

Returns or sets the grid's group collapse icon.

Availability

Design time Not available
Run time Read / Write

Syntax

object.Value As Variant

The object placeholder represents an object expression that evaluates to the SGGrid object.

Remarks

The GroupCollapseIcon property allows for custom images to be displayed when a group is in a collapsed state. Custom icons can be selected from the built-in image list of SharpGrid, images stored in files, or a user-defined image list created with the VB ImageList control. To utilize the stored images, use the Visual BasicĀ® LoadPicture method. All image formats supported by the LoadPicture method can be used with the GroupCollapseIcon property. 

Images supplied from the LoadPicture method or a user-defined list are scaled to 11x11 and images from SharpGrid's internal image list are displayed in their original size.

Note: In order to use the GroupCollapseIcon property, the OutlineIcons property must be set to sgCustomOutlineIcons. Otherwise, the grid's collapse icon will be represented by the default icon (+).

The following snippets demonstrate the various ways this property can be manipulated.

Example

'Loading an image directly from a file Private Sub Form_Load() SGGrid1.OutlineIcons = sgCustomOutlineIcons SGGrid1.GroupCollapseIcon = LoadPicture("c:\mycollapsed.jpg") End Sub 'Using SharpGrid's internal image list Private Sub Form_Load() SGGrid1.OutlineIcons = sgCustomOutlineIcons SGGrid1.GroupCollapseIcon = sgbipFirst + 2 End Sub 'Using an external image list Private Sub Form_Load() SGGrid1.OutlineIcons = sgCustomOutlineIcons SGGrid1.GroupCollapseIcon = MyImageList.ListImages(1).Picture End Sub

OutlineIcons Property | GroupExpandIcon Property | SGGroups Object | Images