HeaderPane
Main
Hide

SftTree/OCX 8.0 - ActiveX Tree Control

Share Link
Print

Items Property, SftTree Object

Returns the SftTreeItems object.

Syntax

Get

VB.NETrefItemsObj = object.Items As SftTreeItems
VBSet refItemsObj = object.Items As SftTreeItems
C#.NETSftTreeItems refItemsObj = object.Items;
VC++ISftTreeItems* refItemsObj = object->Items;
ISftTreeItems* refItemsObj = object->GetItems();
CHRESULT object->get_Items(ISftTreeItems** refItemsObj);

object

A SftTree object.

refItemsObj

Returns the SftTreeItems object.

Comments

The Items property returns the SftTreeItems object.

The SftTreeItems object describes attributes that apply to all items in a SftTree/OCX control. Numerous properties and methods can be accessed using the returned object refItemsObj. A control has only one SftTreeItems object.

An individual item's SftTreeItem object can be accessed through the control's Item property.

Examples

VB.NET

    AxSftTree1.get_Item(6).Cell(1).Text = ""

    AxSftTree1.RowHeaders.MakeOptimal() ' Make row header width optimal, so text and pictures are not clipped horizontally.
    AxSftTree1.ColumnsObj.MakeOptimal() ' Make all columns optimal

    ' triple the size of the last column
    AxSftTree1.get_Column(1).WidthPix = AxSftTree1.get_Column(1).WidthPix * 3

    AxSftTree1.Items.RecalcHorizontalExtent() ' Update horizontal scrollbar

    AxSftTree1.Items.Current = 0 ' select the first item
    AxSftTree1.get_Item(0).Selected = True

    AxSftTree1.Dock = DockStyle.Fill ' Maximize the main window

    Me.WindowState = FormWindowState.Maximized

VB6

         ForeColor       =   -2147483630
         GrayedColor     =   -2147483631
         HilightColor    =   -2147483628
         Multiline       =   1
         ShadowColor     =   -2147483632
         Reorderable     =   1
         Resizable       =   1
      EndProperty
      BeginProperty Items {10C7FF3C-FC3E-4579-A9F2-C1BA410D3B56} 
         AutoExpandDragDrop=   1
         AutoExpandHover =   0
         BackColor       =   -2147483643
         BackColorOdd    =   -2147483643
         CalcLimit       =   0
         CalcVisibleOnly =   0
         Cell3D          =   0

C#

            axSftTree1.get_Item(6).get_Cell(1).Text = "";

            axSftTree1.RowHeaders.MakeOptimal(); // Make row header width optimal, so text and pictures are not clipped horizontally.
            axSftTree1.ColumnsObj.MakeOptimal(); // Make all columns optimal

            // triple the size of the last column
            axSftTree1.get_Column(1).WidthPix = axSftTree1.get_Column(1).WidthPix * 3;

            axSftTree1.Items.RecalcHorizontalExtent(); // Update horizontal scrollbar

            axSftTree1.Items.Current = 0; // select the first item
            axSftTree1.get_Item(0).Selected = true;

            axSftTree1.Dock = DockStyle.Fill; // Maximize the main window

            this.WindowState = FormWindowState.Maximized;

C++

    m_vTree->Item[6]->Cell[1]->AttachContentWindow((LONG_PTR) m_SimpleDialog.m_hWnd, contentWindowSftTreeKeepSize);

    m_vTree->RowHeaders->MakeOptimal(); // Make row header width optimal, so text and pictures are not clipped horizontally.
    m_vTree->ColumnsObj->MakeOptimal(); // Make all columns optimal

    // triple the size of the last column
    m_vTree->Column[1]->WidthPix = m_vTree->Column[1]->WidthPix * 3;

    m_vTree->Items->RecalcHorizontalExtent(); // Update horizontal scrollbar

    m_vTree->Items->Current = 0; // select the first item
    m_vTree->Item[0]->Selected = VARIANT_TRUE;

    SendMessage(WM_SYSCOMMAND, SC_MAXIMIZE, 0);
    
    return TRUE;  // return TRUE  unless you set the focus to a control

See Also SftTree Object | Object Hierarchy


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