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
Returns the number of items in the tree control.
Get
VB.NET | Count = object.Count As Integer |
VB | Count = object.Count As Long |
C#.NET | int Count = object.Count; |
VC++ | long Count = object->Count; long Count = object->GetCount(); |
C | HRESULT object->get_Count(long* Count); |
object
A SftTreeItems object.
Count
Returns the number of items in the tree control.
The Count property returns the number of items in the tree control.
The Items.Add and Items.Insert methods add new items.
If e.x >= L And e.x < L + W And e.y >= T And e.y <= T + H Then HeaderMenu(PointToClient(P)) Return End If ' determine item right-clicked Dim ItemIndex As Integer ItemIndex = AxSftTree1.Items.HitTestPix(e.x, e.y) If ItemIndex >= 0 And ItemIndex < AxSftTree1.Items.Count Then AxSftTree1.Items.Current = ItemIndex AxSftTree1.get_Item(ItemIndex).Selected = True AxSftTree1.CancelMode() ItemContextMenu.Show(Me, PointToClient(P)) End If End Sub
If X >= l And X < l + w And Y >= t And Y <= t + h Then HeaderMenu Exit Sub End If ' determine item right-clicked Dim ItemIndex As Long ItemIndex = SftTree1.Items.HitTest(X, Y) If ItemIndex >= 0 And ItemIndex < SftTree1.Items.Count Then SftTree1.Items.Current = ItemIndex SftTree1.Item(ItemIndex).Selected = True SftTree1.CancelMode PopupMenu MenuForm.ItemPopup End If End Sub
axSftTree1.Headers.GetPositionPix(out l, out t, out w, out h); if (e.x >= l && e.x < l + w && e.y >= t && e.y <= t + h) { HeaderMenu(PointToClient(point)); return; } // determine item right-clicked int ItemIndex = axSftTree1.Items.HitTestPix(e.x, e.y); if (ItemIndex >= 0 && ItemIndex < axSftTree1.Items.Count) { axSftTree1.Items.Current = ItemIndex; axSftTree1.get_Item(ItemIndex).Selected = true; axSftTree1.CancelMode(); ItemContextMenu.Show(this, PointToClient(point)); } }
if (x >= l && x < l + w && y >= t && y <= t + h) { HeaderMenu(pt); return; } // determine item right-clicked long ItemIndex; ItemIndex = m_vTree->Items->HitTestPix(x, y); if (ItemIndex >= 0 && ItemIndex < m_vTree->Items->Count) { m_vTree->Items->Current = ItemIndex; m_vTree->Item[ItemIndex]->Selected = VARIANT_TRUE; ItemMenu(pt); return; } }
See Also SftTreeItems Object | Object Hierarchy