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
Occurs when an item, cell or part is clicked.
Class: SftTree
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET
public event ItemClickEventHandler ItemClick;
Public Event ItemClick As ItemClickEventHandler
Occurs when an item, cell or part is clicked.
Please note that the ItemClick event reflects mouse button events. The SelectionChange event should be used when selection changes need to be tracked, as these can also occur though keyboard input, which is not reflected by the ItemClick event.
The ItemClick event supplies all the necessary information to the application, so appropriate action can be taken. The application can start cell editing, expand or collapse an item or display application specific information based on the event and the area clicked.
The ItemDoubleClick event can be used to respond to a mouse button that is pressed twice within a short time. An ItemDoubleClick event is always preceded by an ItemClick event. If the pause between mouse click events is sufficiently long, the ItemClickAgain event may be generated instead of the ItemDoubleClick event.
If the ItemClick event is used to display a context sensitive menu (popup menu), the SoftelvdmUserControl.CancelMode method must be used before displaying the context menu.
sftTree1.Initializing = true;
sftTree1.Headers.Rows = 0;
sftTree1.Footers.Rows = 0;
sftTree1.Dimensions.LevelIndent = 5; // indent just a few pixels for level 1 items
sftTree1.TreeLineStyle = TreeLineStyleEnum.None;
sftTree1.ShowExpandCollapseButtons = ShowExpandCollapseButtonsEnum.None;
sftTree1.RowHeaders.Width = 0;
sftTree1.ShowFocusRectangle = false;
sftTree1.ItemClick += sftTree1_ItemClick;
sftTree1.ItemDoubleClick += sftTree1_ItemDoubleClick;
sftTree1.ShowToolTip += new SftTree.ShowToolTipEventHandler(sftTree1_ShowToolTip);
sftTree1.ToolTip.ShowAlways = true;
sftTree1.ToolTip.Style = ToolTipAppearanceEnum.Balloon;
ItemClass cat;
cat = AddCategory("Category 1");
item.Cells(0).Image = m_MinusImage
End If
item.ScrollIntoView()
Else
' selected an item
End If
End Sub
Private Sub sftTree1_ItemClick(ByVal sender As Object, ByVal e As Softelvdm.SftTreeNET.ItemClickEventArgs) Handles sftTree1.ItemClick
If e.MouseEv.Button = Windows.Forms.MouseButtons.Left And e.Area = ItemClickAreaEnum.CellSel Then
ClickCategory(e.Item)
End If
End Sub
Private Sub sftTree1_ItemDoubleClick(ByVal sender As Object, ByVal e As Softelvdm.SftTreeNET.ItemClickEventArgs) Handles sftTree1.ItemDoubleClick
If e.MouseEv.Button = Windows.Forms.MouseButtons.Left And e.Area = ItemClickAreaEnum.CellSel Then
See Also SftTree Class | Classes | SftTree/NET 2.0