HeaderPane
Main
Hide
Share Link
Print

Style Property, SftTreeItems Object

Defines the item style.

Syntax

Get

C#SftTreeItemStyleConstants Style = object.Style;
VB.NETStyle = object.Style As SftTreeItemStyleConstants
C++enum SftTreeItemStyleConstants Style = object->Style;
enum SftTreeItemStyleConstants Style = object->GetStyle();
CHRESULT object->get_Style(enum SftTreeItemStyleConstants* Style);
VBStyle = object.Style As SftTreeItemStyleConstants

Put

C#SftTreeItemStyleConstants object.Style = Style;
VB.NETobject.Style = Style As SftTreeItemStyleConstants
C++enum SftTreeItemStyleConstants object->Style = Style;
void object->PutStyle(enum SftTreeItemStyleConstants Style);
CHRESULT object->put_Style(enum SftTreeItemStyleConstants Style);
VBobject.Style = Style As SftTreeItemStyleConstants

object

A SftTreeItems object.

Style

Defines the item style.

StyleValueDescription
itemSftTreeFixed0All items in the tree control have the same height.
itemSftTreeVariable1The height of each item in the tree control may vary based on item attributes, such as fonts used, graphics sizes, etc.

Comments

The Style property defines the item style.

It determines whether fixed height or variable height items are used.

Examples

VB.NET View entire sample code

    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 Sub

VB6 View entire sample code

Private 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


Last Updated 11/03/2026 - (email)
© 2026 Softel vdm, Inc.