GroupExpandIcon Property

Description

Returns or sets the grid's group expand 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 GroupExpandIcon property allows for custom images to be displayed when a group is put into an expanded 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 expand 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.GroupExpandIcon = LoadPicture("c:\myexpanded.jpg") End Sub 'Using SharpGrid's internal image list Private Sub Form_Load() SGGrid1.OutlineIcons = sgCustomOutlineIcons SGGrid1.GroupExpandIcon = sgbipFirst + 3 End Sub 'Using an external image list Private Sub Form_Load() SGGrid1.OutlineIcons = sgCustomOutlineIcons SGGrid1.GroupExpandIcon = MyImageList.ListImages(1).Picture End Sub

OutlineIcons Property | GroupCollapseIcon Property | SGGroups Object | Images