This sample shows a tree control whose columns, items, item images, splitter and footers are all defined at design time using the Properties window, without any code.
The source code is located at C:\Program Files (x86)\Softelvdm\SftTree NET 3.0\Samples\CSharp\Components\Form1.Designer.cs.
namespace Components {
partial class Form1 {
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) {
if (disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.sftTree1 = new Softelvdm.SftTreeNET.SftTree();
((System.ComponentModel.ISupportInitialize)(this.sftTree1)).BeginInit();
this.SuspendLayout();
//
// sftTree1
//
this.sftTree1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.sftTree1.Columns.Collection.AddRange(new Softelvdm.SftTreeNET.ColumnClass[] {
new Softelvdm.SftTreeNET.ColumnClass(210, 0, true, true, false, 0, 0, false, false, false, false, true, true, System.Drawing.Color.Empty, System.Drawing.Color.Empty, System.Drawing.Color.Empty, System.Drawing.Color.Empty, Softelvdm.SftTreeNET.GridLinesOptStyleEnum.Default),
new Softelvdm.SftTreeNET.ColumnClass(70, 1, true, true, false, 0, 0, false, false, false, false, true, false, System.Drawing.Color.Empty, System.Drawing.Color.Empty, System.Drawing.Color.Empty, System.Drawing.Color.Empty, Softelvdm.SftTreeNET.GridLinesOptStyleEnum.Default),
new Softelvdm.SftTreeNET.ColumnClass(70, 2, true, true, false, 0, 0, false, false, false, false, true, false, System.Drawing.Color.Empty, System.Drawing.Color.Empty, System.Drawing.Color.Empty, System.Drawing.Color.Empty, Softelvdm.SftTreeNET.GridLinesOptStyleEnum.Default),
new Softelvdm.SftTreeNET.ColumnClass(100, 3, true, true, false, 0, 0, false, false, false, false, true, false, System.Drawing.Color.Empty, System.Drawing.Color.Empty, System.Drawing.Color.Empty, System.Drawing.Color.Empty, Softelvdm.SftTreeNET.GridLinesOptStyleEnum.Default)});
this.sftTree1.Contents = ((Softelvdm.SftTreeNET.ContentsClass)(resources.GetObject("sftTree1.Contents")));
this.sftTree1.Footers.MaxLines = 3;
this.sftTree1.ImageScaling = Softelvdm.Controls.ImageScalingEnum.Stretch;
this.sftTree1.ItemExpandableImage = ((System.Drawing.Image)(resources.GetObject("sftTree1.ItemExpandableImage")));
this.sftTree1.ItemExpandedImage = ((System.Drawing.Image)(resources.GetObject("sftTree1.ItemExpandedImage")));
this.sftTree1.ItemLeafImage = ((System.Drawing.Image)(resources.GetObject("sftTree1.ItemLeafImage")));
this.sftTree1.Location = new System.Drawing.Point(12, 12);
this.sftTree1.Name = "sftTree1";
this.sftTree1.PixelScaling = Softelvdm.Controls.PixelScalingEnum.Stretch;
this.sftTree1.Size = new System.Drawing.Size(494, 199);
this.sftTree1.Splitter.Left.Columns = 2;
this.sftTree1.Splitter.Offset = 320;
this.sftTree1.Splitter.Visible = true;
this.sftTree1.TabIndex = 0;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(695, 441);
this.Controls.Add(this.sftTree1);
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
((System.Configuration.IPersistComponentSettings)(this.sftTree1)).LoadComponentSettings();
((System.ComponentModel.ISupportInitialize)(this.sftTree1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private Softelvdm.SftTreeNET.SftTree sftTree1;
}
}