Class MultiColumnTreeView
Represents the MultiColumnTreeView control is an advanced tree control that surpasses the functionality and look of the standard TreeView control.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Tools.MultiColumnTreeView
Assembly: Syncfusion.Tools.Windows.dll
Syntax
public class MultiColumnTreeView : ScrollControl, IDisposable, ICancelModeProvider, ISplitterPaneSupport, IScrollBarWrapperContainer, ISupportUpdating, ISupportIntelliMouse, IQueryFocusInside, ISupportInitialize, IThemedControl, INonClientPaintingSupport, IProvideCustomContextMenuPositionalInformation, IDragDispatcher, ISuppportHistory, IThemeProvider, IVisualStyle
Constructors
MultiColumnTreeView()
Initialize a new instance of the MultiColumnTreeView class.
Declaration
public MultiColumnTreeView()
Properties
ActiveNode
Gets or sets the node of TreeNodeAdv.
Declaration
public TreeNodeAdv ActiveNode { get; set; }
Property Value
Type |
---|
TreeNodeAdv |
AddSeparatorAtEnd
Gets or sets a value indicating whether the GetPath(String) method adds a separator at the end of the path string returned.
Declaration
public virtual bool AddSeparatorAtEnd { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Default is false. |
AllowDropStubWorks
Declaration
protected bool AllowDropStubWorks { get; set; }
Property Value
Type |
---|
System.Boolean |
AllowIncreaseSmallChange
Gets or sets the value of increasing small changes.
Declaration
public override bool AllowIncreaseSmallChange { get; set; }
Property Value
Type |
---|
System.Boolean |
Overrides
AllowKeyboardSearch
Gets or sets a value indicating whether keyboard based searching should be allowed.
Declaration
public virtual bool AllowKeyboardSearch { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Default value is true. |
Remarks
When set to true, the users can key in char keys to browse to the next node that begins with that character(s). Multiple characters entered in succession will be assumed to be part of the same word, so search will be performed on that substring. Search will be restricted to IsVisible and Expanded nodes.
AllowMouseBasedSelection
Gets or sets a value indicating whether multiple nodes can be selected with mouse down and drag.
Declaration
public virtual bool AllowMouseBasedSelection { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Default value is false. |
AutoAdjustMultiLineHeight
Gets or sets a value indicating whether to recalculate height of nodes for proper multi-line text displaying.
Declaration
public bool AutoAdjustMultiLineHeight { get; set; }
Property Value
Type |
---|
System.Boolean |
AutoControlsAdding
Declaration
protected bool AutoControlsAdding { get; set; }
Property Value
Type |
---|
System.Boolean |
AutoGenerateColumns
Gets or sets a value indicating whether to generate the columns automatically or not. The MultiColumnTreeView will creates columns automatically based on the property AutoGenerateColumns.
Declaration
public bool AutoGenerateColumns { get; set; }
Property Value
Type |
---|
System.Boolean |
AutoSizeMode
Gets or sets the value that indicates how the column widths are determined.
Declaration
public AutoSizeMode AutoSizeMode { get; set; }
Property Value
Type |
---|
AutoSizeMode |
BackColor
Gets or sets the back color.
Declaration
public override Color BackColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
BackgroundColor
Gets or sets the background color, gradient and other styles.
Declaration
public BrushInfo BackgroundColor { get; set; }
Property Value
Type |
---|
BrushInfo |
Remarks
The MultiColumnTreeView provides this property to enable specialized custom gradient backgrounds.
BaseStylePairs
Gets a collection of base style pairs used in the tree.
Declaration
public StyleNamePairsList BaseStylePairs { get; }
Property Value
Type |
---|
StyleNamePairsList |
BaseStyles
Gets a collection of base styles used in the tree.
Declaration
public virtual Hashtable BaseStyles { get; }
Property Value
Type | Description |
---|---|
System.Collections.Hashtable | A Hashtable of style names versus styles. The style names are of type string and the styles are of type TreeNodeAdvStyleInfo. |
Remarks
This collection holds the standard style that specifies the global node settings for all the nodes (is named "Standard"), the node level styles for nodes at specific levels (should use the convention "NodeLevelX") and other custom base styles. Also when you specify a style named "DragNodeCueStyle" that style will be applied on the nodes before preparing the drag-cue bitmap during drag-and-drop, a feature that can be turned on using the ShowDragNodeCue property.
BeforeTouchSize
Gets or sets Control size before touch enabled.
Declaration
public Size BeforeTouchSize { get; set; }
Property Value
Type |
---|
System.Drawing.Size |
Border3DStyle
Gets or sets the style of the 3D border.
Declaration
public Border3DStyle Border3DStyle { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Forms.Border3DStyle | One of the Border3DStyle values. Default is Border3DStyle.Sunken. |
BorderColor
Gets or sets the color of the 2D border.
Declaration
public Color BorderColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
BorderSides
Gets or sets the border sides of the control that will be drawn.
Declaration
public Border3DSide BorderSides { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Forms.Border3DSide | One of the System.Windows.Forms.Border3DSide values. Default is Border3DSide.All. |
BorderSingle
Gets or sets the 2D border style.
Declaration
public ButtonBorderStyle BorderSingle { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Forms.ButtonBorderStyle | One of the System.Windows.Forms.ButtonBorderStyle values. Default is ButtonBorderStyle.Solid. |
BorderStyle
Gets or sets the border style of the control.
Declaration
public BorderStyle BorderStyle { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Forms.BorderStyle | One of the BorderStyle values. Default is BorderStyle.Fixed3D. |
CanApplyTheme
Gets or sets a value indicating whether a SkinManager theme style has been applied to the control.
Declaration
public bool CanApplyTheme { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is true. |
CancelEdit
Declaration
protected bool CancelEdit { get; set; }
Property Value
Type |
---|
System.Boolean |
CanDrag
Declaration
protected bool CanDrag { get; set; }
Property Value
Type |
---|
System.Boolean |
CanGetDragImage
Declaration
protected bool CanGetDragImage { get; set; }
Property Value
Type |
---|
System.Boolean |
CanOverrideStyle
Gets or sets a value indicating whether control elements styles can be overridden by theme style settings.
Declaration
public bool CanOverrideStyle { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Default value is false. |
Remarks
By default, the control's element styles will not be overridden by theme style settings if the style is set in sample level. If this property is enabled, element style will be overridden by theme style settings event if it is set in sample level. This property should be enabled or disabled before calling the ThemeName property of the control.
CheckedMember
Gets or sets a value indicating the field to populate the state of checkbox of TreeNodeAdv in MultiColumnTreeView.
Declaration
public string CheckedMember { get; set; }
Property Value
Type |
---|
System.String |
CheckedNodes
Gets the checked nodes of the MultiColumnTreeView.
Declaration
public CheckedNodesCollection CheckedNodes { get; }
Property Value
Type |
---|
CheckedNodesCollection |
ChildMember
Gets or sets a value indicating the child data field which behaves as a Child Node in MultiColumnTreeView.
Declaration
public string ChildMember { get; set; }
Property Value
Type |
---|
System.String |
ClickedOnSelection
Declaration
protected bool ClickedOnSelection { get; set; }
Property Value
Type |
---|
System.Boolean |
ClientHeight
Declaration
protected int ClientHeight { get; }
Property Value
Type |
---|
System.Int32 |
ClosedImgIndex
Gets or sets the StateImageList index value of the image that is displayed when a tree node is collapsed.
Declaration
public virtual int ClosedImgIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | An index into the StateImageList. Default is 1. |
CollapsedNodes
Gets the collection of Nodes which are in Collapsed state. Result is calculated on reach call.
Declaration
public TreeNodeAdvCollection CollapsedNodes { get; }
Property Value
Type |
---|
TreeNodeAdvCollection |
Columns
Gets or sets the columns of the MultiColumnTreeView.
Declaration
public virtual TreeColumnAdvCollection Columns { get; }
Property Value
Type |
---|
TreeColumnAdvCollection |
ColumnsHeaderBackground
Gets or sets the background color, gradient and other styles for column's headers zone.
Declaration
public BrushInfo ColumnsHeaderBackground { get; set; }
Property Value
Type |
---|
BrushInfo |
ColumnsMovedMode
Declaration
protected bool ColumnsMovedMode { get; set; }
Property Value
Type |
---|
System.Boolean |
CreateParams
Declaration
protected override CreateParams CreateParams { get; }
Property Value
Type |
---|
System.Windows.Forms.CreateParams |
Overrides
DataMember
Gets or sets a name of a specific data table within the DataSource.
Declaration
public string DataMember { get; set; }
Property Value
Type |
---|
System.String |
DataSource
Gets or sets the Data Source object in MultiColumnTreeView
Declaration
public object DataSource { get; set; }
Property Value
Type |
---|
System.Object |
DefaultCollapseImageIndex
Gets or sets index of default image for collapse button.
Declaration
public int DefaultCollapseImageIndex { get; set; }
Property Value
Type |
---|
System.Int32 |
DefaultExpandImageIndex
Gets or sets index of default image for expand button.
Declaration
public int DefaultExpandImageIndex { get; set; }
Property Value
Type |
---|
System.Int32 |
Dragging
Declaration
protected bool Dragging { get; set; }
Property Value
Type |
---|
System.Boolean |
DragHelper
Declaration
protected DragHelper DragHelper { get; set; }
Property Value
Type |
---|
DragHelper |
DragOnText
Gets or sets a value indicating whether the drag-drop operation will occur only if the node is dragged on the text area.
Declaration
public virtual bool DragOnText { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Default is true. |
EnableTouchMode
Gets or sets value to enable or disable the Touchmode to the controls.
Declaration
public bool EnableTouchMode { get; set; }
Property Value
Type |
---|
System.Boolean |
Remarks
Scale factor will be updated automatically if scalefactor is equal to 1
EnsureVisibleFlag
Declaration
protected bool EnsureVisibleFlag { get; set; }
Property Value
Type |
---|
System.Boolean |
EnsureVisibleSelectedNode
Gets or sets a value indicating whether the selected node will be brought to view by scrolling, if necessary.
Declaration
public virtual bool EnsureVisibleSelectedNode { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Default is true. |
ExpandedNodes
Gets the collection of Nodes which are in Expanded state. Result is calculated on reach call.
Declaration
public TreeNodeAdvCollection ExpandedNodes { get; }
Property Value
Type |
---|
TreeNodeAdvCollection |
Filter
Gets or sets the function to apply custom filter on source programmatically.
Declaration
public Predicate<object> Filter { get; set; }
Property Value
Type |
---|
System.Predicate<System.Object> |
FilterLevel
Declaration
public FilterLevel FilterLevel { get; set; }
Property Value
Type |
---|
FilterLevel |
Font
Gets or sets the System.Drawing.Font value for the control.
Declaration
public override Font Font { get; set; }
Property Value
Type |
---|
System.Drawing.Font |
FullRowSelect
Gets or sets a value indicating whether the complete row will be highlighted when a node is selected.
Declaration
public virtual bool FullRowSelect { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Default value is false. |
GutterSpace
Gets or sets the space left on the left side of the control.
Declaration
public virtual int GutterSpace { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | Default is 3. |
HasColumns
Declaration
protected bool HasColumns { get; }
Property Value
Type | Description |
---|---|
System.Boolean | True if control has at least one column, otherwise False. |
HeaderHeight
Gets or sets the height of header.
Declaration
public int HeaderHeight { get; set; }
Property Value
Type |
---|
System.Int32 |
HelpTextControl
Gets the helptext control of the MultiColumnTreeView.
Declaration
public virtual ToolTipAdv HelpTextControl { get; }
Property Value
Type |
---|
ToolTipAdv |
Remarks
This is the control used to display the HelpText of the nodes.
HideSelection
Gets or sets a value indicating whether the MultiColumnTreeView will hide it's selected nodes when not focused.
Declaration
public virtual bool HideSelection { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | True to hide selection; false otherwise. Default value is true. |
HistoryEnabled
Gets or sets a value indicating whether register items in history list.
Declaration
public bool HistoryEnabled { get; set; }
Property Value
Type |
---|
System.Boolean |
HistoryManager
Gets or sets the HistoryManager value.
Declaration
public HistoryManager HistoryManager { get; set; }
Property Value
Type |
---|
HistoryManager |
HorizontalScrollBar
Gets or sets a value indicating whether Enables or disables horizontal scrollbar. This property will be set/reset by the tree as and when required.
Declaration
protected bool HorizontalScrollBar { get; set; }
Property Value
Type |
---|
System.Boolean |
HorizontalThumbTrack
Gets or sets a value indicates whether the control should scroll while the user is dragging a horizontal scrollbar thumb.
Declaration
public override bool HorizontalThumbTrack { get; set; }
Property Value
Type |
---|
System.Boolean |
Overrides
HotTracking
Gets or sets a value indicating whether the nodes will have a hot tracked appearance when the mouse cursor is hovering over them.
Declaration
public virtual bool HotTracking { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Default value is false. |
HScroll
Gets or sets a value indicating whether Enables or disables horizontal scrollbar.
Declaration
public bool HScroll { get; set; }
Property Value
Type |
---|
System.Boolean |
HScrollPos
Gets or sets the position of the Horizontal scrollbar.
Declaration
public int HScrollPos { get; set; }
Property Value
Type |
---|
System.Int32 |
IgnoreLeave
Declaration
protected bool IgnoreLeave { get; set; }
Property Value
Type |
---|
System.Boolean |
IgnoreNextMouseMove
Declaration
protected bool IgnoreNextMouseMove { get; set; }
Property Value
Type |
---|
System.Boolean |
IgnoreThemeBackground
Gets or sets a value indicating whether the control will ignore the theme's background color and draw the BackgroundColor instead when ThemesEnabled is true.
Declaration
public bool IgnoreThemeBackground { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | True to ignore theme background; false otherwise. Default is false. |
InactiveSelectedNodeBackground
Gets or sets the background of the selected node when the control is not focused.
Declaration
public virtual BrushInfo InactiveSelectedNodeBackground { get; set; }
Property Value
Type | Description |
---|---|
BrushInfo | Default is based on a system color. |
InactiveSelectedNodeForeColor
Gets or sets the text color of the selected node when not focused.
Declaration
public virtual Color InactiveSelectedNodeForeColor { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Color | Default is a system color. |
Indent
Gets or sets the indent of the child nodes from the parent node.
Declaration
public virtual int Indent { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | Default value is 19. |
InHScroll
Declaration
protected bool InHScroll { get; set; }
Property Value
Type |
---|
System.Boolean |
InteractiveCheckBoxes
Gets or sets a value indicating whether the state of the parent node's checkbox is based on the checkstate of it's child nodes' checkboxes.
Declaration
public virtual bool InteractiveCheckBoxes { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Default value is false. |
Remarks
If all child nodes are checked the parent node is also checked. The same with unchecked. If some child nodes are checked and some are unchecked then the parent node will have an indeterminate state. If the CheckState of the parent node is set by code or by clicking on it the state of all subnodes will be set to that state.
InVScroll
Declaration
protected bool InVScroll { get; set; }
Property Value
Type |
---|
System.Boolean |
IsEditEnding
Declaration
protected bool IsEditEnding { get; set; }
Property Value
Type |
---|
System.Boolean |
IsEditing
Gets a value indicating whether selected node is in editing mode.
Declaration
public bool IsEditing { get; }
Property Value
Type |
---|
System.Boolean |
IsKeyDown
Declaration
protected bool IsKeyDown { get; set; }
Property Value
Type |
---|
System.Boolean |
IsLeftMouseDown
Declaration
protected bool IsLeftMouseDown { get; set; }
Property Value
Type |
---|
System.Boolean |
IsMouseDown
Declaration
protected bool IsMouseDown { get; set; }
Property Value
Type |
---|
System.Boolean |
IsMouseDownWithCtrl
Declaration
protected bool IsMouseDownWithCtrl { get; set; }
Property Value
Type |
---|
System.Boolean |
IsMouseUp
Declaration
protected bool IsMouseUp { get; set; }
Property Value
Type |
---|
System.Boolean |
IsVisualStyleEnabled
Gets a value indicating whether the visual style based theme is applied to the control. This also indicates whether the theme files are referred from external assemblies or not.
Declaration
public bool IsVisualStyleEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean | Return true, if the visual style based theme is applied to control. Otherwise returns false. |
ItemHeight
Gets or sets the default height of the nodes.
Declaration
public virtual int ItemHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | Default value is dependent on the control's font height. |
KeepDottedSelection
Gets or sets a value indicating whether control must draw dotted rectangle around selected node when it has no focus.
Declaration
public bool KeepDottedSelection { get; set; }
Property Value
Type |
---|
System.Boolean |
KeepDragCapturePoint
Gets or sets a value indicating whether cue image should be drawn at a distance below the mouse cursor while dragging.
Declaration
public bool KeepDragCapturePoint { get; set; }
Property Value
Type |
---|
System.Boolean |
LabelEdit
Gets or sets a value indicating whether the label text of the tree nodes can be edited.
Declaration
public virtual bool LabelEdit { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | True if the label text of the tree nodes can be edited; false otherwise. The default is false. |
Remarks
The BeginEdit() method will let you begin editing a node programmatically irrespective of this setting.
LastVisibleNode
Gets the last visible node.
Declaration
public virtual TreeNodeAdv LastVisibleNode { get; }
Property Value
Type | Description |
---|---|
TreeNodeAdv | A TreeNodeAdv instance. |
Remarks
LeftImageList
Gets or sets the imagelist that holds images to be drawn on the left of the node.
Declaration
public virtual ImageList LeftImageList { get; set; }
Property Value
Type |
---|
System.Windows.Forms.ImageList |
Remarks
The LeftImageIndices will then indicate which images are to be drawn in the node.
LineColor
Gets or sets the color of the tree lines.
Declaration
public virtual Color LineColor { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Color | Default is Color.Gray. |
LineStyle
Gets or sets the line style of the tree lines.
Declaration
public virtual DashStyle LineStyle { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Drawing2D.DashStyle | Default value is DashStyle.Dot. |
LoadOnDemand
Gets or sets a value indicating whether the tree should follow the load-on-demand paradigm.
Declaration
public virtual bool LoadOnDemand { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Default value is false. |
Remarks
When set to true, all the nodes will have the plus-minus set to visible to begin with. You should then handle the BeforeExpand event of the nodes and add subnodes to the respective nodes. The tree will then keep or hide the plus-minus based on whether or not children were added.
This provides you a way to delay loading nodes in trees until the user initiates a node expand.
MeasureGraphics
Gets or sets special measure graphics that allowing measuring without control creation.
Declaration
protected Graphics MeasureGraphics { get; set; }
Property Value
Type |
---|
System.Drawing.Graphics |
MetroColor
Gets or sets the value to the color of the MetroColor.
Declaration
public Color MetroColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
MouseLeaved
Declaration
protected bool MouseLeaved { get; set; }
Property Value
Type |
---|
System.Boolean |
NeedUpdateEditTop
Declaration
protected bool NeedUpdateEditTop { get; set; }
Property Value
Type |
---|
System.Boolean |
NoChildrenImgIndex
Gets or sets the StateImageList index value of the image that is displayed when a tree node has no children.
Declaration
public virtual int NoChildrenImgIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | An index into the StateImageList. Default is zero. |
NodeHoverColor
Gets or sets the value to the color of the MetroColor.
Declaration
public Color NodeHoverColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
Nodes
Gets or sets the top-level nodes collection of the MultiColumnTreeView.
Declaration
public virtual TreeNodeAdvCollection Nodes { get; }
Property Value
Type |
---|
TreeNodeAdvCollection |
NodeStateImageList
Gets or sets ImageList with images that are displayed instead of expand or collapse button.
Declaration
public ImageList NodeStateImageList { get; set; }
Property Value
Type |
---|
System.Windows.Forms.ImageList |
OpenImgIndex
Gets or sets the StateImageList index value of the image that is displayed when a tree node is expanded.
Declaration
public virtual int OpenImgIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | An index into the StateImageList. Default is 2. |
OwnerDrawNodes
Gets or sets a value indicating whether the BeforeNodePaint and AfterNodePaint events will be fired before drawing a node.
Declaration
public virtual bool OwnerDrawNodes { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Default value is false. |
OwnerDrawNodesBackground
Gets or sets a value indicating whether the NodeBackgroundPaint event will be fired before drawing a node's background.
Declaration
public virtual bool OwnerDrawNodesBackground { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Default value is false. |
Padding
Gets or sets the padding value.
Declaration
public Padding Padding { get; set; }
Property Value
Type |
---|
System.Windows.Forms.Padding |
ParentMember
Gets or sets a value indicating the parent data field which behaves as a Parent Node in MultiColumnTreeView.
Declaration
public string ParentMember { get; set; }
Property Value
Type |
---|
System.String |
PathSeparator
Gets or sets the separator string that splits the path of a node.
Declaration
public virtual string PathSeparator { get; set; }
Property Value
Type | Description |
---|---|
System.String | Default value is "". |
Remarks
Call GetPath(String) to get the path of the specified node.
PreparingDragCueBitmap
Declaration
protected bool PreparingDragCueBitmap { get; set; }
Property Value
Type |
---|
System.Boolean |
PrintDocument
Gets the PrintDocument of the MultiColumnTreeView.
Declaration
public PrintDocument PrintDocument { get; }
Property Value
Type |
---|
System.Drawing.Printing.PrintDocument |
Remarks
when you use print document it will give the snap shot only so use printpreview
Printing
Gets or sets a value indicating whether the MultiColumnTreeView is printing.
Declaration
public bool Printing { get; set; }
Property Value
Type |
---|
System.Boolean |
RightImageList
Gets or sets the imagelist that holds images to be drawn on the right of the node.
Declaration
public virtual ImageList RightImageList { get; set; }
Property Value
Type |
---|
System.Windows.Forms.ImageList |
Remarks
The RightImageIndices will then indicate which images are to be drawn in the node.
RMouseDownNode
Gets or sets the node on which the user did a right-mouse down.
Declaration
public virtual TreeNodeAdv RMouseDownNode { get; set; }
Property Value
Type | Description |
---|---|
TreeNodeAdv | A TreeNodeAdv instance. |
Remarks
This property will return a non-null value only when the user has his mouse down or when the context menu is being shown for the tree.
Use this property in your context-menu's popup event to determine on which node the user had right-clicked. However, do not use this property in a context menu item's Click property as this would be set to null by then. If the user right-clicked in the empty region then this property will return null.
When the user instead used the keyboard to invoke the context menu (via Shift+F10) then this property will return the currently selected node and the menu will also appear beside the selected node.
Root
Gets or sets the root node of the MultiColumnTreeView.
Declaration
public virtual TreeNodeAdv Root { get; set; }
Property Value
Type |
---|
TreeNodeAdv |
Scrollable
Gets or sets a value indicating whether Enables or disables scrollbars.
Declaration
public virtual bool Scrollable { get; set; }
Property Value
Type |
---|
System.Boolean |
SelectedItem
Gets the SelectedItem object from the DataSource in MultiColumnTreeView
Declaration
public object SelectedItem { get; }
Property Value
Type |
---|
System.Object |
Remarks
SelectedItem property will return value only when DataSource is used to define the underlying tree data
SelectedItems
Gets the SelectedItems objects from the DataSource in MultiColumnTreeView
Declaration
public BindingList<object> SelectedItems { get; }
Property Value
Type |
---|
System.ComponentModel.BindingList<System.Object> |
Remarks
SelectedItems will return value only when DataSource is used to define the underlying tree data
SelectedNode
Gets or sets the selected node of the MultiColumnTreeView.
Declaration
public virtual TreeNodeAdv SelectedNode { get; set; }
Property Value
Type |
---|
TreeNodeAdv |
Remarks
The tree fires the BeforeSelect event to let you cancel the change and AfterSelect event to notify you of a new selected node.
Use to SelectedNodes property when multi-node selection is turned on.
SelectedNodeBackground
Gets or sets the background of the selected node.
Declaration
public virtual BrushInfo SelectedNodeBackground { get; set; }
Property Value
Type | Description |
---|---|
BrushInfo | Default is based on a system color. |
SelectedNodeForeColor
Gets or sets the text color of the selected node.
Declaration
public virtual Color SelectedNodeForeColor { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Color | Default is a system color. |
SelectedNodes
Gets the selected nodes of the MultiColumnTreeView.
Declaration
public SelectedNodesCollection SelectedNodes { get; }
Property Value
Type |
---|
SelectedNodesCollection |
Remarks
Use this property only when SelectionMode property lets you select multiple nodes. Otherwise, use SelectedNode to get the single selected node.
SelectionBaseNode
Gets the base node, based on which multiple selection will be performed.
Declaration
public virtual TreeNodeAdv SelectionBaseNode { get; }
Property Value
Type | Description |
---|---|
TreeNodeAdv | A TreeNodeAdv instance or null if there is no such node. |
Remarks
This node will be consulted while extending the selection in a multi-select scenario using user interaction or when calling the ExtendSelectionTo(TreeNodeAdv, Boolean) method.
SelectionMode
Gets or sets the selection mode for the tree.
Declaration
public virtual TreeSelectionMode SelectionMode { get; set; }
Property Value
Type | Description |
---|---|
TreeSelectionMode | Default is TreeSelectionMode.Single. |
Remarks
Note that setting this property does not affect the current selection state.
For example, if the current selection includes multiple nodes and this property gets set
to TreeSelectionMode.Single, then the
SelectOnCollapse
Gets or sets a value indicating whether the collapsed node should be selected if any of the child node is selected or not.
Declaration
public bool SelectOnCollapse { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
If this property is set to false, it won't trigger the BeforeSelect and AfterSelect event after collapsing the node.
SelectUpwardDirection
Declaration
protected bool SelectUpwardDirection { get; set; }
Property Value
Type |
---|
System.Boolean |
SelfRelationRootValue
Gets or sets the value that defines the root object in a self-relational mode when DataSource is used to define the underlying tree data.
Declaration
public string SelfRelationRootValue { get; set; }
Property Value
Type |
---|
System.String |
ShouldSelectNodeOnEnter
Gets or sets a value indicating whether the default node should be selected on the MultiColumnTreeView control gains focus.
Declaration
public bool ShouldSelectNodeOnEnter { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ShowCheckBoxes
Gets or sets a value indicating whether checkboxes will be shown for the nodes.
Declaration
public virtual bool ShowCheckBoxes { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Default value is false. |
ShowColumnsHeader
Gets or sets a value indicating whether header drawn or not.
Declaration
public virtual bool ShowColumnsHeader { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Default value is True. |
ShowDragNodeCue
Gets or sets a value indicating whether an alpha blended image of the selected nodes should be drawn beside the cursor during drag and drop.
Declaration
public virtual bool ShowDragNodeCue { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | True to show an alpha blended image; false otherwise. Default is true. You could customize the style in which nodes are drawn in the above image by adding a "DragNodeCueStyle" style to the BaseStyles collection. |
ShowLines
Gets or sets a value indicating whether the tree lines are visible.
Declaration
public virtual bool ShowLines { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Default value is true. |
ShowOptionButtons
Gets or sets a value indicating whether the nodes will have an option button.
Declaration
public virtual bool ShowOptionButtons { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Default value is false. |
ShowPlusMinus
Gets or sets a value indicating whether the plus minus controls are visible.
Declaration
public virtual bool ShowPlusMinus { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Default value is true. |
ShowRootLines
Gets or sets a value indicating whether lines are drawn between the tree nodes that are at the root of the tree view.
Declaration
public virtual bool ShowRootLines { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Default value is true. |
SmartSizeBox
Gets or sets a value indicating whether the size box should be drawn when both scrollbars are visible and the control is not a docked window in an MDIChild window.
Declaration
public bool SmartSizeBox { get; set; }
Property Value
Type |
---|
System.Boolean |
Remarks
Showing the size box works around a problem with .NET controls because by default the the area at the bottom right is not drawn and that can cause drawing glitches. Note: Another better solution is drawing NonClientArea ourselves. See SizeGripStyle which implements this newer solution.
SortWithChildNodes
Gets or sets a value indicating whether sort treeview including all the child nodes.
Declaration
public bool SortWithChildNodes { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Examples
This example describes how to sort all the nodes in the MultiColumnTreeView
If SortWithChildNodes property is set to true,the user can sort all the nodes including all the child nodes in the treeViewAdv.
The SortOrder of the Root should be specified for the sorting all nodes.
// Sorts only the root nodes.
private void button1_Click(object sender, System.EventArgs e)
{
this.treeViewAdv1.Nodes.Sort();
}
// Sort all the root nodes and the child nodes in the TreeviewAdv
private void button2_Click_1(object sender, System.EventArgs e)
{
this.treeViewAdv1.Root.SortOrder=SortOrder.Ascending;
this.treeViewAdv1.SortWithChildNodes=true;
this.treeViewAdv1.Root.Sort();
}
'Sorts only the root nodes.
Private Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Me.treeViewAdv1.Nodes.Sort()
End Sub
'Sort all the root nodes and the child nodes in the TreeviewAdv
Private Sub button2_Click_1(ByVal sender As Object, ByVal e As System.EventArgs)
Me.treeViewAdv1.Root.SortOrder=SortOrder.Ascending
Me.treeViewAdv1.SortWithChildNodes=True
Me.treeViewAdv1.Root.Sort()
End Sub
StandardColumnStyle
Gets the standard style that all columns inherit from, by default.
Declaration
public TreeColumnAdvStyleInfo StandardColumnStyle { get; }
Property Value
Type |
---|
TreeColumnAdvStyleInfo |
StandardStyle
Gets the standard style that all the nodes inherit from, by default.
Declaration
public TreeNodeAdvStyleInfo StandardStyle { get; }
Property Value
Type |
---|
TreeNodeAdvStyleInfo |
StandardSubItemStyle
Gets the standard style that all sub-items inherit from, by default.
Declaration
public TreeNodeAdvSubItemStyleInfo StandardSubItemStyle { get; }
Property Value
Type |
---|
TreeNodeAdvSubItemStyleInfo |
StateImageList
Gets or sets the imagelist that holds images to be drawn based on the state of the node.
Declaration
public virtual ImageList StateImageList { get; set; }
Property Value
Type |
---|
System.Windows.Forms.ImageList |
Remarks
The OpenImgIndex, ClosedImgIndex and NoChildrenImgIndex properties refer to an image inside this list.
Style
Gets or sets the value to the Style.
Declaration
public MultiColumnVisualStyle Style { get; set; }
Property Value
Type |
---|
MultiColumnVisualStyle |
SuspendExpandRecalculate
Gets or sets a value indicating whether the Recalculation of the nodes maximum height should be done while expanding or collapsing.
Declaration
public bool SuspendExpandRecalculate { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
This property can be reduced the delay while expanding/ collapsing the large number of nodes, if we set it as true.
ThemeName
Gets or sets the theme name of the ContextMenuStripEx control.
Declaration
public string ThemeName { get; set; }
Property Value
Type |
---|
System.String |
ThemesEnabled
Gets or sets a value indicating whether the control and it's parts should be drawn themed.
Declaration
public bool ThemesEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | True to enable themes; false otherwise. Default is false. |
ThemeStyle
Gets or sets the MultiColumnTreeViewVisualStyle value used to customize the appearance of the MultiColumnTreeView.
Declaration
public MultiColumnTreeViewVisualStyle ThemeStyle { get; set; }
Property Value
Type |
---|
MultiColumnTreeViewVisualStyle |
Remarks
This ThemeStyle settings will be applied only when the VisualStyleBased theme has been applied to the control.
ToolTipControl
Gets the tooltip control of the MultiColumnTreeView.
Declaration
public virtual ToolTipAdv ToolTipControl { get; }
Property Value
Type |
---|
ToolTipAdv |
Remarks
This is the control used to display the tooltip for the nodes when the text of the nodes are partially visible.
TopVisibleNode
Gets the first fully-visible tree node in the tree view control.
Declaration
public TreeNodeAdv TopVisibleNode { get; }
Property Value
Type | Description |
---|---|
TreeNodeAdv | A TreeNodeAdv that represents the first fully-visible tree node in the tree view control. |
Remarks
Initially, the TopVisibleNode returns the first root tree node, which is located at the top of the MultiColumnTreeView. However, if the user has scrolled the contents, another tree node might be at the top. LastVisibleNode
TransparentControls
Gets or sets a value indicating whether the controls (eg PlusMinus) will have a transparent background.
Declaration
public virtual bool TransparentControls { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Default is false. |
Remarks
Setting this property slows down drawing of the MultiColumnTreeView control.
TreeAllColumnsRectangle
Gets Rectangle reserved by control for tree painting.
Declaration
protected Rectangle TreeAllColumnsRectangle { get; }
Property Value
Type |
---|
System.Drawing.Rectangle |
TreeColumnRectangle
Gets Rectangle reserved by control for tree painting. RTL mirror effect is applied on result rectangle automatically. Scrolling effects also applied on result rectangle automatically.
Declaration
protected Rectangle TreeColumnRectangle { get; }
Property Value
Type |
---|
System.Drawing.Rectangle |
UseDefaultDrawing
Gets or sets a value indicating whether default graphics to be used for drawing instead of double buffering for faster drawing performance.
Declaration
public bool UseDefaultDrawing { get; set; }
Property Value
Type |
---|
System.Boolean |
VerticallScrollBar
Gets or sets a value indicating whether Enables or disables vertical scrollbar. This property will be set/reset by the tree as and when required.
Declaration
protected bool VerticallScrollBar { get; set; }
Property Value
Type |
---|
System.Boolean |
VerticalThumbTrack
Gets or sets the value indicates whether the control should scroll while the user is dragging a vertical scrollbar thumb.
Declaration
public override bool VerticalThumbTrack { get; set; }
Property Value
Type |
---|
System.Boolean |
Overrides
VisibleCount
Gets the number of tree nodes that can be fully visible in the tree view control.
Declaration
public int VisibleCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The number of TreeNodeAdv items that can be fully visible in the MultiColumnTreeView control. |
Remarks
The VisibleCount value can be greater than the number of tree nodes in the tree view. The value is calculated by dividing the height of the client window by the height of a tree node item. The result is the total number of TreeNodeAdv objects that the MultiColumnTreeView is capable of displaying within its current dimensions.
VScroll
Gets or sets a value indicating whether Enables or disables vertical scrollbar.
Declaration
public bool VScroll { get; set; }
Property Value
Type |
---|
System.Boolean |
VScrollPos
Gets or sets the position of the Vertical scrollbar.
Declaration
public int VScrollPos { get; set; }
Property Value
Type |
---|
System.Int32 |
Methods
ApplyScaleToControl(Single)
Scale the control based on the scale factor passed in the argument.
Declaration
public void ApplyScaleToControl(float scaleFactor)
Parameters
Type | Name | Description |
---|---|---|
System.Single | scaleFactor | value to scale the factor based upon. |
BeginEdit()
Begins the editing of the selected node.
Declaration
public virtual void BeginEdit()
BeginEdit(TreeNodeAdv)
Overloaded. Begins the editing of the specified node.
Declaration
public void BeginEdit(TreeNodeAdv node)
Parameters
Type | Name | Description |
---|---|---|
TreeNodeAdv | node | The node to edit. |
CancelEditMode()
Cancels the edit mode.
Declaration
public void CancelEditMode()
Remarks
The CancelEditMode method cancels the edit mode when the node is in the EditingMode.
CancelMode()
Cancels any current mouse based selection and edit mode.
Declaration
public void CancelMode()
CollapseAll()
Collapses all the tree nodes.
Declaration
public void CollapseAll()
Remarks
The CollapseAll method collapses all the TreeNodeAdv objects, including all the child tree nodes, that are in the MultiColumnTreeView control.
The state of a TreeNodeAdv persists. For example, suppose that a parent tree node is expanded. If the child tree nodes were not previously collapsed, they will appear in their previously-expanded state. Calling the CollapseAll method ensures that all the tree nodes appear in the collapsed state.
CreateAccessibilityInstance()
Declaration
protected override AccessibleObject CreateAccessibilityInstance()
Returns
Type |
---|
System.Windows.Forms.AccessibleObject |
DispatchDoDragDrop(Object, DragDropEffects)
Initiates the drag drop operation.
Declaration
public DragDropEffects DispatchDoDragDrop(object data, DragDropEffects allowedEffects)
Parameters
Type | Name | Description |
---|---|---|
System.Object | data | |
System.Windows.Forms.DragDropEffects | allowedEffects |
Returns
Type |
---|
System.Windows.Forms.DragDropEffects |
DispatchDragOver(DragEventArgs)
Initiates the drag over operation.
Declaration
public void DispatchDragOver(DragEventArgs drgevent)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.DragEventArgs | drgevent |
DispatchOnDragDrop(DragEventArgs)
Initiates the drag drop operation.
Declaration
public void DispatchOnDragDrop(DragEventArgs drgevent)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.DragEventArgs | drgevent |
DispatchOnDragEnter(DragEventArgs)
Initiates the drag enter operation.
Declaration
public void DispatchOnDragEnter(DragEventArgs drgevent)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.DragEventArgs | drgevent |
DispatchOnDragLeave(EventArgs)
Initiates the drag leave operation.
Declaration
public void DispatchOnDragLeave(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
DispatchOnGiveFeedback(GiveFeedbackEventArgs)
Initiates the feedback operation.
Declaration
public void DispatchOnGiveFeedback(GiveFeedbackEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.GiveFeedbackEventArgs | args |
DispatchOnQueryContinueDrag(QueryContinueDragEventArgs)
Initiates the drag-and-drop operation and decide whether to continue the operation.
Declaration
public void DispatchOnQueryContinueDrag(QueryContinueDragEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.QueryContinueDragEventArgs | args |
Dispose(Boolean)
Cleans up any resources being used.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Overrides
DoDragDrop(Object, DragDropEffects)
Begins a drag-and-drop operation. Added by lucas in order to resolve problem 169.
Declaration
public DragDropEffects DoDragDrop(object data, DragDropEffects allowedEffects)
Parameters
Type | Name | Description |
---|---|---|
System.Object | data | The data to drag. |
System.Windows.Forms.DragDropEffects | allowedEffects | One of the DragDropEffects values. |
Returns
Type | Description |
---|---|
System.Windows.Forms.DragDropEffects | A value from the DragDropEffects enumeration that represents the final effect that was performed during the drag-and-drop operation. |
Draw(PaintEventArgs)
Declaration
protected virtual void Draw(PaintEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.PaintEventArgs | e |
DrawBackground(PaintEventArgs)
Declaration
protected virtual void DrawBackground(PaintEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.PaintEventArgs | e |
DrawBackgroundColumns(PaintEventArgs)
Declaration
protected virtual void DrawBackgroundColumns(PaintEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.PaintEventArgs | e |
DrawBackgroundForEmptyColumnCell(Graphics, Rectangle, Rectangle, TreeNodeAdv, TreeNodeAdv)
Fills empty cell for column
Declaration
protected virtual void DrawBackgroundForEmptyColumnCell(Graphics g, Rectangle selectionBounds, Rectangle bounds, TreeNodeAdv node, TreeNodeAdv mouseDownNode)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | g | |
System.Drawing.Rectangle | selectionBounds | |
System.Drawing.Rectangle | bounds | |
TreeNodeAdv | node | |
TreeNodeAdv | mouseDownNode |
DrawHeader(Graphics, Rectangle, Int32)
Method draw header of the tree view
Declaration
protected virtual int DrawHeader(Graphics g, Rectangle bounds, int bordersOffset)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | g | Graphics on which we should draw columns. |
System.Drawing.Rectangle | bounds | Control bounds. |
System.Int32 | bordersOffset | area reserved for borders |
Returns
Type | Description |
---|---|
System.Int32 | Height of header. |
DrawNode(Graphics, Rectangle, TreeNodeAdv, Int32, Point, Boolean, Boolean)
Declaration
protected virtual void DrawNode(Graphics g, Rectangle clip, TreeNodeAdv node, int y, Point mousePos, bool mouseDown, bool background)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | g | |
System.Drawing.Rectangle | clip | |
TreeNodeAdv | node | |
System.Int32 | y | |
System.Drawing.Point | mousePos | |
System.Boolean | mouseDown | |
System.Boolean | background |
DrawNodeBackground(Graphics, TreeNodeAdv, Int32, TreeNodeAdv, Rectangle, Boolean, Boolean, Boolean)
Declaration
protected virtual void DrawNodeBackground(Graphics g, TreeNodeAdv node, int offsetY, TreeNodeAdv mouseDownNode, Rectangle clip, bool active, bool selected, bool hotTrack)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | g | |
TreeNodeAdv | node | |
System.Int32 | offsetY | |
TreeNodeAdv | mouseDownNode | |
System.Drawing.Rectangle | clip | |
System.Boolean | active | |
System.Boolean | selected | |
System.Boolean | hotTrack |
DrawNodeSubItems(Graphics, TreeNodeAdv, Int32)
Declaration
protected virtual void DrawNodeSubItems(Graphics g, TreeNodeAdv node, int offsetY)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | g | |
TreeNodeAdv | node | |
System.Int32 | offsetY |
DrawVerticalLines(Graphics, TreeNodeAdv, TreeNodeAdv, Int32, Int32)
Draws the vertical lines of the tree.
Declaration
protected virtual void DrawVerticalLines(Graphics g, TreeNodeAdv topCRNode, TreeNodeAdv node, int rowIndex, int lastNode)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | g | Graphics object. |
TreeNodeAdv | topCRNode | |
TreeNodeAdv | node | Node to draw the vertical lines to. |
System.Int32 | rowIndex | The RowIndex of the node. |
System.Int32 | lastNode | The Last Visible Node Row Index for comparing if in the node iteration nodes have passed it. |
EndEdit()
Forces the end of the editing of the selected node.
Declaration
public void EndEdit()
EndEdit(Boolean)
Saves or Cancels the editing of the selected node.
Declaration
public virtual void EndEdit(bool cancel)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | cancel | True to cancel editing; false to save changes. |
EnsureVisible(TreeNodeAdv)
Overloaded. Scrolls the control so that the specified node becomes visible.
Declaration
public void EnsureVisible(TreeNodeAdv node)
Parameters
Type | Name | Description |
---|---|---|
TreeNodeAdv | node | The node that requires visibility. |
EnsureVisibleH(TreeNodeAdv)
Scrolls the control so that the specified node becomes visible and optionally forces it to be the top-most visible node.
Declaration
public void EnsureVisibleH(TreeNodeAdv node)
Parameters
Type | Name | Description |
---|---|---|
TreeNodeAdv | node | The node that is to be scrolled |
EnsureVisibleV(TreeNodeAdv, Boolean)
Scrolls the control so that the specified node becomes visible and optionally forces it to be the top-most visible node.
Declaration
public void EnsureVisibleV(TreeNodeAdv node, bool showOnTop)
Parameters
Type | Name | Description |
---|---|---|
TreeNodeAdv | node | The node that is to be scrolled. |
System.Boolean | showOnTop | True to force it to be the the top-most visible node; false to just scroll it into view. |
ExpandAll()
Expands all the tree nodes.
Declaration
public void ExpandAll()
Remarks
The ExpandAll method expands all the TreeNodeAdv objects, including all the child tree nodes, that are in the MultiColumnTreeView control.
ExtendSelectionTo(TreeNodeAdv)
Overloaded. Extends the selection to the specified node.
Declaration
public void ExtendSelectionTo(TreeNodeAdv selNode)
Parameters
Type | Name | Description |
---|---|---|
TreeNodeAdv | selNode | A TreeNodeAdv. |
Remarks
This method will not do anything if the SelectionMode property is set to TreeSelectionMode.Single.
ExtendSelectionTo(TreeNodeAdv, Boolean)
Extends the selection to the specified node.
Declaration
public void ExtendSelectionTo(TreeNodeAdv pSelectedNode, bool removeCurrentMultipleSelection)
Parameters
Type | Name | Description |
---|---|---|
TreeNodeAdv | pSelectedNode | A TreeNodeAdv. |
System.Boolean | removeCurrentMultipleSelection | Indicates whether or not any current selection should be removed. |
Remarks
This method will not do anything if the SelectionMode property is set to TreeSelectionMode.Single.
Finalize()
in destructor don't forget to clean resources.
Declaration
protected override void Finalize()
GetActiveThemeName()
Gets the active theme name of the ContextMenuStripEx control.
Declaration
public string GetActiveThemeName()
Returns
Type | Description |
---|---|
System.String | Returns the active theme name. |
GetBordersOffset()
Method calculate how much space reserved for borders by control.
Declaration
protected int GetBordersOffset()
Returns
Type | Description |
---|---|
System.Int32 | pixels reserved for borders. |
Remarks
returned value must be be in range [0;2].
GetDraggedNodesBitmap()
Returns a System.Drawing.Bitmap that contains the image of the dragged nodes with it's state image.
Declaration
public Bitmap GetDraggedNodesBitmap()
Returns
Type | Description |
---|---|
System.Drawing.Bitmap | A System.Drawing.Bitmap instance when there is atleast one selected node; Null otherwise. |
GetHeightOfRows(Int32, Int32)
Returns the total height of the rows from the specified start to end.
Declaration
public int GetHeightOfRows(int start, int end)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | start | The top row. |
System.Int32 | end | The bottom row. |
Returns
Type | Description |
---|---|
System.Int32 | The total height. |
GetNodeAtPoint(Point)
Returns the node at the specified location.
Declaration
public TreeNodeAdv GetNodeAtPoint(Point pt)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Point | pt | The point. |
Returns
Type | Description |
---|---|
TreeNodeAdv | The node at the point. |
GetNodeAtPoint(Point, Boolean)
Returns the node at the specified location.
Declaration
public TreeNodeAdv GetNodeAtPoint(Point pt, bool textBounds)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Point | pt | Location. |
System.Boolean | textBounds | Indicates whether the testing will be done using the bounds of the text, not the whole bounds of the node. |
Returns
Type | Description |
---|---|
TreeNodeAdv | The node at the point. |
GetNodeAtPoint(Point, Boolean, Boolean)
Returns the node at the specified location.
Declaration
public TreeNodeAdv GetNodeAtPoint(Point pt, bool pHitTextBounds, bool pHitTextOrImageBounds)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Point | pt | Location. |
System.Boolean | pHitTextBounds | Indicates whether the testing will be done using the bounds of the text, not the whole bounds of the node. |
System.Boolean | pHitTextOrImageBounds | Indicates whether the testing will be done using the bounds of the images and text, not the whole bounds of the node. |
Returns
Type | Description |
---|---|
TreeNodeAdv | The node at the point. |
Remarks
If both the pHitTextBounds and pHitTextOrImageBounds params are false then the testing will be done on the whole node.
GetNodeAtPoint(Int32, Int32)
Overloaded. Returns the node at the specified location.
Declaration
public TreeNodeAdv GetNodeAtPoint(int x, int y)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | The X co-ordinate. |
System.Int32 | y | The Y co-ordinate. |
Returns
Type | Description |
---|---|
TreeNodeAdv | The node at the point. |
GetNodeAtPointEx(Point)
Returns the node at the specified point.
Declaration
public TreeNodeAdv GetNodeAtPointEx(Point pt)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Point | pt | Specified point. |
Returns
Type | Description |
---|---|
TreeNodeAdv | Node at specified point if exist; null otherwise. |
GetNodeCount(Boolean)
Retrieves the number of tree nodes, optionally including those in all subtrees, assigned to the tree view control.
Declaration
public int GetNodeCount(bool includeSubTrees)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | includeSubTrees | true to count the TreeNodeAdv items that the subtrees contain; false otherwise. |
Returns
Type | Description |
---|---|
System.Int32 | The number of tree nodes, optionally including those in all subtrees, assigned to the tree view control. |
Remarks
If includeSubTrees is true, the result is the number of all the tree nodes in the entire tree structure.
Examples
This example describes how to count all the nodes(including child nodes) of the treeViewAdv The user could get the total number of nodes by calling GetNodeCount method with the bool argument which indicates whether count should include sub trees or not. If we pass it as true, it will count the nodes with the subtrees also.
private void button1_Click(object sender, System.EventArgs e)
{
//Call the tree control's "GetNodeCount" method with true to
//get the total number of nodes in the tree
int TotalNodesInTree = this.treeViewAdv1.GetNodeCount( true );
MessageBox.Show( "Total nodes in tree = " + TotalNodesInTree.ToString());
}
//Add nodes
private void button2_Click(object sender, System.EventArgs e)
{
this.treeViewAdv1.SelectedNode.Nodes.Add(new TreeNodeAdv());
}
//Remove nodes
private void button3_Click(object sender, System.EventArgs e)
{
this.treeViewAdv1.SelectedNode.Parent.Nodes.Remove(this.treeViewAdv1.SelectedNode);
}
Private Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
' Call the tree control's "GetNodeCount" method with true to
' get the total number of nodes in the tree
Dim TotalNodesInTree As Integer = Me.treeViewAdv1.GetNodeCount(True)
MessageBox.Show("Total nodes in tree = " & TotalNodesInTree.ToString())
End Sub
'Add nodes
Private Sub button2_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Me.treeViewAdv1.SelectedNode.Nodes.Add(New TreeNodeAdv())
End Sub
'Remove nodes
Private Sub button3_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Me.treeViewAdv1.SelectedNode.Parent.Nodes.Remove(Me.treeViewAdv1.SelectedNode)
End Sub
GetNodeFromPath(String)
Returns a node from the specified path. Make sure that the path does not end with a separator when calling this.
Declaration
public TreeNodeAdv GetNodeFromPath(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The path of the node. |
Returns
Type | Description |
---|---|
TreeNodeAdv | The node that has the specified path. |
GetPathFromNode(TreeNodeAdv)
Returns the path of the specified node.
Declaration
public string GetPathFromNode(TreeNodeAdv node)
Parameters
Type | Name | Description |
---|---|---|
TreeNodeAdv | node | Node whose path is to be returned. |
Returns
Type | Description |
---|---|
System.String | The path of the node. |
GetSelectedNodesRectangle(TreeNodeAdv[])
Returns the smallest rectangle enclosing the selected region of all the nodes specified.
Declaration
protected Rectangle GetSelectedNodesRectangle(TreeNodeAdv[] tnas)
Parameters
Type | Name | Description |
---|---|---|
TreeNodeAdv[] | tnas | The nodes whose selected region is to be included in the resultant rect. |
Returns
Type | Description |
---|---|
System.Drawing.Rectangle | The bounding Rectangle. |
Remarks
The node's text and left images will be included in the rectangles.
GetSubItemAtPoint(Point)
Gets the treeNodeAdvSubItem at the specified location.
Declaration
public TreeNodeAdvSubItem GetSubItemAtPoint(Point pt)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Point | pt |
Returns
Type |
---|
TreeNodeAdvSubItem |
GetSubItemAtPoint(Int32, Int32)
Gets the treeNodeAdvSubItem at the specified location.
Declaration
public TreeNodeAdvSubItem GetSubItemAtPoint(int x, int y)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | |
System.Int32 | y |
Returns
Type |
---|
TreeNodeAdvSubItem |
InitializeStyles()
Initialize control styles. Crete list of standard styles.
Declaration
protected virtual void InitializeStyles()
InvalidateNodeCollection(ICollection)
Invalidates nodes in collection.
Declaration
protected void InvalidateNodeCollection(ICollection col)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.ICollection | col | Collection to invalidate. |
InvalidateWindow()
Declaration
protected void InvalidateWindow()
IsInputChar(Char)
Declaration
protected override bool IsInputChar(char charCode)
Parameters
Type | Name | Description |
---|---|---|
System.Char | charCode |
Returns
Type |
---|
System.Boolean |
IsInputKey(Keys)
Declaration
protected override bool IsInputKey(Keys keyData)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Keys | keyData |
Returns
Type |
---|
System.Boolean |
MeasureDisplayStringSize(Graphics, String, Font)
Returns the width required to draw the text specified using the font specified.
Declaration
public Size MeasureDisplayStringSize(Graphics graphics, string text, Font font)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | graphics | A System.Drawing.Graphics object. |
System.String | text | The text that is to be drawn. |
System.Drawing.Font | font | The System.Drawing.Font using which to draw. |
Returns
Type | Description |
---|---|
System.Drawing.Size | Width required. |
MeasureDisplayStringSize(Graphics, String, Font, Int32)
Returns the width required to draw the text specified using the font specified.
Declaration
public Size MeasureDisplayStringSize(Graphics graphics, string text, Font font, int width)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | graphics | A System.Drawing.Graphics object. |
System.String | text | The text that is to be drawn. |
System.Drawing.Font | font | The System.Drawing.Font using which to draw. |
System.Int32 | width |
Returns
Type | Description |
---|---|
System.Drawing.Size | Size required for text. |
MirrorHorizontalPosition(Int32, Int32)
Declaration
protected int MirrorHorizontalPosition(int nX, int nWidth)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nX | |
System.Int32 | nWidth |
Returns
Type |
---|
System.Int32 |
NodeToPoint(TreeNodeAdv)
Returns the location of the tree node in client co-ordinates.
Declaration
public Point NodeToPoint(TreeNodeAdv node)
Parameters
Type | Name | Description |
---|---|---|
TreeNodeAdv | node | The TreeNodeAdv whose location you need. |
Returns
Type | Description |
---|---|
System.Drawing.Point | A System.Drawing.Point. |
Remarks
Operation has linear computation complexity algorithm that is why use it carefully on large tree hierarchies.
NodeToRectangle(TreeNodeAdv)
Returns the rectangular area in which the tree node will be drawn.
Declaration
public Rectangle NodeToRectangle(TreeNodeAdv node)
Parameters
Type | Name | Description |
---|---|---|
TreeNodeAdv | node | A TreeNodeAdv. |
Returns
Type | Description |
---|---|
System.Drawing.Rectangle | A System.Drawing.Rectangle. |
NodeToRowIndex(TreeNodeAdv)
Returns the row index of a tree node.
Declaration
public int NodeToRowIndex(TreeNodeAdv node)
Parameters
Type | Name | Description |
---|---|---|
TreeNodeAdv | node | A TreeNodeAdv. |
Returns
Type | Description |
---|---|
System.Int32 | The row index. |
OnAfterCheck(TreeNodeAdvEventArgs)
Raises the AfterCheck event.
Declaration
protected virtual void OnAfterCheck(TreeNodeAdvEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
TreeNodeAdvEventArgs | e | A TreeNodeAdvEventArgs that contains the event data. |
Remarks
The OnAfterCheck method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnAfterCheck in a derived class, be sure to call the base class's OnAfterCheck method so that registered delegates receive the event.
OnAfterCollapse(TreeViewAdvNodeEventArgs)
Raises the AfterCollapse event.
Declaration
protected virtual void OnAfterCollapse(TreeViewAdvNodeEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
TreeViewAdvNodeEventArgs | e | An EventArgs that contains the event data. |
Remarks
The OnAfterCollapse method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnAfterCollapse in a derived class, be sure to call the base class's OnAfterCollapse method so that registered delegates receive the event.
OnAfterExpand(TreeViewAdvNodeEventArgs)
Raises the AfterExpand event.
Declaration
protected virtual void OnAfterExpand(TreeViewAdvNodeEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
TreeViewAdvNodeEventArgs | e | An EventArgs that contains the event data. |
Remarks
The OnAfterExpand method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnAfterExpand in a derived class, be sure to call the base class's OnAfterExpand method so that registered delegates receive the event.
OnAfterInteractiveChecks(TreeNodeAdvEventArgs)
Raises the AfterInteractiveChecks event.
Declaration
protected virtual void OnAfterInteractiveChecks(TreeNodeAdvEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
TreeNodeAdvEventArgs | e | A TreeNodeAdvEventArgs that contains the event data. |
Remarks
The OnAfterInteractiveChecks method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnAfterInteractiveChecks in a derived class, be sure to call the base class's OnAfterInteractiveChecks method so that registered delegates receive the event.
OnAfterNodePaint(TreeNodeAdvPaintEventArgs)
Raises the AfterNodePaint event.
Declaration
protected virtual void OnAfterNodePaint(TreeNodeAdvPaintEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
TreeNodeAdvPaintEventArgs | e | An TreeNodeAdvPaintEventArgs that contains the event data. |
Remarks
The OnAfterNodePaint method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnAfterNodePaint in a derived class, be sure to call the base class's OnAfterNodePaint method so that registered delegates receive the event.
OnAfterSelect(EventArgs)
Raises the AfterSelect event.
Declaration
protected virtual void OnAfterSelect(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | An EventArgs that contains the event data. |
Remarks
The OnAfterSelect method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnAfterSelect in a derived class, be sure to call the base class's OnAfterSelect method so that registered delegates receive the event.
OnBackgroundColorChanged(EventArgs)
Raises the GradientBackgroundChanged event.
Declaration
protected virtual void OnBackgroundColorChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
Remarks
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The OnGradientBackgroundChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnGradientBackgroundChanged in a derived class, be sure to call the base class's OnGradientBackgroundChanged method so that registered delegates receive the event.
OnBeforeCheck(TreeNodeAdvBeforeCheckEventArgs)
Raises the BeforeCheck event.
Declaration
protected virtual void OnBeforeCheck(TreeNodeAdvBeforeCheckEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
TreeNodeAdvBeforeCheckEventArgs | e | An Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeViewAdvBeforeCheckEventArgs that contains the event data. |
Remarks
The OnBeforeCheck method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnBeforeCheck in a derived class, be sure to call the base class's OnBeforeCheck method so that registered delegates receive the event.
OnBeforeCollapse(TreeViewAdvCancelableNodeEventArgs)
Raises the BeforeCollapse event.
Declaration
protected virtual void OnBeforeCollapse(TreeViewAdvCancelableNodeEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
TreeViewAdvCancelableNodeEventArgs | e | An EventArgs that contains the event data. |
Remarks
The OnBeforeCollapse method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnBeforeCollapse in a derived class, be sure to call the base class's OnBeforeCollapse method so that registered delegates receive the event.
OnBeforeEdit(TreeNodeAdvBeforeEditEventArgs)
Raises the BeforeEdit event.
Declaration
protected virtual void OnBeforeEdit(TreeNodeAdvBeforeEditEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
TreeNodeAdvBeforeEditEventArgs | e | An EventArgs that contains the event data. |
Remarks
The OnBeforeEdit method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnBeforeEdit in a derived class, be sure to call the base class's OnBeforeEdit method so that registered delegates receive the event.
OnBeforeExpand(TreeViewAdvCancelableNodeEventArgs)
Raises the BeforeExpand event.
Declaration
protected virtual void OnBeforeExpand(TreeViewAdvCancelableNodeEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
TreeViewAdvCancelableNodeEventArgs | e | An EventArgs that contains the event data. |
Remarks
The OnBeforeExpand method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnBeforeExpand in a derived class, be sure to call the base class's OnBeforeExpand method so that registered delegates receive the event.
OnBeforeNodePaint(TreeNodeAdvPaintEventArgs)
Raises the BeforeNodePaint event.
Declaration
protected virtual void OnBeforeNodePaint(TreeNodeAdvPaintEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
TreeNodeAdvPaintEventArgs | e | An TreeNodeAdvPaintEventArgs that contains the event data. |
Remarks
The OnBeforeNodePaint method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnBeforeNodePaint in a derived class, be sure to call the base class's OnBeforeNodePaint method so that registered delegates receive the event.
OnBeforeSelect(TreeViewAdvCancelableSelectionEventArgs)
Raises the BeforeSelect event.
Declaration
protected virtual void OnBeforeSelect(TreeViewAdvCancelableSelectionEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
TreeViewAdvCancelableSelectionEventArgs | e | An TreeViewAdvCancelableSelectionEventArgs that contains the event data. |
Remarks
The OnBeforeSelect method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnBeforeSelect in a derived class, be sure to call the base class's OnBeforeSelect method so that registered delegates receive the event.
OnBorder3DStyleChanged(EventArgs)
Raises the Border3DStyleChanged event.
Declaration
protected virtual void OnBorder3DStyleChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
Remarks
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The OnBorder3DStyleChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnBorder3DStyleChanged in a derived class, be sure to call the base class's OnBorder3DStyleChanged method so that registered delegates receive the event.
OnBorderColorChanged(EventArgs)
Raises the BorderColorChanged event.
Declaration
protected virtual void OnBorderColorChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
Remarks
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The OnBorderColorChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnBorderColorChanged in a derived class, be sure to call the base class's OnBorderColorChanged method so that registered delegates receive the event.
OnBorderSidesChanged(EventArgs)
Raises the BorderSidesChanged event.
Declaration
protected virtual void OnBorderSidesChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
Remarks
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The OnBorderSidesChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OmBorderSidesChanged in a derived class, be sure to call the base class's OnBorderSidesChanged method so that registered delegates receive the event.
OnBorderSingleChanged(EventArgs)
Raises the BorderSingleChanged event.
Declaration
protected virtual void OnBorderSingleChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
Remarks
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The OnBorderSingleChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnBorderSingleChanged in a derived class, be sure to call the base class's OnBorderSingleChanged method so that registered delegates receive the event.
OnBorderStyleChanged(EventArgs)
Raises the BorderStyleChanged event.
Declaration
protected virtual void OnBorderStyleChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
Remarks
The OnBorderStyleChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnBorderStyleChanged in a derived class, be sure to call the base class's OnBorderStyleChanged method so that registered delegates receive the event.
OnColumnChanged(TreeColumnStyleChangedEventArgs)
Method called by column when it style changed.
Declaration
protected virtual void OnColumnChanged(TreeColumnStyleChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
TreeColumnStyleChangedEventArgs | e |
OnColumnClick(TreeColumnAdv)
Method called when column catch click event.
Declaration
protected virtual void OnColumnClick(TreeColumnAdv column)
Parameters
Type | Name | Description |
---|---|---|
TreeColumnAdv | column |
OnColumnDoubleClick(TreeColumnAdv)
Method called when column catch double click event.
Declaration
protected virtual void OnColumnDoubleClick(TreeColumnAdv column)
Parameters
Type | Name | Description |
---|---|---|
TreeColumnAdv | column |
OnColumnMouseDown(MouseButtons, Int32, Int32, Int32, Int32, TreeColumnAdv)
Method called when column catch mouse down event.
Declaration
protected virtual void OnColumnMouseDown(MouseButtons button, int clicks, int x, int y, int delta, TreeColumnAdv column)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseButtons | button | One of the MouseButtons values that indicate which mouse button was pressed. |
System.Int32 | clicks | The number of times a mouse button was pressed. |
System.Int32 | x | The x-coordinate of a mouse click, in pixels. |
System.Int32 | y | The y-coordinate of a mouse click, in pixels. |
System.Int32 | delta | A signed count of the number of detents the wheel has rotated. |
TreeColumnAdv | column |
OnColumnMouseUp(MouseButtons, Int32, Int32, Int32, Int32, TreeColumnAdv)
Method called when column catch mouse up event.
Declaration
protected virtual void OnColumnMouseUp(MouseButtons button, int clicks, int x, int y, int delta, TreeColumnAdv column)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseButtons | button | One of the MouseButtons values that indicate which mouse button was pressed. |
System.Int32 | clicks | The number of times a mouse button was pressed. |
System.Int32 | x | The x-coordinate of a mouse click, in pixels. |
System.Int32 | y | The y-coordinate of a mouse click, in pixels. |
System.Int32 | delta | A signed count of the number of detents the wheel has rotated. |
TreeColumnAdv | column |
OnColumnResized(TreeColumnAdv, Int32, Int32)
Method called when column catch resized event.
Declaration
protected virtual void OnColumnResized(TreeColumnAdv column, int prevWidth, int currentWidth)
Parameters
Type | Name | Description |
---|---|---|
TreeColumnAdv | column | |
System.Int32 | prevWidth | |
System.Int32 | currentWidth |
OnColumnResizing(TreeColumnAdv, Int32, Int32)
Method called when column catch resizing event.
Declaration
protected virtual void OnColumnResizing(TreeColumnAdv column, int prevPos, int currentPos)
Parameters
Type | Name | Description |
---|---|---|
TreeColumnAdv | column | |
System.Int32 | prevPos | |
System.Int32 | currentPos |
OnColumnSelected(TreeViewColumnSelectedChangedEventArgs)
Method called when selected column changed.
Declaration
protected virtual void OnColumnSelected(TreeViewColumnSelectedChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
TreeViewColumnSelectedChangedEventArgs | e |
OnDataSourceChanged(Object, Object)
Occurs when DataSource is changed
Declaration
protected virtual void OnDataSourceChanged(object oldValue, object newValue)
Parameters
Type | Name | Description |
---|---|---|
System.Object | oldValue | |
System.Object | newValue |
OnDefaultCollapseImageIndexChanged()
Raises the DefaultCollapseImageIndexChanged event.
Declaration
protected virtual void OnDefaultCollapseImageIndexChanged()
OnDefaultExpandImageIndexChanged()
Raises the DefaultExpandImageIndexChanged event.
Declaration
protected virtual void OnDefaultExpandImageIndexChanged()
OnDoubleClick(EventArgs)
Declaration
protected override void OnDoubleClick(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
OnDragDrop(DragEventArgs)
Declaration
protected override void OnDragDrop(DragEventArgs drgevent)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.DragEventArgs | drgevent |
OnDragEnter(DragEventArgs)
Declaration
protected override void OnDragEnter(DragEventArgs drgevent)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.DragEventArgs | drgevent |
OnDragLeave(EventArgs)
Declaration
protected override void OnDragLeave(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
OnDragOver(DragEventArgs)
Declaration
protected override void OnDragOver(DragEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.DragEventArgs | e |
Overrides
OnEditCancelled(TreeNodeAdvEditEventArgs)
Raises the edit cancel event.
Declaration
protected virtual void OnEditCancelled(TreeNodeAdvEditEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
TreeNodeAdvEditEventArgs | e | An EventArgs that contains the event data. |
Remarks
The OnEditCancelled method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnEditCancelled in a derived class, be sure to call the base class's OnEditCancelled method so that registered delegates receive the event.
OnEnter(EventArgs)
Declaration
protected override void OnEnter(EventArgs arg)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | arg |
Overrides
OnFontChanged(EventArgs)
Font changed
Declaration
protected override void OnFontChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
OnGetChildNodes(QueryChildItemsInfoEventArgs)
Raises the
Declaration
protected virtual void OnGetChildNodes(QueryChildItemsInfoEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
QueryChildItemsInfoEventArgs | e | An |
Remarks
The OnBeforeCheck method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnBeforeCheck in a derived class, be sure to call the base class's OnGetChildNodes method so that registered delegates receive the event.
OnGetColumnData(QueryCellValueInfoEventArgs)
Raises the
Declaration
protected virtual void OnGetColumnData(QueryCellValueInfoEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
QueryCellValueInfoEventArgs | e | An |
Remarks
The OnBeforeCheck method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnBeforeCheck in a derived class, be sure to call the base class's OnGetColumnData method so that registered delegates receive the event.
OnGiveFeedback(GiveFeedbackEventArgs)
Declaration
protected override void OnGiveFeedback(GiveFeedbackEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.GiveFeedbackEventArgs | args |
OnGotFocus(EventArgs)
Declaration
protected override void OnGotFocus(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
Overrides
OnHandleCreated(EventArgs)
Declaration
protected override void OnHandleCreated(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
Overrides
OnHScrollBarValueChanged(Object, EventArgs)
Declaration
protected override void OnHScrollBarValueChanged(object sender, EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | |
System.EventArgs | e |
Overrides
OnInvalidated(InvalidateEventArgs)
Declaration
protected override void OnInvalidated(InvalidateEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.InvalidateEventArgs | e |
Overrides
OnItemDrag(ItemDragEventArgs)
Raises the ItemDrag event.
Declaration
protected virtual void OnItemDrag(ItemDragEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.ItemDragEventArgs | e | An ItemDragEventArgs that contains the event data. |
Remarks
The OnItemDrag method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnItemDrag in a derived class, be sure to call the base class's OnItemDrag method so that registered delegates receive the event.
OnKeyDown(KeyEventArgs)
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.KeyEventArgs | e |
OnLeave(EventArgs)
Declaration
protected override void OnLeave(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
Overrides
OnLostFocus(EventArgs)
Declaration
protected override void OnLostFocus(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
Overrides
OnMouseDown(MouseEventArgs)
Declaration
protected override void OnMouseDown(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | e |
Overrides
OnMouseEnter(EventArgs)
Declaration
protected override void OnMouseEnter(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
OnMouseHover(EventArgs)
Declaration
protected override void OnMouseHover(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
Overrides
OnMouseLeave(EventArgs)
Declaration
protected override void OnMouseLeave(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
Overrides
OnMouseMove(MouseEventArgs)
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | e |
Overrides
OnMouseUp(MouseEventArgs)
Declaration
protected override void OnMouseUp(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | e |
Overrides
OnMouseWheel(MouseEventArgs)
Declaration
protected override void OnMouseWheel(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | e |
Overrides
OnNcCalcSize(ref Rectangle)
Declaration
protected override void OnNcCalcSize(ref Rectangle client)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Rectangle | client |
Overrides
OnNCPaint(NCPaintEventArgs)
Method draws non-client area of an MultiColumnTreeView.
Declaration
protected override void OnNCPaint(NCPaintEventArgs ncEventArgs)
Parameters
Type | Name | Description |
---|---|---|
NCPaintEventArgs | ncEventArgs | EventArgs with Non-client info for drawing. |
Overrides
OnNodeBackgroundPaint(TreeNodeAdvPaintBackgroundEventArgs)
Raises the NodeBackgroundPaint event.
Declaration
protected virtual void OnNodeBackgroundPaint(TreeNodeAdvPaintBackgroundEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
TreeNodeAdvPaintBackgroundEventArgs | e | An EventArgs that contains the event data. |
Remarks
The OnNodeBackgroundPaint method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnNodeBackgroundPaint in a derived class, be sure to call the base class's OnNodeBackgroundPaint method so that registered delegates receive the event.
OnNodeEditorValidated(TreeNodeAdvEditEventArgs)
Raises the NodeEditorValidated event.
Declaration
protected virtual void OnNodeEditorValidated(TreeNodeAdvEditEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
TreeNodeAdvEditEventArgs | e | An EventArgs that contains the event data. |
Remarks
The OnNodeEditorValidated method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnNodeEditorValidated in a derived class, be sure to call the base class's OnNodeEditorValidated method so that registered delegates receive the event.
OnNodeEditorValidateString(TreeNodeAdvCancelableEditEventArgs)
Raises the NodeEditorValidateString event.
Declaration
protected virtual void OnNodeEditorValidateString(TreeNodeAdvCancelableEditEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
TreeNodeAdvCancelableEditEventArgs | e | An EventArgs that contains the event data. |
Remarks
The OnNodeEditorValidateString method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnNodeEditorValidateString in a derived class, be sure to call the base class's OnNodeEditorValidateString method so that registered delegates receive the event.
OnNodeEditorValidating(TreeNodeAdvCancelableEditEventArgs)
Raises the NodeEditorValidating event.
Declaration
protected virtual void OnNodeEditorValidating(TreeNodeAdvCancelableEditEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
TreeNodeAdvCancelableEditEventArgs | e | An EventArgs that contains the event data. |
Remarks
The OnNodeEditorValidating method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnNodeEditorValidating in a derived class, be sure to call the base class's OnNodeEditorValidating method so that registered delegates receive the event.
OnNodeStateImageListChanged()
Raises the NodeStateImageListChanged event.
Declaration
protected virtual void OnNodeStateImageListChanged()
OnPaint(PaintEventArgs)
Declaration
protected override void OnPaint(PaintEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.PaintEventArgs | e |
Overrides
OnPaintBackground(PaintEventArgs)
Declaration
protected override void OnPaintBackground(PaintEventArgs pevent)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.PaintEventArgs | pevent |
OnPrint(Object, PrintPageEventArgs)
Declaration
protected virtual void OnPrint(object sender, PrintPageEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | |
System.Drawing.Printing.PrintPageEventArgs | e |
OnQueryContinueDrag(QueryContinueDragEventArgs)
Declaration
protected override void OnQueryContinueDrag(QueryContinueDragEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.QueryContinueDragEventArgs | args |
OnRightToLeftChanged(EventArgs)
Declaration
protected override void OnRightToLeftChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
Overrides
OnScrollbarsVisibleChanged(EventArgs)
Declaration
protected override void OnScrollbarsVisibleChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
Overrides
OnSelectionModeChanged()
Declaration
protected virtual void OnSelectionModeChanged()
OnSetCursor(ref Message)
Declaration
protected override void OnSetCursor(ref Message m)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Message | m |
Overrides
OnSizeChanged(EventArgs)
Declaration
protected override void OnSizeChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
Overrides
OnThemeChanged(EventArgs)
Raises the ThemeChanged event.
Declaration
protected virtual void OnThemeChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | An EventArgs that contains the event data. |
Remarks
The OnThemeChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Notes to Inheritors: When overriding OnThemeChanged in a derived class, be sure to call the base class's OnThemeChanged method so that registered delegates receive the event.
OnUpdatingChanged(EventArgs)
Declaration
protected override void OnUpdatingChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
Overrides
OnVScrollBarValueChanged(Object, EventArgs)
Declaration
protected override void OnVScrollBarValueChanged(object sender, EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | |
System.EventArgs | e |
Overrides
PaintChildrenBackground(Graphics, Control, Rectangle)
Declaration
protected virtual bool PaintChildrenBackground(Graphics graphics, Control control, Rectangle clipRect)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | graphics | |
System.Windows.Forms.Control | control | |
System.Drawing.Rectangle | clipRect |
Returns
Type |
---|
System.Boolean |
PointToNode(Point)
Returns the tree node at the specified point in client co-ordinates.
Declaration
public TreeNodeAdv PointToNode(Point pt)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Point | pt | The point in client co-ordinates. |
Returns
Type | Description |
---|---|
TreeNodeAdv | A TreeNodeAdv. |
Print()
Begins the printing process of the MultiColumnTreeView.
Declaration
public void Print()
PrintPreview()
Begins the printing process of the MultiColumnTreeView and shows MultiColumnTreeView before printing.
Declaration
public void PrintPreview()
ProcessDialogKey(Keys)
Declaration
protected override bool ProcessDialogKey(Keys keyData)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Keys | keyData |
Returns
Type |
---|
System.Boolean |
ProcessMouseBasedSelection(MouseEventArgs)
This method indicates that the multipleNodes can be selected with mouseDown and drag .
Declaration
protected virtual void ProcessMouseBasedSelection(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | e |
RaiseItemDrag(ItemDragEventArgs)
Calls the OnItemDrag(ItemDragEventArgs) to raise the ItemDrag event.
Declaration
public void RaiseItemDrag(ItemDragEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.ItemDragEventArgs | e | An ItemDragEventArgs that contains the event data. |
RaiseNodeDoubleClick(TreeNodeAdv, MouseButtons, Int32, Int32, Int32, Int32)
Declaration
protected void RaiseNodeDoubleClick(TreeNodeAdv hitnode, MouseButtons button, int clicks, int x, int y, int delta)
Parameters
Type | Name | Description |
---|---|---|
TreeNodeAdv | hitnode | |
System.Windows.Forms.MouseButtons | button | |
System.Int32 | clicks | |
System.Int32 | x | |
System.Int32 | y | |
System.Int32 | delta |
RaiseNodeHotTracked()
Declaration
protected void RaiseNodeHotTracked()
RaiseNodeSingleClick(TreeNodeAdv, MouseButtons, Int32, Int32, Int32, Int32)
Declaration
protected void RaiseNodeSingleClick(TreeNodeAdv hitnode, MouseButtons button, int clicks, int x, int y, int delta)
Parameters
Type | Name | Description |
---|---|---|
TreeNodeAdv | hitnode | |
System.Windows.Forms.MouseButtons | button | |
System.Int32 | clicks | |
System.Int32 | x | |
System.Int32 | y | |
System.Int32 | delta |
Refresh()
Forces the control to invalidate its client area and immediately redraw any child controls.
Declaration
public override void Refresh()
RefreshFilter()
Refreshes the view when the filtering is applied through Filter delegate.
Declaration
public void RefreshFilter()
ResetBackColor()
Reset the BackColor property value to default value.
Declaration
public override void ResetBackColor()
ResetBackgroundColor()
Declaration
protected void ResetBackgroundColor()
ResetBorderColor()
Declaration
protected void ResetBorderColor()
ResetClosedImgIndex()
Reset the ClosedImgIndex property value to default value.
Declaration
public void ResetClosedImgIndex()
ResetColumnsHeaderBackground()
Declaration
protected void ResetColumnsHeaderBackground()
ResetInactiveSelectedNodeBackground()
Declaration
protected void ResetInactiveSelectedNodeBackground()
ResetInactiveSelectedNodeForeColor()
Declaration
protected void ResetInactiveSelectedNodeForeColor()
ResetInteractiveCheckBoxes()
Reset the InteractiveCheckBoxes property value to default value.
Declaration
public void ResetInteractiveCheckBoxes()
ResetItemHeight()
Reset the ItemHeight property value to default value.
Declaration
public void ResetItemHeight()
ResetLineColor()
Declaration
protected void ResetLineColor()
ResetMetroColor()
Reset the MetroColor property value to default value.
Declaration
public void ResetMetroColor()
ResetNoChildrenImgIndex()
Reset the NoChildrenImgIndex property value to default value.
Declaration
public void ResetNoChildrenImgIndex()
ResetNodeHoverColor()
Reset the NodeHoverColor property value to default value.
Declaration
public void ResetNodeHoverColor()
ResetOpenImgIndex()
Reset the OpenImgIndex property value to default value.
Declaration
public void ResetOpenImgIndex()
ResetSelectedNodeBackground()
Declaration
protected void ResetSelectedNodeBackground()
ResetSelectedNodeForeColor()
Declaration
protected void ResetSelectedNodeForeColor()
ResetShowCheckBoxes()
Reset the ShowCheckBoxes property value to default value.
Declaration
public void ResetShowCheckBoxes()
ResetShowOptionButtons()
Reset the ShowOptionButtons property value to default value.
Declaration
public void ResetShowOptionButtons()
ResetShowPlusMinus()
Reset the ShowPlusMinus property value to default value.
Declaration
public void ResetShowPlusMinus()
ResetStyle()
Reset the Style property value to default value.
Declaration
public void ResetStyle()
ResetThemesEnabled()
Declaration
protected void ResetThemesEnabled()
RowIndexToNode(Int32)
Returns the tree node at the specified row index.
Declaration
public TreeNodeAdv RowIndexToNode(int rowIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rowIndex | The row index. |
Returns
Type | Description |
---|---|
TreeNodeAdv | A TreeNodeAdv. |
SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)
Declaration
protected override void SetBoundsCore(int x, int y, int width1, int height, BoundsSpecified specified)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | |
System.Int32 | y | |
System.Int32 | width1 | |
System.Int32 | height | |
System.Windows.Forms.BoundsSpecified | specified |
SetDefaultSelectionOnEnter()
Selects a default node (the first visible one) if the tree did not have anything focused.
Declaration
protected virtual void SetDefaultSelectionOnEnter()
SetSelectedNode(ArrayList, ArrayList, TreeViewAdvAction, Boolean, Boolean)
This method is used internally by the tree control to add and remove selected nodes. This method will fire the appropriate selection events to let the user cancel the selection, etc.
Declaration
protected bool SetSelectedNode(ArrayList nodesToAdd, ArrayList nodesToRemove, TreeViewAdvAction action, bool fireEvent, bool forceRemove)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.ArrayList | nodesToAdd | The nodes to add. |
System.Collections.ArrayList | nodesToRemove | The nodes to remove. |
TreeViewAdvAction | action | Specifies what kind of action triggered this call. |
System.Boolean | fireEvent | Indicates whether selection events should be fired before and after this selection change. |
System.Boolean | forceRemove | Indicates whether the specified nodes to be removed from selection will be removed even if the user cancelled the selection change the BeforeSelect event handler. |
Returns
Type | Description |
---|---|
System.Boolean | True if the selection changed; false otherwise. |
SetSelectionBaseNode(TreeNodeAdv)
Declaration
protected void SetSelectionBaseNode(TreeNodeAdv node)
Parameters
Type | Name | Description |
---|---|---|
TreeNodeAdv | node |
ShouldSerializeBackColor()
Determines if the BackColor property was modified.
Declaration
protected bool ShouldSerializeBackColor()
Returns
Type | Description |
---|---|
System.Boolean | Returns bool property |
ShouldSerializeBackgroundColor()
Declaration
protected bool ShouldSerializeBackgroundColor()
Returns
Type |
---|
System.Boolean |
ShouldSerializeBorderColor()
Declaration
protected bool ShouldSerializeBorderColor()
Returns
Type |
---|
System.Boolean |
ShouldSerializeClosedImgIndex()
Declaration
protected bool ShouldSerializeClosedImgIndex()
Returns
Type |
---|
System.Boolean |
ShouldSerializeColumns()
Declaration
protected bool ShouldSerializeColumns()
Returns
Type |
---|
System.Boolean |
ShouldSerializeColumnsHeaderBackground()
Declaration
protected bool ShouldSerializeColumnsHeaderBackground()
Returns
Type |
---|
System.Boolean |
ShouldSerializeInactiveSelectedNodeBackground()
Declaration
protected bool ShouldSerializeInactiveSelectedNodeBackground()
Returns
Type |
---|
System.Boolean |
ShouldSerializeInactiveSelectedNodeForeColor()
Declaration
protected bool ShouldSerializeInactiveSelectedNodeForeColor()
Returns
Type |
---|
System.Boolean |
ShouldSerializeInteractiveCheckBoxes()
Declaration
protected bool ShouldSerializeInteractiveCheckBoxes()
Returns
Type |
---|
System.Boolean |
ShouldSerializeItemHeight()
Declaration
protected bool ShouldSerializeItemHeight()
Returns
Type |
---|
System.Boolean |
ShouldSerializeLineColor()
Declaration
protected bool ShouldSerializeLineColor()
Returns
Type |
---|
System.Boolean |
ShouldSerializeNoChildrenImgIndex()
Declaration
protected bool ShouldSerializeNoChildrenImgIndex()
Returns
Type |
---|
System.Boolean |
ShouldSerializeOpenImgIndex()
Declaration
protected bool ShouldSerializeOpenImgIndex()
Returns
Type |
---|
System.Boolean |
ShouldSerializeSelectedNodeBackground()
Declaration
protected bool ShouldSerializeSelectedNodeBackground()
Returns
Type |
---|
System.Boolean |
ShouldSerializeSelectedNodeForeColor()
Declaration
protected bool ShouldSerializeSelectedNodeForeColor()
Returns
Type |
---|
System.Boolean |
ShouldSerializeShowCheckBoxes()
Declaration
protected bool ShouldSerializeShowCheckBoxes()
Returns
Type |
---|
System.Boolean |
ShouldSerializeShowOptionButtons()
Declaration
protected bool ShouldSerializeShowOptionButtons()
Returns
Type |
---|
System.Boolean |
ShouldSerializeShowPlusMinus()
Declaration
protected bool ShouldSerializeShowPlusMinus()
Returns
Type |
---|
System.Boolean |
ShouldSerializeThemesEnabled()
Declaration
protected bool ShouldSerializeThemesEnabled()
Returns
Type |
---|
System.Boolean |
ThemedPaintBackground(Graphics, Rectangle, Rectangle)
Declaration
protected virtual void ThemedPaintBackground(Graphics graphics, Rectangle rect, Rectangle clip)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | graphics | |
System.Drawing.Rectangle | rect | |
System.Drawing.Rectangle | clip |
ToImage()
Gets the image of MultiColumnTreeView.
Declaration
public Image ToImage()
Returns
Type | Description |
---|---|
System.Drawing.Image | Returns the image. |
UpdateTips(Boolean)
Declaration
protected virtual void UpdateTips(bool mouseHover)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | mouseHover |
WndProc(ref Message)
Declaration
protected override void WndProc(ref Message m)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Message | m |
Overrides
Events
AfterCheck
Occurs after a node is checked.
Declaration
public event TreeNodeAdvEventHandler AfterCheck
Event Type
Type |
---|
TreeNodeAdvEventHandler |
Remarks
This event will be fired when the node's CheckState property has changed or when a new node has been Optioned.
You could alternatively listen to the individual node's CheckStateChanged event.
AfterCollapse
Occurs after a node has collapsed.
Declaration
public event TreeViewAdvNodeEventHandler AfterCollapse
Event Type
Type |
---|
TreeViewAdvNodeEventHandler |
Remarks
Handle this event when you want to do some processing of the specified node after it's collapsed.
AfterExpand
Occurs after a node is expanded.
Declaration
public event TreeViewAdvNodeEventHandler AfterExpand
Event Type
Type |
---|
TreeViewAdvNodeEventHandler |
Remarks
Handle this event when you want to do some processing of the specified node after it's expanded.
AfterInteractiveChecks
Declaration
public event TreeNodeAdvEventHandler AfterInteractiveChecks
Event Type
Type |
---|
TreeNodeAdvEventHandler |
AfterNodePaint
Occurs after a node is being painted when the OwnerDrawNodes property is set to true.
Declaration
public event TreeNodeAdvPaintEventHandler AfterNodePaint
Event Type
Type |
---|
TreeNodeAdvPaintEventHandler |
Remarks
This event is ideal for custom drawing portions of the node in addition to the default drawing. The Handled properties of the event args can be ignored for this event.
AfterSelect
Occurs after a node is selected.
Declaration
public event EventHandler AfterSelect
Event Type
Type |
---|
System.EventHandler |
Remarks
You can determine the selected node using the SelectedNode property.
BackgroundColorChanged
Occurs when the tree's GradientBackground is changed.
Declaration
public event EventHandler BackgroundColorChanged
Event Type
Type |
---|
System.EventHandler |
BeforeCheck
Occurs before a node's checkbox is checked.
Declaration
public event TreeViewAdvBeforeCheckEventHandler BeforeCheck
Event Type
Type |
---|
TreeViewAdvBeforeCheckEventHandler |
BeforeCollapse
Occurs before a node has collapsed.
Declaration
public event TreeViewAdvCancelableNodeEventHandler BeforeCollapse
Event Type
Type |
---|
TreeViewAdvCancelableNodeEventHandler |
Remarks
Handle this event when you want to do some processing of the specified node before it's collapsed.
BeforeEdit
Occures before a node gets into the edit mode.
Declaration
public event TreeViewAdvBeforeEditEventHandler BeforeEdit
Event Type
Type |
---|
TreeViewAdvBeforeEditEventHandler |
BeforeExpand
Occurs before a node is expanded.
Declaration
public event TreeViewAdvCancelableNodeEventHandler BeforeExpand
Event Type
Type |
---|
TreeViewAdvCancelableNodeEventHandler |
Remarks
Handle this event when you want to do some processing of the specified node before it's expanded. Use this event when you set the LoadOnDemand property to true to add child nodes to the specified node before it is expanded.
BeforeNodePaint
Occurs before a node is being painted when the OwnerDrawNodes property is set to true.
Declaration
public event TreeNodeAdvPaintEventHandler BeforeNodePaint
Event Type
Type |
---|
TreeNodeAdvPaintEventHandler |
Remarks
Handle this event when you want to draw the node yourself. If you set the Handled property to true the MultiColumnTreeView assumes that you have drawn all the contents of the node and no additional drawing will be done by the MultiColumnTreeView. If you leave it to false the MultiColumnTreeView will automatically draw the usual contents of the node. Do not draw the background of the node here. Otherwise it will draw over the vertical line. Use the NodeBackgroundPaint for painting the background.
BeforeSelect
Occurs before a node is selected.
Declaration
public event TreeNodeAdvBeforeSelectEventHandler BeforeSelect
Event Type
Type |
---|
TreeNodeAdvBeforeSelectEventHandler |
Remarks
The collection in the SelectedNodes property is both read-only and fixed size.
Border3DStyleChanged
Occurs when the tree's Border3DStyle is changed.
Declaration
public event EventHandler Border3DStyleChanged
Event Type
Type |
---|
System.EventHandler |
BorderColorChanged
Occurs when the tree's BorderColor is changed.
Declaration
public event EventHandler BorderColorChanged
Event Type
Type |
---|
System.EventHandler |
BorderSidesChanged
Occurs when the tree's BorderSides is changed.
Declaration
public event EventHandler BorderSidesChanged
Event Type
Type |
---|
System.EventHandler |
BorderSingleChanged
Occurs when the tree's Border2DStyle is changed.
Declaration
public event EventHandler BorderSingleChanged
Event Type
Type |
---|
System.EventHandler |
BorderStyleChanged
Occurs when the tree's BorderStyle is changed.
Declaration
public event EventHandler BorderStyleChanged
Event Type
Type |
---|
System.EventHandler |
ColumnClick
Occurs when the tree's column is clicked.
Declaration
public event TreeColumnChangedEventHandler ColumnClick
Event Type
Type |
---|
TreeColumnChangedEventHandler |
ColumnDoubleClick
Occurs when the tree's column is double clicked.
Declaration
public event TreeColumnChangedEventHandler ColumnDoubleClick
Event Type
Type |
---|
TreeColumnChangedEventHandler |
ColumnHighlighted
Occurs when the tree's selected column changed.
Declaration
public event TreeColumnChangedEventHandler ColumnHighlighted
Event Type
Type |
---|
TreeColumnChangedEventHandler |
ColumnMouseDown
Occurs when the mouse Pressed on the tree's Column .
Declaration
public event TreeColumnAdvMouseEventHandler ColumnMouseDown
Event Type
Type |
---|
TreeColumnAdvMouseEventHandler |
ColumnMouseUp
Occurs when the mouse released on the tree's Column .
Declaration
public event TreeColumnAdvMouseEventHandler ColumnMouseUp
Event Type
Type |
---|
TreeColumnAdvMouseEventHandler |
ColumnResized
Occurs when the tree's column is resized.
Declaration
public event TreeColumnResizedEventHandler ColumnResized
Event Type
Type |
---|
TreeColumnResizedEventHandler |
ColumnResizing
Occurs when resizing the tree's column.
Declaration
public event TreeColumnResizeEventHandler ColumnResizing
Event Type
Type |
---|
TreeColumnResizeEventHandler |
DataSourceChanged
Occurs when DataSource is changed.
Declaration
public event DataSourceChangedEventHandler DataSourceChanged
Event Type
Type |
---|
DataSourceChangedEventHandler |
DefaultCollapseImageIndexChanged
Occurs when DefaultCollapseImageIndex is changed.
Declaration
public event EventHandler DefaultCollapseImageIndexChanged
Event Type
Type |
---|
System.EventHandler |
DefaultExpandImageIndexChanged
Occurs when DefaultExpandImageIndex is changed.
Declaration
public event EventHandler DefaultExpandImageIndexChanged
Event Type
Type |
---|
System.EventHandler |
EditCancelled
Occurs after the Editing mode gets cancelled by Escape key.
Declaration
public event TreeNodeAdvEditEventHandler EditCancelled
Event Type
Type |
---|
TreeNodeAdvEditEventHandler |
ItemDrag
Occurs when the user begins a drag of one or more items in the tree view control.
Declaration
public event ItemDragEventHandler ItemDrag
Event Type
Type |
---|
System.Windows.Forms.ItemDragEventHandler |
Remarks
The Item property in the argument is an array of MultiColumnTreeView nodes that are currently selected.
You can choose to initiate an ole drag-and-drop operation in this event handler.
Examples
To initiate an ole drag-drop in this event handler:
// MultiColumnTreeView.ItemDrag event listener
private void treeViewAdv1_ItemDrag(object sender, System.Windows.Forms.ItemDragEventArgs e)
{
// Begin a drag and drop operation of the selected nodes (or some other data).
TreeNodeAdv[] nodes = e.Item as TreeNodeAdv[];
DragDropEffects result = this.DoDragDrop(nodes, DragDropEffects.Copy | DragDropEffects.Move);
// more app logic based on result...
}
' MultiColumnTreeView.ItemDrag event listener
Private Sub treeViewAdv1_ItemDrag(ByVal sender As Object, ByVal e As System.Windows.Forms.ItemDragEventArgs) Handles treeViewAdv2.ItemDrag
' Begin a drag and drop operation of the selected nodes (or some other data).
Dim nodes As TreeNodeAdv() = CType(e.Item, TreeNodeAdv())
Dim result As DragDropEffects = Me.DoDragDrop(nodes, DragDropEffects.Copy Or DragDropEffects.Move)
' more app logic based on result...
End Sub 'treeViewAdv1_ItemDrag '
Also take a look at our ..\Tools\Samples\Tree Package\TreeViewAdvDragDrop sample for more information on how to turn on drag-drop cues.
NodeBackgroundPaint
Occurs to draw the background of a node if the OwnerDrawNodesBackground property is set.
Declaration
public event TreeNodeAdvPaintBackgroundEventHandler NodeBackgroundPaint
Event Type
Type |
---|
TreeNodeAdvPaintBackgroundEventHandler |
Remarks
Handle this event when you want to draw the background of the node yourself.
NodeEditorValidated
Occurs after the newly entered text in the Node editor gets stored.
Declaration
public event TreeNodeAdvEditEventHandler NodeEditorValidated
Event Type
Type |
---|
TreeNodeAdvEditEventHandler |
NodeEditorValidateString
Occurs when the text entered by the user changes in the Node editor control.
Declaration
public event TreeNodeAdvCancelableEditEventHandler NodeEditorValidateString
Event Type
Type |
---|
TreeNodeAdvCancelableEditEventHandler |
NodeEditorValidating
Occurs before the newly entered text in the Node editor gets stored.
Declaration
public event TreeNodeAdvCancelableEditEventHandler NodeEditorValidating
Event Type
Type |
---|
TreeNodeAdvCancelableEditEventHandler |
NodeHotTrackChanged
Represents an event will be triggered when mouse hover occurs in tree nodes and it returns the particular node details which is currently being pointed from its arguement.
Declaration
public event TreeViewAdvNodeEventHandler NodeHotTrackChanged
Event Type
Type |
---|
TreeViewAdvNodeEventHandler |
NodeMouseClick
Represents an event will be triggered if single click occurs on TreeNodeAdv.
Declaration
public event TreeNodeAdvMouseClickArgs NodeMouseClick
Event Type
Type |
---|
TreeNodeAdvMouseClickArgs |
NodeMouseDoubleClick
Represents an event will be triggered if double click occurs on TreeNodeAdv.
Declaration
public event TreeNodeAdvMouseClickArgs NodeMouseDoubleClick
Event Type
Type |
---|
TreeNodeAdvMouseClickArgs |
NodeStateImageListChanged
Occurs when NodeStateImageList is changed.
Declaration
public event EventHandler NodeStateImageListChanged
Event Type
Type |
---|
System.EventHandler |
OnNodeAfterFound
Represents an event will be triggered when treenode match is found based on search string.
Declaration
public event TreeViewOnAfterFindArgs OnNodeAfterFound
Event Type
Type |
---|
TreeViewOnAfterFindArgs |
OnNodeBeforeFind
Represents an event will be triggered once treenode match yet to be found based on search string.
Declaration
public event TreeViewOnBeforeFindArgs OnNodeBeforeFind
Event Type
Type |
---|
TreeViewOnBeforeFindArgs |
OnNodeReplaced
Represents an event will be triggered on matched treenode text after gets replaced based on search string.
Declaration
public event TreeViewOnReplacedArgs OnNodeReplaced
Event Type
Type |
---|
TreeViewOnReplacedArgs |
OnNodeReplacing
Represents an event will be triggered on matched treenode text is being replaced based on search string.
Declaration
public event TreeViewOnReplacingArgs OnNodeReplacing
Event Type
Type |
---|
TreeViewOnReplacingArgs |
PaddingChanged
Represents an event will be triggered when the padding is changed.
Declaration
public event EventHandler PaddingChanged
Event Type
Type |
---|
System.EventHandler |
QueryCellValue
Declaration
public event GetCellValueEventHandler QueryCellValue
Event Type
Type |
---|
GetCellValueEventHandler |
QueryChildItems
Handle this event allows you to assign the ChildMember for the given parent nodes.
Declaration
public event QueryChildItemsEventHandler QueryChildItems
Event Type
Type |
---|
QueryChildItemsEventHandler |
Remarks
This event is used to provide lists of root and child node details to populate the MultiColumnTreeView and it occurs after adding of each Nodes in its own Nodes collection. We must specify the event data properly to populate a valid MultiColumnTreeView.
ThemeChanged
Occurs when the ThemesEnabled property changes.
Declaration
public event EventHandler ThemeChanged
Event Type
Type |
---|
System.EventHandler |
ThemeNameChanged
Occurs when theme name of the ContextMenuStripEx has changed.
Declaration
public event ThemeChangedEventHandler ThemeNameChanged
Event Type
Type |
---|
ThemeChangedEventHandler |
Explicit Interface Implementations
INonClientPaintingSupport.NonClientPaint(PaintEventArgs, Rectangle, Rectangle)
Declaration
IntPtr INonClientPaintingSupport.NonClientPaint(PaintEventArgs e, Rectangle displayRect, Rectangle rcInScreen)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.PaintEventArgs | e | The PaintEventArgs using this to draw the non client area. |
System.Drawing.Rectangle | displayRect | The control's window bounds into which to draw. Left and Top are usually zero. |
System.Drawing.Rectangle | rcInScreen | The control's bounds in screen co-ordinates. |
Returns
Type | Description |
---|---|
System.IntPtr | HRgn (as IntPtr) that excludes the region you just drew in the displayRect. |
IProvideCustomContextMenuPositionalInformation.GetMenuPositionForKeyboardInvoke()
Implement this interface to support keyboard based (Shift+F10) context menu invocation. The context menu will then appear near the selected node.
Declaration
Point IProvideCustomContextMenuPositionalInformation.GetMenuPositionForKeyboardInvoke()
Returns
Type |
---|
System.Drawing.Point |
Remarks
The PopupMenu in the XPMenus framework will then call this method to determine the location for popup.
IVisualStyle.VisualTheme
Gets or sets the VisualTheme of the ContextMenuStripEx control.
Declaration
string IVisualStyle.VisualTheme { get; set; }
Returns
Type |
---|
System.String |
IThemeProvider.BaseThemeName
Gets or sets the BaseTheme name of the theme
Declaration
string IThemeProvider.BaseThemeName { get; set; }
Returns
Type |
---|
System.String |
IThemeProvider.ControlName
Gets the name of the control.
Declaration
string IThemeProvider.ControlName { get; }
Returns
Type |
---|
System.String |