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);

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, SftBoxHAlignConstants Align)
        {
            SftBoxCell C = axSftBox1.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, SftBoxHAlignConstants Align)
        {
            SftBoxCell C = axSftBox1.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 SftBoxHAlignConstants)
        Dim C As SftBoxCell
        C = AxSftBox1.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 SftBoxHAlignConstants)
        Dim C As SftBoxCell
        C = AxSftBox1.get_Cell(ItemIndex, 0)

C++ View entire sample code

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

void CItemImagesDlg::UpdateImageList(long ItemIndex, HIMAGELIST hImgList, short iImage, SftBoxHAlignConstants Align)
{
    ISftBoxCellPtr C = m_vBox->Cell[ItemIndex][0];
    C->Image->SetImageListH((LONG_PTR)hImgList, iImage);
    C->ImageHAlign = Align;
    PropagateImage(ItemIndex, C->Image);
}

void CItemImagesDlg::UpdateColorSample(long ItemIndex, COLORREF Clr, SftBoxHAlignConstants Align)
{
    ISftBoxCellPtr C = m_vBox->Cell[ItemIndex][0];

See Also SftPictureObject Object | Object Hierarchy


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