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
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
SftTree/NET 2.0 - Tree Control
The selection changes.
| VB.NET | Private Sub object_SelectionChange(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.SelectionChange |
| VB | Private Sub object_SelectionChange() |
| C#.NET | void object_SelectionChange(object sender, EventArgumentType e); |
| VC++ | void OnSelectionChangeobject(); |
| C | HRESULT OnSelectionChangeobject(); |
object
The SelectionChange event occurs when the selection changes.
The SelectionChange event is not limited to mouse events as the selection can change through keyboard input also. To determine which mouse button was pressed and/or in which area of the tree control the mouse button was pressed, use the MouseDown or ItemClick events.
The Items.SelectionArea property can be used to control the areas that cause a selection change.
AxSftTree1.Items.RecalcHorizontalExtent() ' Update horizontal scroll bar
ElseIf AreaType = SftTreeAreaTypeConstants.constSftTreeColumn And e.colIndex = 0 Then
SetSortDirection(Not m_SortDirection)
ElseIf AreaType = SftTreeAreaTypeConstants.constSftTreeCellGraphic Then
ToggleImage(AxSftTree1.get_Cell(e.itemIndex, e.colIndex).Image)
End If
End Sub
Private Sub AxSftTree1_SelectionChange(ByVal sender As Object, ByVal e As System.EventArgs) Handles AxSftTree1.SelectionChange
CopyImageFromCurrentItem()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
' update all cells that have a progress bar by incrementing the progress value
Dim Items As Integer = AxSftTree1.Items.Count
Dim Cols As Integer = AxSftTree1.ColumnsObj.Count
break;
}
}
BEGIN_EVENTSINK_MAP(CPicturesDlg, CDialog)
//{{AFX_EVENTSINK_MAP(CPicturesDlg)
ON_EVENT(CPicturesDlg, IDC_SFTTREE1, 4 /* ItemClick */, OnItemClickSftTree1, VTS_I4 VTS_I2 VTS_I2 VTS_I2 VTS_I2)
ON_EVENT(CPicturesDlg, IDC_SFTTREE1, 5 /* ItemDblClick */, OnItemDblClickSftTree1, VTS_I4 VTS_I2 VTS_I2 VTS_I2 VTS_I2)
ON_EVENT(CPicturesDlg, IDC_SFTTREE1, 34 /* SelectionChange */, OnSelectionChangeSftTree1, VTS_NONE)
//}}AFX_EVENTSINK_MAP
END_EVENTSINK_MAP()
BOOL CPicturesDlg::OnWndMsg(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{
INT_PTR dmResult;
if (SftDarkMode_HandleDialogMessage(m_hWnd, message, wParam, lParam, &dmResult)) {See Also SftTree Object | Object Hierarchy
