Class TreeViewControl
Displays a hierarchical collection of labeled items, each represented by a TreeNode. Wraps the System.Windows.Forms.TreeView control.
Inheritance
Inherited Members
Namespace: FastReport.Dialog
Assembly: FastReport.dll
Syntax
public class TreeViewControl : DialogControl, IComponent, IDisposable, IFRSerializable, IHasEditor
Constructors
TreeViewControl()
Initializes a new instance of the TreeViewControl class with default settings.
Declaration
public TreeViewControl()
Properties
AfterSelectEvent
Gets or sets a script method name that will be used to handle the AfterSelect event.
Declaration
public string AfterSelectEvent { get; set; }
Property Value
Type | Description |
---|---|
System.String |
CheckBoxes
Gets or sets a value indicating whether check boxes are displayed next to the tree nodes in the tree view control. Wraps the System.Windows.Forms.TreeView.CheckBoxes property.
Declaration
public bool CheckBoxes { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ImageList
Gets or sets the ImageList that contains the Image objects used by the tree nodes. Wraps the System.Windows.Forms.TreeView.ImageList property.
Declaration
[Browsable(false)]
public ImageList ImageList { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Forms.ImageList |
Nodes
Gets the collection of tree nodes that are assigned to the tree view control. Wraps the System.Windows.Forms.TreeView.Nodes property.
Declaration
[Browsable(false)]
public TreeNodeCollection Nodes { get; }
Property Value
Type | Description |
---|---|
System.Windows.Forms.TreeNodeCollection |
SelectedNode
Gets or sets the tree node that is currently selected in the tree view control. Wraps the System.Windows.Forms.TreeView.SelectedNode property.
Declaration
[Browsable(false)]
public TreeNode SelectedNode { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Forms.TreeNode |
ShowLines
Gets or sets a value indicating whether lines are drawn between tree nodes in the tree view control. Wraps the System.Windows.Forms.TreeView.ShowLines property.
Declaration
public bool ShowLines { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ShowRootLines
Gets or sets a value indicating whether lines are drawn between the tree nodes that are at the root of the tree view. Wraps the System.Windows.Forms.TreeView.ShowRootLines property.
Declaration
public bool ShowRootLines { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Text
This property is not relevant to this class.
Declaration
[Browsable(false)]
public override string Text { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
TreeView
Gets an internal TreeView.
Declaration
[Browsable(false)]
public TreeView TreeView { get; }
Property Value
Type | Description |
---|---|
System.Windows.Forms.TreeView |
Methods
AttachEvents()
Attaches Control events to its event handlers.
Declaration
protected override void AttachEvents()
Overrides
Remarks
Override this method if your custom control has own events.
DetachEvents()
Detaches Control events from its event handlers.
Declaration
protected override void DetachEvents()
Overrides
Remarks
Override this method if your custom control has own events. In this method, you should detach control's events that were attached in the AttachEvents() method.
OnAfterSelect(TreeViewEventArgs)
This method fires the AfterSelect event and the script code connected to the AfterSelectEvent.
Declaration
public virtual void OnAfterSelect(TreeViewEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.TreeViewEventArgs | e | Event data. |
Serialize(FRWriter)
Serializes the object.
Declaration
public override void Serialize(FRWriter writer)
Parameters
Type | Name | Description |
---|---|---|
FRWriter | writer | Writer object. |
Overrides
Remarks
Do not call this method directly. You should override it if you are developing a new component for FastReport.
This method is called when the object needs to save the state. It may happen when:
- saving the report to the file or stream;
- saving the report to the designer's undo buffer;
- assigning the object to another object using the Assign(Base) or AssignAll methods;
- saving the object to the designer's clipboard;
- saving the object to the preview (when run a report).
ShouldSerializeBackColor()
Determines whether is necessary to serialize the BackColor property.
Declaration
protected override bool ShouldSerializeBackColor()
Returns
Type | Description |
---|---|
System.Boolean | true if serialization is necessary. |
Overrides
ShouldSerializeForeColor()
Determines whether is necessary to serialize the ForeColor property.
Declaration
protected override bool ShouldSerializeForeColor()
Returns
Type | Description |
---|---|
System.Boolean | true if serialization is necessary. |
Overrides
Events
AfterSelect
Occurs after the tree node is selected. Wraps the System.Windows.Forms.TreeView.AfterSelect event.
Declaration
public event TreeViewEventHandler AfterSelect
Event Type
Type | Description |
---|---|
System.Windows.Forms.TreeViewEventHandler |