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 item that is the focus object.
Class: SftTree
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET
public ItemClass FocusItem { get; set; }
Public Property FocusItem As ItemClass
The focus object or null/Nothing if there is no focus object.
The default value is null/Nothing.
Defines the item that is the focus object.
The current item is the item that has the focus rectangle.
The focus rectangle is controlled using the SftTree.ShowFocusRectangle property. The size of the focus rectangle is consistent with the current selection style (SftTree.SelectionStyle).
The focus item is not necessarily also selected (ItemClass.Selected).
When the user changes the current item or cell, the FocusObjectChange event occurs. The SelectionChange event occurs when the selection changes.
The FocusItem and SftTree.FocusCell properties define the focus object and are identical to the SftTree.FocusObject property but accept an item (ItemClass) or a cell (CellClass) instead of the more generic object.
if (e.Area == ItemClickAreaEnum.CellSel && e.Item != null) { ExpandCollapseItem(e.Item); } } private void sftTree1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Right) { // Right arrow normally expands a parent item. Our items don't (yet) have // child items, so we'll have to handle the right arrow keys. ItemClass item = sftTree1.FocusItem; if (item != null) { if (item.ExpandCollapseButton == ExpandCollapseButtonStyleEnum.Show) { ExpandCollapseItem(item); e.Handled = true; } } }
ExpandCollapseItem(e.Item) End If End Sub Private Sub sftTree1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles sftTree1.KeyDown If e.KeyCode = Keys.Right Then ' Right arrow normally expands a parent item. Our items don't (yet) have ' child items, so we'll have to handle the right arrow keys. Dim item As ItemClass = sftTree1.FocusItem If Not item Is Nothing Then If item.ExpandCollapseButton = ExpandCollapseButtonStyleEnum.Show Then ExpandCollapseItem(item) e.Handled = True End If End If End If
See Also SftTree Class | Classes | SftTree/NET 2.0