Hide

SftBox/OCX 5.0 - Combo Box Control

Display
Print

SftPictureObject.SetImageListH Method

Defines the picture object as an ImageList image.

Syntax

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

object

A SftPictureObject object.

ImageListWindow

An ImageList control handle.

ImageIndex

The one-based index of the image in the ImageList control 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

VB.NET

    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#

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

C++

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

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

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

See Also SftPictureObject Object | Object Hierarchy


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