HeaderPane
Main
Hide

SftTree/OCX 8.0 - ActiveX Tree Control

Share Link
Print

Style Property, SftTreeItems Object

Defines the item style.

Syntax

Get

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

Put

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

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

    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

         NoFocusStyle    =   0
         NoSelection     =   0
         RubberbandSelection=   1
         SelectBackColor =   -2147483635
         SelectBackColorNoFocus=   -2147483633
         SelectForeColor =   -2147483634
         SelectForeColorNoFocus=   -2147483630
         ShadowColor     =   -2147483632
         Style           =   1
         ScrollTips      =   1
         SelectionArea   =   1
         SelectStyle     =   0
         ShowFocusRectangle=   1
         ToolTipAlways   =   0
         ToolTipBackColor=   -1
         ToolTipForeColor=   -1

C#

        private void AddColor(string Text, Color Clr)
        {
            int i;
            i = axSftTree1.Items.Add(Text);
            axSftTree1.get_Item(i).Level = 2;
            UpdateColor(i, Clr, SftTreeHAlignConstants.halignSftTreeRight);
        }

        private void UpdateBuiltinImage(int ItemIndex, SftPictureImageConstants Style, int wPix, int hPix, SftTreeHAlignConstants Align)
        {
            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);

See Also SftTreeItems Object | Object Hierarchy


Last Updated 05/24/2026 - (email)
© 2026 Softel vdm, Inc.