Defines the item style.
Get
| C# | SftTreeItemStyleConstants Style = object.Style; |
| VB.NET | Style = object.Style As SftTreeItemStyleConstants |
| C++ | enum SftTreeItemStyleConstants Style = object->Style; enum SftTreeItemStyleConstants Style = object->GetStyle(); |
| C | HRESULT object->get_Style(enum SftTreeItemStyleConstants* Style); |
| VB | Style = object.Style As SftTreeItemStyleConstants |
Put
| C# | SftTreeItemStyleConstants object.Style = Style; |
| VB.NET | object.Style = Style As SftTreeItemStyleConstants |
| C++ | enum SftTreeItemStyleConstants object->Style = Style; void object->PutStyle(enum SftTreeItemStyleConstants Style); |
| C | HRESULT object->put_Style(enum SftTreeItemStyleConstants Style); |
| VB | object.Style = Style As SftTreeItemStyleConstants |
object
A SftTreeItems object.
Style
Defines the item style.
| Style | Value | Description |
|---|---|---|
| itemSftTreeFixed | 0 | All items in the tree control have the same height. |
| itemSftTreeVariable | 1 | The height of each item in the tree control may vary based on item attributes, such as fonts used, graphics sizes, etc. |
The Style property defines the item style.
It determines whether fixed height or variable height items are used.
Private Sub AddColor(ByVal Text As String, ByVal Clr As Color)
Dim i As Integer
i = AxSftTree1.Items.Add(Text)
AxSftTree1.get_Item(i).Level = 2
UpdateColor(i, Clr, SftTreeHAlignConstants.halignSftTreeRight)
End Sub
Private Sub UpdateBuiltinImage(ByVal ItemIndex As Integer, ByVal Style As SftPictureImageConstants, ByVal wPix As Integer, ByVal hPix As Integer, ByVal Align As SftTreeHAlignConstants)
Dim C As SftTreeCell
C = AxSftTree1.get_Cell(ItemIndex, 0)
C.Image.Appearance = Style
C.Image.Width = wPix
C.Image.Height = hPix
C.ImageHAlign = Align
PropagateImage(ItemIndex, C.Image)
End SubPrivate Sub AddColor(ByVal Text As String, ByVal Clr As OLE_COLOR) Dim I As Integer I = SftTree1.Items.Add(Text) SftTree1.Item(I).Level = 2 UpdateColor I, Clr, halignSftTreeRight End Sub Private Sub UpdateBuiltinImage(ByVal ItemIndex As Integer, ByVal Style As SftPictureImageConstants, ByVal wPix As Integer, ByVal hPix As Integer, ByVal Align As SftTreeHAlignConstants) Dim C As SftTreeCell Set C = SftTree1.Cell(ItemIndex, 0) C.Image.Appearance = Style C.Image.Width = wPix C.Image.Height = hPix C.ImageHAlign = Align PropagateImage ItemIndex, C.Image End Sub
See Also SftTreeItems Object | Object Hierarchy