Support & Community

NodeColorPicker node control

Previous Table of Contents Next

NodeColorPicker allows you to show the Office2007 style color or color gradient picker from a node with a very useful live preview feature.

Color picker node control



Select solid color

To select a solid color from the picker, add the NodeWithColor node instance to the treeview.  It has the Color property of the System.Drawing.Color type where the selected color will be stored.

Example:

NodeTextBox tb = new NodeTextBox();
tb.AttachTo(tree);
NodeColorPicker nc = new NodeColorPicker();
nc.AttachTo(tree);
 
NodeWithColor node = new NodeWithColor("Select color");
// default color.
node.Color = Color.Red;
node.AttachTo(tree);


Select color gradient

To select a color gradient from the picker, add the NodeWithGradient node instance to the treeview.  It has the Color property of the ARMSoft.FlexibleTreeView.Themes.ColorGradient type where the selected color gradient will be stored.

Example:

NodeTextBox tb = new NodeTextBox();
tb.AttachTo(tree);
NodeColorPicker nc = new NodeColorPicker();
nc.AttachTo(tree);
 
NodeWithGradient node = new NodeWithGradient("Select a color");
// default gradient.
node.Color = new ColorGradient(Color.Red, Color.Yellow, (int)eGradientAngle.LeftToRight);
node.AttachTo(tree);


Select solid color and color gradient using one node control

Flexible TreeView allows you to select both a solid color and a color gradient using one NodeColorPicker node control. To do that, add nodes of different types that contain either a solid color (NodeWithColor) or a color gradient (NodeWithGradient) Color property simultaneously.

Example:

NodeTextBox tb = new NodeTextBox();
tb.AttachTo(tree);
// NodeColorPicker is bound to the Color property.
NodeColorPicker nc = new NodeColorPicker();
nc.AttachTo(tree);
 
// add a node to select the solid color.
NodeWithColor node = new NodeWithColor("Select solid color");
node.Color = Color.Red;
node.AttachTo(tree);
 
// add a node to select the color gradient.
NodeWithGradient node2 = new NodeWithGradient("Select color gradient");
node2.Color = new ColorGradient(Color.Red, Color.Yellow, (int)eGradientAngle.LeftToRight);
node2.AttachTo(tree);

Additional API reference


Properties

  • PreviewSize – defines an area size that shows the selected color inside a node;
  • Editable – defines whether this node control allows you to change the color.
Previous Top Next
Last news
Flexible TreeView v2.7
Sunday, 01 August 2010

Flexible TreeView v2.7 has been released with completely reimplemented data binding support.

Flexible TreeView v2.6
Thursday, 13 May 2010
Flexible TreeView v2.6 has been released with Visual Studio 2010 support, new NodeDateTime node control, data access great speed increase and much more.
Flexible TreeView v2.5
Saturday, 13 March 2010

Flexible TreeView v2.5 has been released with the new NodeProgressBar node control.

Latest release

Version:
Release date:
2.7.1
Aug 11, 2010


Copyright © 2006-2010 ARMSoft. All rights reserved.