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