Skip to content

NodeTextBox

NodeTextBox allows you to show and edit text. It supports text auto-wrapping (TextWrapMode property) and HTML text displaying (SupportHtml property).

Example#

Example

NodeTextBox ctrl = new NodeTextBox();
ctrl.DataFieldName = "Text";   // this is the value by default so can be omitted
tree.NodeControls.Add(ctrl);

// NodeTextBox will display the 'Some text' text for this node
Node node = new Node("Some text");
node.AttachTo(tree);
Dim ctrl As NodeTextBox
ctrl = New NodeTextBox()
ctrl.DataFieldName = "Text"    ' this is the value by default so can be omitted
tree.NodeControls.Add(ctrl)

' NodeTextBox will display the 'Some text' text for this node
Dim node As New Node("Some text")
node.AttachTo(tree)

Text format#

You can easily change the text output format using the DisplayFormat property as described here.

Edit#

NodeTextBox supports in-place text editing. To enable it, set the Editable property to true. To control the text maximum length on edit, use the MaxLength property.

Note

When the SupportHtml property is enabled, the node control doesn't allow text editing.

Additional API reference#

Properties#

  • SupportHtml - allows you to show HTML text.
  • TextWrapMode - allows auto-wrapping of text that exceeds a column's or treeview's bounds.
  • StaticValue - allows you to show some static content without binding the node control to a node.