HeaderPane
Main
Hide
Share Link
Print

SetImageListH Method, SftPictureObject Object

Defines the picture object as an ImageList image.

Syntax

C#void object.SetImageListH(int ImageListWindow, short ImageIndex);
VB.NETobject.SetImageListH(ByVal ImageListWindow As Integer, ByVal ImageIndex As Short)
C++HRESULT object->SetImageListH(OLE_HANDLE ImageListWindow, short ImageIndex);
CHRESULT object->raw_SetImageListH(OLE_HANDLE ImageListWindow, short ImageIndex);
VBobject.SetImageListH(ByVal ImageListWindow As OLE_HANDLE, ByVal ImageIndex As Integer)

object

A SftPictureObject object.

ImageListWindow

An ImageList handle (HIMAGELIST).

ImageIndex

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

Comments

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

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

Examples

C# View entire sample code

            c.Image.NETImageObject = img;
            c.ImageHAlign = align;
            PropagateImage(itemIndex, c.Image);
        }

        private void UpdateImageList(int itemIndex, ImageList imageListControl, int i, SftTreeHAlignConstants align)
        {
            SftTreeCell c = axSftTree1.get_Cell(itemIndex, 0);
            c.Image.SetImageListH((int) imageListControl.Handle, (short) i);
            c.ImageHAlign = align;
            PropagateImage(itemIndex, c.Image);
        }

        private void UpdateColor(int itemIndex, System.Drawing.Color clr, SftTreeHAlignConstants align)
        {
            SftTreeCell c = axSftTree1.get_Cell(itemIndex, 0);

VB.NET View entire sample code

        C.Image.NETImageObject = Img
        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 SftTreeHAlignConstants)
        Dim C As SftTreeCell
        C = AxSftTree1.get_Cell(ItemIndex, 0)
        C.Image.SetImageListH(ImageListControl.Handle.ToInt32(), i)
        C.ImageHAlign = Align
        PropagateImage(ItemIndex, C.Image)
    End Sub

    Private Sub UpdateColor(ByVal ItemIndex As Integer, ByVal Clr As System.Drawing.Color, ByVal Align As SftTreeHAlignConstants)
        Dim C As SftTreeCell
        C = AxSftTree1.get_Cell(ItemIndex, 0)

C++ View entire sample code

    C->Image->PutIconHandle((LONG_PTR)hIcon);
    C->ImageHAlign = Align;
    PropagateImage(ItemIndex, C->Image);
}

void CPicturesDlg::UpdateImageList(long ItemIndex, HIMAGELIST hImgList, short iImage, SftTreeHAlignConstants Align)
{
    ISftTreeCellPtr C = m_vTree->Cell[ItemIndex][0];
    C->Image->SetImageListH((LONG_PTR)hImgList, iImage);
    C->ImageHAlign = Align;
    PropagateImage(ItemIndex, C->Image);
}

void CPicturesDlg::UpdateColorSample(long ItemIndex, COLORREF Clr, SftTreeHAlignConstants Align)
{
    ISftTreeCellPtr C = m_vTree->Cell[ItemIndex][0];

See Also SftPictureObject Object | Object Hierarchy


Last Updated 11/14/2026 - (email)
© 2026 Softel vdm, Inc.