C# Class AnimatGuiCtrls.Controls.ComboTreeBox

Inheritance: DropDownControlBase
Show file Open project: NeuroRoboticTech/AnimatLabPublicSource Class Usage Examples

Private Properties

Property Type Description
GetNextDisplayedNode ComboTreeNode
GetNodeImage Image
GetNodesRecursive IEnumerator
GetPrevDisplayedNode ComboTreeNode
IsNodeVisible bool
OwnsNode bool
SetDroppedDown void
SetSelectedNode void
dropDown_Closed void
dropDown_Opened void
nodes_CollectionChanged void

Public Methods

Method Description
BeginUpdate ( ) : void

Prevents the dropdown portion of the control from being updated until the EndUpdate method is called.

CollapseAll ( ) : void

Collapses all nodes in the tree for when the dropdown portion of the control is reopened.

ComboTreeBox ( ) : System

Initalises a new instance of ComboTreeBox.

EndUpdate ( ) : void

Updates the dropdown portion of the control after being suspended by the BeginUpdate method.

ExpandAll ( ) : void

Expands all nodes in the tree for when the dropdown portion of the control is reopened.

Sort ( ) : void

Sorts the contents of the tree using the default comparer.

Sort ( IComparer comparer ) : void

Sorts the contents of the tree using the specified comparer.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Disposes of the control and its dropdown.

OnFontChanged ( EventArgs e ) : void

Updates the dropdown's font when the control's font changes.

OnKeyDown ( KeyEventArgs e ) : void

Handles keyboard shortcuts.

OnLostFocus ( EventArgs e ) : void

Closes the dropdown portion of the control when it loses focus.

OnMouseClick ( MouseEventArgs e ) : void

Toggles the visibility of the dropdown portion of the control.

OnMouseWheel ( MouseEventArgs e ) : void

Scrolls between adjacent nodes, or scrolls the drop-down portion of the control in response to the mouse wheel.

OnPaintContent ( DropDownPaintEventArgs e ) : void

Paints the selected node in the control.

OnSelectedNodeChanged ( EventArgs e ) : void

Raises the SelectedNodeChanged event.

Private Methods

Method Description
GetNextDisplayedNode ( ) : ComboTreeNode

Returns the next displayable node, relative to the selected node.

GetNodeImage ( ComboTreeNode node ) : Image

Returns the image referenced by the specified node in the ImageList component associated with this control.

GetNodesRecursive ( ComboTreeNodeCollection collection, bool reverse ) : IEnumerator

Helper method for the AllNodes property.

GetPrevDisplayedNode ( ) : ComboTreeNode

Returns the previous displayable node, relative to the selected node.

IsNodeVisible ( ComboTreeNode node ) : bool

Determines whether the specified node should be displayed.

OwnsNode ( ComboTreeNode node ) : bool

Determines whether the specified node belongs to this ComboTreeBox, and hence is a valid selection. For the purposes of this method, a null value is always a valid selection.

SetDroppedDown ( bool droppedDown, bool raiseEvents ) : void

Sets the value of the DroppedDown property, optionally without raising any events.

SetSelectedNode ( ComboTreeNode node ) : void

Sets the value of the SelectedNode property and raises the SelectedNodeChanged event.

dropDown_Closed ( object sender, System.Windows.Forms.ToolStripDropDownClosedEventArgs e ) : void
dropDown_Opened ( object sender, EventArgs e ) : void
nodes_CollectionChanged ( object sender, NotifyCollectionChangedEventArgs e ) : void

Method Details

BeginUpdate() public method

Prevents the dropdown portion of the control from being updated until the EndUpdate method is called.
public BeginUpdate ( ) : void
return void

CollapseAll() public method

Collapses all nodes in the tree for when the dropdown portion of the control is reopened.
public CollapseAll ( ) : void
return void

ComboTreeBox() public method

Initalises a new instance of ComboTreeBox.
public ComboTreeBox ( ) : System
return System

Dispose() protected method

Disposes of the control and its dropdown.
protected Dispose ( bool disposing ) : void
disposing bool
return void

EndUpdate() public method

Updates the dropdown portion of the control after being suspended by the BeginUpdate method.
public EndUpdate ( ) : void
return void

ExpandAll() public method

Expands all nodes in the tree for when the dropdown portion of the control is reopened.
public ExpandAll ( ) : void
return void

OnFontChanged() protected method

Updates the dropdown's font when the control's font changes.
protected OnFontChanged ( EventArgs e ) : void
e System.EventArgs
return void

OnKeyDown() protected method

Handles keyboard shortcuts.
protected OnKeyDown ( KeyEventArgs e ) : void
e System.Windows.Forms.KeyEventArgs
return void

OnLostFocus() protected method

Closes the dropdown portion of the control when it loses focus.
protected OnLostFocus ( EventArgs e ) : void
e System.EventArgs
return void

OnMouseClick() protected method

Toggles the visibility of the dropdown portion of the control.
protected OnMouseClick ( MouseEventArgs e ) : void
e MouseEventArgs
return void

OnMouseWheel() protected method

Scrolls between adjacent nodes, or scrolls the drop-down portion of the control in response to the mouse wheel.
protected OnMouseWheel ( MouseEventArgs e ) : void
e MouseEventArgs
return void

OnPaintContent() protected method

Paints the selected node in the control.
protected OnPaintContent ( DropDownPaintEventArgs e ) : void
e DropDownPaintEventArgs
return void

OnSelectedNodeChanged() protected method

Raises the SelectedNodeChanged event.
protected OnSelectedNodeChanged ( EventArgs e ) : void
e System.EventArgs
return void

Sort() public method

Sorts the contents of the tree using the default comparer.
public Sort ( ) : void
return void

Sort() public method

Sorts the contents of the tree using the specified comparer.
public Sort ( IComparer comparer ) : void
comparer IComparer
return void