Hide

SftTree/OCX 7.5 - ActiveX Tree Control

Display
Print

SetImageListH Method, SftPictureObject Object

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 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#

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

C++

    C->Image->PutIconHandle((OLE_HANDLE)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((OLE_HANDLE)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 08/13/2020 - (email)
© 2021 Softel vdm, Inc.