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 index of the first item displayed in the tree control's client area.
Get
VB.NET | ItemIndex = object.TopIndex As Integer |
VB | ItemIndex = object.TopIndex As Long |
C#.NET | int ItemIndex = object.TopIndex; |
VC++ | long ItemIndex = object->TopIndex; long ItemIndex = object->GetTopIndex(); |
C | HRESULT object->get_TopIndex(long* ItemIndex); |
Put
VB.NET | object.TopIndex = ItemIndex As Integer |
VB | object.TopIndex = ItemIndex As Long |
C#.NET | int object.TopIndex = ItemIndex; |
VC++ | long object->TopIndex = ItemIndex; void object->PutTopIndex(long ItemIndex); |
C | HRESULT object->put_TopIndex(long ItemIndex); |
object
A SftTreeItems object.
ItemIndex
Defines the index of the first item displayed in the tree control's client area.
The TopIndex property defines the index of the first item displayed in the tree control's client area.
The Item.MakeVisible method can be used to insure that an item is displayed anywhere in the tree control area. The TopIndex property is used to make the item specified the very first item shown in the tree control area.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load m_PicCount = 0 AxSftTree1.VirtualMode = True AxSftTree1.VirtualCount(10000000) AxSftTree1.VirtualImageSizes(16, 16, 16, 16, 16, 16, 16, 16) ' Make columns and row headers optimal ' but do this at the end of the list, because our sample ' data is larger at the end AxSftTree1.Items.TopIndex = AxSftTree1.Items.Count - 1 AxSftTree1.ColumnsObj.MakeOptimal() AxSftTree1.RowHeaders.MakeOptimal() AxSftTree1.Items.RecalcHorizontalExtent() AxSftTree1.Items.TopIndex = 0 End Sub Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
PicCount = 0 With SftTree1 .VirtualMode = True .VirtualCount 10000000 .VirtualImageSizes 16, 16, 16, 16, 16, 16, 16, 16 ' Make columns and row headers optimal ' but do this at the end of the list, because our sample ' data is larger at the end .Items.TopIndex = .Items.Count - 1 .ColumnsObj.MakeOptimal .RowHeaders.MakeOptimal .Items.RecalcHorizontalExtent .Items.TopIndex = 0 End With End Sub
private void Form1_Load(object sender, System.EventArgs e) { m_PicCount = 0; axSftTree1.VirtualMode = true; axSftTree1.VirtualCount(10000000); axSftTree1.VirtualImageSizes(16, 16, 16, 16, 16, 16, 16, 16); // Make columns and row headers optimal // but do this at the end of the list, because our sample // data is larger at the end axSftTree1.Items.TopIndex = axSftTree1.Items.Count - 1; axSftTree1.ColumnsObj.MakeOptimal(); axSftTree1.RowHeaders.MakeOptimal(); axSftTree1.Items.RecalcHorizontalExtent(); axSftTree1.Items.TopIndex = 0; } private void Timer1_Tick(object sender, System.EventArgs e) {
ASSERT(m_vTree != NULL); m_vTree->VirtualMode = VARIANT_TRUE; m_vTree->VirtualCount(10000000); m_vTree->VirtualImageSizes(16, 16, 16, 16, 16, 16, 16, 16); // Make columns and row headers optimal // but do this at the end of the list, because our sample // data is larger at the end m_vTree->Items->TopIndex = m_vTree->Items->Count - 1; m_vTree->ColumnsObj->MakeOptimal(); m_vTree->RowHeaders->MakeOptimal(); m_vTree->Items->RecalcHorizontalExtent(); m_vTree->Items->TopIndex = 0; SetTimer(TIMER_ID, 100, NULL);
See Also SftTreeItems Object | Object Hierarchy