This documentation is archived and is not being maintained.

TreeView.BeforeSelect Event

Occurs before the tree node is selected.

[Visual Basic]
Public Event BeforeSelect As TreeViewCancelEventHandler
public event TreeViewCancelEventHandler BeforeSelect;
public: __event TreeViewCancelEventHandler* BeforeSelect;

[JScript] In JScript, you can handle the events defined by a class, but you cannot define your own.

Event Data

The event handler receives an argument of type TreeViewCancelEventArgs containing data related to this event. The following TreeViewCancelEventArgs properties provide information specific to this event.

Property Description
Action Gets the type of TreeViewAction that raised the event.
Cancel (inherited from CancelEventArgs) Gets or sets a value indicating whether the event should be canceled.
Node Gets the tree node to be checked, expanded, collapsed, or selected.


For more information about handling events, see Consuming Events.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

TreeView Class | TreeView Members | System.Windows.Forms Namespace | OnBeforeSelect | AfterSelect | OnAfterSelect