HierarchyNode Control Property Chart4.NET - Organization Charting Component (C#/VB.NET/ASP.NET) - Documentation
Onlinewww.Chart4.NET (Documentation) | OnlineSamples Download | Release Notes

Control or container control associated with the hierarchy node.

Namespace: UnifoChart.Hierarchy
Assembly: UnifoChart.Hierarchy (in UnifoChart.Hierarchy.dll) Version: 5.1.0.0 (5.1.0)
Syntax

public Control Control { get; set; }
/** @property */
public Control get_Control()
/** @property */
public void set_Control(Control value)

Field Value

System.Windows.Forms.Control
Remarks

  • Nodes with controls is available only in HierarchyWin control (not in HierarchyWeb control) and only in non-3D chart.
  • If you set this property to display .NET controls and want to make the node background visible, then set a transparent background for the container control.
    Example:
    Panel_1.BackColor = Color.FromArgb( 1, Color.Azure );
  • You can set an opaque backcolor or background image for the container control, in which case the node background will not be visible.
  • There is no need to set anchor or autosize property for the container control or for child controls. Controls will be resized according to node size.
Examples

private void Form1_Load( object sender, EventArgs e )
{
//Create a container control
Panel Panel1 = new Panel( );            
//If the node to be transparent, set the required alpha
Panel1.BackColor = Color.FromArgb( 1/*alpha*/, Color.Azure );

//Add a linklabel with its event handler
LinkLabel LinkLabel1 = new LinkLabel( );
LinkLabel1.Click += new EventHandler( LinkLabel1_Click );
LinkLabel1.Text = "Click";
Panel1.Controls.Add( LinkLabel1 );//add to container control 

//Add a textbox
TextBox TextBox1 = new TextBox( );
TextBox1.Top = LinkLabel1.Height + 5/*gap*/;
Panel1.Controls.Add( TextBox1 );//add to container control 

//Set the container control to the particular node
hierarchyWin1.hpcData.Nodes["Node3"].Control = Panel1;

//Refresh hierarchy chart display                        
hierarchyWin1.Refresh();
}
__________________________________________________
void LinkLabel1_Click( object sender, EventArgs e )
{
    MessageBox.Show("linked");
}
See Also