Defines the picture object as an ImageList image.
| C# | void object.SetImageListH(int ImageListWindow, short ImageIndex); |
| VB.NET | object.SetImageListH(ByVal ImageListWindow As Integer, ByVal ImageIndex As Short) |
| C++ | HRESULT object->SetImageListH(OLE_HANDLE ImageListWindow, short ImageIndex); |
| C | HRESULT object->raw_SetImageListH(OLE_HANDLE ImageListWindow, short ImageIndex); |
| VB | object.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.
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.
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.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->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