Returns the resolved value of the associated
Override object's
Override.Editor property.
Syntax
Remarks
Example
The following sample code shows how to set various properties on the Override object.
| Visual Basic | Copy Code |
|---|
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinTree
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.ultraTree1.Override.UseEditor = DefaultableBoolean.True
Me.ultraTree1.Override.Editor = New EditorWithMask()
Me.ultraTree1.Override.ShowEditorButtons = ShowEditorButtons.ActiveAndHotTracked
Me.ultraTree1.Override.LabelEditAppearance.BackColor = Color.Yellow
Me.ultraTree1.Override.MaxLabelHeight = 50
Me.ultraTree1.Override.MaxLabelWidth = 200
Me.ultraTree1.Override.Multiline = DefaultableBoolean.False
Me.ultraTree1.Override.NodeSpacingAfter = 3
Me.ultraTree1.Override.NodeSpacingBefore = 2
Me.ultraTree1.NodeLevelOverrides(2).NodeSpacingAfter = 0
Me.ultraTree1.NodeLevelOverrides(2).NodeSpacingBefore = 0
Me.ultraTree1.Nodes.Override.UseEditor = DefaultableBoolean.False
Dim node As UltraTreeNode = Me.ultraTree1.GetNodeByKey("child node 1")
node.Override.MaxLabelHeight = 0
node.Nodes.Override.MaxLabelWidth = 0
End Sub
|
| C# | Copy Code |
|---|
using System.Diagnostics;
using Infragistics.Win;
using Infragistics.Win.UltraWinTree;
private void button1_Click(object sender, System.EventArgs e)
{
// Note: the Override objects are exposed as properties off
// the tree, the node and the nodes collection as well as
// items in the NodeLevelOverrides collection. This allows
// default settings to be specified for the tree, a node,
// a node's children or for a level in the tree.
// Specify that we want to use editors
this.ultraTree1.Override.UseEditor =
DefaultableBoolean.True;
// Set the default editor
// Note the EditorControl property can be used instead
this.ultraTree1.Override.Editor =
new EditorWithMask();
// Specify when editor buttons will be show
this.ultraTree1.Override.ShowEditorButtons = ShowEditorButtons.ActiveAndHotTracked;
// Set the appearance when the user is editing a node's label
this.ultraTree1.Override.LabelEditAppearance.BackColor = Color.Yellow;
// Specify limits on the width and height of a node's label
// A value of -1 means use the default. A value of 0 means
// there is no limit.
this.ultraTree1.Override.MaxLabelHeight
= 50;
this.ultraTree1.Override.MaxLabelWidth =
200;
// Specify that we don't want to support multiline nodelabels.
// Note: some editors (e.g. EditorWithMask) don't support
// multilien text.
this.ultraTree1.Override.Multiline =
DefaultableBoolean.False;
// Specify additonal spacing before and after nodes.
// A value of -1 means use the default.
//
this.ultraTree1.Override.NodeSpacingAfter = 3;
this.ultraTree1.Override.NodeSpacingBefore = 2;
// Set the default for nodes that are at level 2
// (i.e. grandchild nodes of root modes) so that
// they don't have extra spacing.
// This overrides the default setting above.
this.ultraTree1.NodeLevelOverrides[2].NodeSpacingAfter = 0;
this.ultraTree1.NodeLevelOverrides[2].NodeSpacingBefore = 0;
// Set the default for nodes at the root level
// so that they dwon't use the editor.
// This overrides the default settings above.
this.ultraTree1.Nodes.Override.UseEditor
= DefaultableBoolean.False;
// Get a specific node by its key value.
// Note: this will return the node that has that key
// from anywhere in the tree structure since keys are
// unique across the entire tree.
UltraTreeNode node = this.ultraTree1.GetNodeByKey("child node 1");
// Remove the height restriction for this node
// This overrides any default settings above.
node.Override.MaxLabelHeight = 0;
// Remove the width restriction for this node's child nodes
node.Nodes.Override.MaxLabelWidth = 0;
}
}
|
See Also