Hide

SftBox/OCX 5.0 - Combo Box Control

Display
Print

SftPictureObject.SetImageList Method

Defines the picture object as an ImageList image.

Syntax

VB.NETobject.SetImageList(ByVal ImageList As Object, ByVal ImageIndex As Short)
VBobject.SetImageList(ByVal ImageList As Object, ByVal ImageIndex As Integer)
C#.NETvoid object.SetImageList(object ImageList, short ImageIndex);
VC++HRESULT object->SetImageList(LPDISPATCH ImageList, short ImageIndex);
CHRESULT object->raw_SetImageList(LPDISPATCH ImageList, short ImageIndex);

object

A SftPictureObject object.

ImageList

An ImageList control (supporting the IImageList interface).

ImageIndex

The one-based index of the image in the ImageList control to be used as graphic.

Comments

The SetImageList method defines the picture object as an ImageList image.

SetImageList only supports ActiveX ImageList controls that offer an IImageList interface. GetImageListH and SetImageListH support a window handle based ImageList control (Common Controls).

The SftPictureObject.Type property is set to sftTypeImageList. The SftPictureObject.ActualHeight and SftPictureObject.ActualWidth properties reflect the image size.

Examples

VB6

    C.Image.SetImage Pic, True
    C.ImageHAlign = Align
    PropagateImage ItemIndex, C.Image
End Sub

Private Sub UpdateImageList(ByVal ItemIndex As Integer, ByVal ImageListControl As ImageList, ByVal I As Integer, ByVal Align As SftBoxHAlignConstants)
    Dim C As SftBoxCell
    Set C = SftBox1.Cell(ItemIndex, 0)
    C.Image.SetImageList ImageListControl, I
    C.ImageHAlign = Align
    PropagateImage ItemIndex, C.Image
End Sub

Private Sub UpdateColor(ByVal ItemIndex As Integer, ByVal Clr As OLE_COLOR, ByVal Align As SftBoxHAlignConstants)
    Dim C As SftBoxCell
    Set C = SftBox1.Cell(ItemIndex, 0)

See Also SftPictureObject Object | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.