windowsforms-devexpress-dot-xtratreelist-dot-treelist-55a6ba83.md
Fires when focus moves from one node to another.
Namespace : DevExpress.XtraTreeList
Assembly : DevExpress.XtraTreeList.v25.2.dll
NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList
[DXCategory("Property Changed")]
public event FocusedNodeChangedEventHandler FocusedNodeChanged
<DXCategory("Property Changed")>
Public Event FocusedNodeChanged As FocusedNodeChangedEventHandler
The FocusedNodeChanged event's data class is FocusedNodeChangedEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| Node | Gets the current Tree List node. Inherited from NodeEventArgs. |
| OldNode | Gets the previously focused Tree List node. |
The FocusedNodeChanged event fires when focus moves from node to node for the following reasons:
Handle the TreeList.BeforeFocusNode event to specify whether a particular node can receive focus.
You can use the FocusedRowChanged and TreeList.SelectionChanged events interchangeably in single selection mode (see treeList.OptionsSelection.MultiSelect).
The following code snippets (auto-collected from DevExpress Examples) contain references to the FocusedNodeChanged event.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
xaf-win-gantt-control/CS/XPO/GanttSolutionXPO/GanttSolutionXPO.Win/Editors/CustomGanttEditor.cs#L90
control.SelectionChanged += Control_SelectedIndexChanged;
control.FocusedNodeChanged += Control_FocusedNodeChanged;
control.MouseDoubleClick += Control_MouseDoubleClick;
winforms-spreadsheet-chart-api/CS/SpreadsheetChartAPISamples/Form1.cs#L148
treeList.OptionsPrint.UsePrintStyles = true;
treeList.FocusedNodeChanged += new DevExpress.XtraTreeList.FocusedNodeChangedEventHandler(this.OnNewExampleSelected);
treeList.OptionsView.ShowColumns = false;
winforms-spreadsheet-pivot-table-api/CS/SpreadsheetPivotTableExamples/Form1.cs#L136
treeList.OptionsPrint.UsePrintStyles = true;
treeList.FocusedNodeChanged += new DevExpress.XtraTreeList.FocusedNodeChangedEventHandler(this.OnNewExampleSelected);
treeList.OptionsView.ShowColumns = false;
winforms-spreadsheetcontrol-api-part-3/CS/SpreadsheetControl_API_Part03/Form1.cs#L311
treeList.OptionsPrint.UsePrintStyles = true;
treeList.FocusedNodeChanged += new DevExpress.XtraTreeList.FocusedNodeChangedEventHandler(this.OnNewExampleSelected);
treeList.OptionsView.ShowColumns = false;
winforms-richeditcontrol-common-api/CS/RichEditAPISample/Form1.cs#L415
treeList.OptionsPrint.UsePrintStyles = true;
treeList.FocusedNodeChanged += new DevExpress.XtraTreeList.FocusedNodeChangedEventHandler(this.OnNewExampleSelected);
treeList.OptionsView.ShowColumns = false;
winforms-spreadsheet-chart-api/VB/SpreadsheetChartAPISamples/Form1.vb#L143
treeList.OptionsPrint.UsePrintStyles = True
AddHandler treeList.FocusedNodeChanged, AddressOf OnNewExampleSelected
treeList.OptionsView.ShowColumns = False
winforms-spreadsheet-pivot-table-api/VB/SpreadsheetPivotTableExamples/Form1.vb#L129
treeList.OptionsPrint.UsePrintStyles = True
AddHandler treeList.FocusedNodeChanged, AddressOf OnNewExampleSelected
treeList.OptionsView.ShowColumns = False
winforms-spreadsheetcontrol-api-part-3/VB/SpreadsheetControl_API_Part03/Form1.vb#L314
treeList.OptionsPrint.UsePrintStyles = True
AddHandler treeList.FocusedNodeChanged, New FocusedNodeChangedEventHandler(AddressOf OnNewExampleSelected)
treeList.OptionsView.ShowColumns = False
winforms-richeditcontrol-common-api/VB/RichEditAPISample/Form1.vb#L407
treeList.OptionsPrint.UsePrintStyles = True
AddHandler treeList.FocusedNodeChanged, AddressOf OnNewExampleSelected
treeList.OptionsView.ShowColumns = False
winforms-richedit-document-api/VB/RichEditAPISample/Form1.vb#L410
treeList.OptionsPrint.UsePrintStyles = True
AddHandler treeList.FocusedNodeChanged, New FocusedNodeChangedEventHandler(AddressOf OnNewExampleSelected)
treeList.OptionsView.ShowColumns = False
See Also