SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Defines the horizontal alignment of the graphic in this cell.
Get
VB.NET | Style = object.ImageHAlign As SftTreeHAlignConstants |
VB | Style = object.ImageHAlign As SftTreeHAlignConstants |
C#.NET | SftTreeHAlignConstants Style = object.ImageHAlign; |
VC++ | enum SftTreeHAlignConstants Style = object->ImageHAlign; enum SftTreeHAlignConstants Style = object->GetImageHAlign(); |
C | HRESULT object->get_ImageHAlign(enum SftTreeHAlignConstants* Style); |
Put
VB.NET | object.ImageHAlign = Style As SftTreeHAlignConstants |
VB | object.ImageHAlign = Style As SftTreeHAlignConstants |
C#.NET | SftTreeHAlignConstants object.ImageHAlign = Style; |
VC++ | enum SftTreeHAlignConstants object->ImageHAlign = Style; void object->PutImageHAlign(enum SftTreeHAlignConstants Style); |
C | HRESULT object->put_ImageHAlign(enum SftTreeHAlignConstants Style); |
object
A SftTreeCell object.
Style
Defines the horizontal alignment of the graphic in this cell.
Name | Value | Description |
---|---|---|
halignSftTreeLeft | 0 | The graphic is on the left of the cell text. |
halignSftTreeCenter | 1 | The graphic is centered in the cell. |
halignSftTreeRight | 2 | The graphic is on the right of the cell text. |
The ImageHAlign property defines the horizontal alignment of the graphic in this cell.
The Cell.ImageVAlign property is used to define the vertical alignment of the graphic in this cell. The cell graphic is defined using the Cell.Image property.
AxSftTree1.get_Item(ItemIndex).RowHeader.Image = Img End If End Sub Private Sub UpdatePictures(ByVal ItemIndex As Integer, ByVal IPic As stdole.IPictureDisp, ByVal Align As SftTreeHAlignConstants) Dim C As SftTreeCell C = AxSftTree1.get_Cell(ItemIndex, 0) C.Image.Picture = IPic C.ImageHAlign = Align PropagateImage(ItemIndex, C.Image) End Sub Private Sub UpdateImages(ByVal ItemIndex As Integer, ByVal Img As Image, ByVal Align As SftTreeHAlignConstants) Dim C As SftTreeCell C = AxSftTree1.get_Cell(ItemIndex, 0) C.Image.NETImageObject = Img
SftTree1.Item(ItemIndex).RowHeader.Image = Img End If End Sub Private Sub UpdatePictures(ByVal ItemIndex As Integer, ByVal Pic As StdPicture, ByVal Align As SftTreeHAlignConstants) Dim C As SftTreeCell Set C = SftTree1.Cell(ItemIndex, 0) Set C.Image.Picture = Pic C.ImageHAlign = Align PropagateImage ItemIndex, C.Image End Sub Private Sub UpdateImages(ByVal ItemIndex As Integer, ByVal Pic As LONG_PTR, ByVal Align As SftTreeHAlignConstants) Dim C As SftTreeCell Set C = SftTree1.Cell(ItemIndex, 0) C.Image.SetImage Pic, True
axSftTree1.get_Item(ItemIndex).RowHeader.Image = Img; } } private void UpdatePictures(int ItemIndex, stdole.IPictureDisp IPic, SftTreeHAlignConstants Align) { SftTreeCell C = axSftTree1.get_Cell(ItemIndex, 0); C.Image.Picture = IPic; C.ImageHAlign = Align; PropagateImage(ItemIndex, C.Image); } private void UpdateImages(int ItemIndex, Image img, SftTreeHAlignConstants Align) { SftTreeCell C = axSftTree1.get_Cell(ItemIndex, 0); C.Image.NETImageObject = img;
m_vTree->Item[ItemIndex]->RowHeader->Image = Img; } } void CPicturesDlg::UpdateBitmap(long ItemIndex, const CBitmap& bmp, SftTreeHAlignConstants Align) { ISftTreeCellPtr C = m_vTree->Cell[ItemIndex][0]; C->Image->PutBitmapHandle((OLE_HANDLE)(HBITMAP) bmp); C->ImageHAlign = Align; PropagateImage(ItemIndex, C->Image); } void CPicturesDlg::UpdateImage(long ItemIndex, int resourceID, SftTreeHAlignConstants Align) { ISftTreeCellPtr C = m_vTree->Cell[ItemIndex][0]; C->Image->raw_LoadImageFromResource((long) AfxGetApp()->m_hInstance, L"PNG", (LPWSTR)MAKEINTRESOURCE(resourceID));
See Also SftTreeCell Object | Object Hierarchy