private void StandardDemo1Ctl_Load(object sender, System.EventArgs e) { Stream stm = Assembly.GetExecutingAssembly().GetManifestResourceStream("DemoTreeView.images.fond1.jpg"); Image bmp = Bitmap.FromStream(stm); geniusTreeView1.Header.Colonnes.Clear(); GeniusTreeViewColonne col = geniusTreeView1.Header.Add(); col.AllowClick = false; col.BackColor = new GeniusLinearGradientBrush(Color.White, Color.LightBlue, 90); col.ForeColor = new GeniusLinearGradientBrush(Color.White, Color.Black, 90); col.Font = new Font("Tahoma", 13, FontStyle.Bold | FontStyle.Italic); col.Text = "Image file name"; col.Width = 218; col = geniusTreeView1.Header.Add(); col.AllowClick = false; col.Text = "Thumbnail"; col.Width = 160; col = geniusTreeView1.Header.Add(); col.AllowClick = false; col.Text = "Properties"; col.Width = 120; TextureBrush br = new TextureBrush(bmp, WrapMode.Tile); br.RotateTransform(25); //br.ScaleTransform(2,2,MatrixOrder.Append); col.BackColor = new GeniusLinearGradientBrush(br); geniusTreeView1.DefaultNodeHeight = 32; geniusTreeView1.Colors.GridLinesColor = new Pen(Color.LightGray, 1); geniusTreeView1.Header.MainColumnIndex = 0; }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.geniusTreeView1 = new Genius.Controls.TreeView.GeniusTreeView(); this.geniusTreeViewColonne1 = new Genius.Controls.TreeView.GeniusTreeViewColonne(); this.geniusTreeViewColonne2 = new Genius.Controls.TreeView.GeniusTreeViewColonne(); this.geniusTreeViewColonne3 = new Genius.Controls.TreeView.GeniusTreeViewColonne(); this.SuspendLayout(); // GeniusTreeView By Pierrick Gourlain // // geniusTreeView1 // this.geniusTreeView1.Alignment = System.Drawing.StringAlignment.Near; this.geniusTreeView1.AutoSort = false; this.geniusTreeView1.BackColor = System.Drawing.SystemColors.Window; this.geniusTreeView1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.geniusTreeView1.Colors.HeaderColor = new Genius.Controls.GeniusLinearGradientBrush(System.Drawing.Color.White, System.Drawing.Color.LightGray, 90F); this.geniusTreeView1.Colors.SelectedColor = new Genius.Controls.GeniusLinearGradientBrush(System.Drawing.SystemColors.Highlight, System.Drawing.Color.Empty, 0F); this.geniusTreeView1.Colors.SelectedTextColor = new Genius.Controls.GeniusLinearGradientBrush(System.Drawing.SystemColors.HighlightText, System.Drawing.Color.Empty, 0F); this.geniusTreeView1.Colors.SelectedUnfocusedColor = new Genius.Controls.GeniusLinearGradientBrush(System.Drawing.SystemColors.InactiveCaption, System.Drawing.Color.Empty, 0F); this.geniusTreeView1.Colors.SignaledPenColor = new Genius.Controls.TreeView.Colors.GeniusPen(System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(165)), ((System.Byte)(0))), 2F); this.geniusTreeView1.Colors.TextColor = new Genius.Controls.GeniusLinearGradientBrush(System.Drawing.Color.Black, System.Drawing.Color.Empty, 0F); this.geniusTreeView1.DefaultDrawingOption = Genius.Controls.TreeView.DrawingOptions.ShowGridLines; this.geniusTreeView1.Dock = System.Windows.Forms.DockStyle.Fill; this.geniusTreeView1.Header.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.geniusTreeView1.Header.MainColumnIndex = 0; this.geniusTreeView1.HeaderColonnes.AddRange(new Genius.Controls.TreeView.GeniusTreeViewColonne[] { this.geniusTreeViewColonne1, this.geniusTreeViewColonne2, this.geniusTreeViewColonne3 }); this.geniusTreeView1.KeysGridMode = false; this.geniusTreeView1.Location = new System.Drawing.Point(0, 0); this.geniusTreeView1.Name = "geniusTreeView1"; this.geniusTreeView1.ShowHeader = true; this.geniusTreeView1.Size = new System.Drawing.Size(376, 328); this.geniusTreeView1.TabIndex = 0; this.geniusTreeView1.Text = "geniusTreeView1"; this.geniusTreeView1.UseColumns = true; this.geniusTreeView1.OnInitEdit += new Genius.Controls.TreeView.OnInitEditDelegate(this.geniusTreeView1_OnInitEdit); this.geniusTreeView1.OnCreateEditor += new Genius.Controls.TreeView.OnCreateEditorDelegate(this.geniusTreeView1_OnCreateEditor); this.geniusTreeView1.OnAfterCheck += new Genius.Controls.TreeView.OnNodeDelegate(this.geniusTreeView1_OnAfterCheck); this.geniusTreeView1.OnBeforeEdit += new Genius.Controls.TreeView.OnCanEditDelegate(this.geniusTreeView1_OnBeforeEdit); this.geniusTreeView1.OnAfterEdit += new Genius.Controls.TreeView.OnAfterEditDelegate(this.geniusTreeView1_OnAfterEdit); // // geniusTreeViewColonne1 // this.geniusTreeViewColonne1.BackColor = new Genius.Controls.GeniusLinearGradientBrush(System.Drawing.Color.Empty, System.Drawing.Color.Empty, 0F); this.geniusTreeViewColonne1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.geniusTreeViewColonne1.FontColonne = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.geniusTreeViewColonne1.ForeColor = new Genius.Controls.GeniusLinearGradientBrush(System.Drawing.Color.Black, System.Drawing.Color.Empty, 0F); this.geniusTreeViewColonne1.HeadColor = new Genius.Controls.GeniusLinearGradientBrush(System.Drawing.Color.Empty, System.Drawing.Color.Empty, 0F); this.geniusTreeViewColonne1.Text = "TreeColumn"; this.geniusTreeViewColonne1.Width = 200; // // geniusTreeViewColonne2 // this.geniusTreeViewColonne2.BackColor = new Genius.Controls.GeniusLinearGradientBrush(System.Drawing.Color.Empty, System.Drawing.Color.Empty, 0F); this.geniusTreeViewColonne2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.geniusTreeViewColonne2.FontColonne = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.geniusTreeViewColonne2.ForeColor = new Genius.Controls.GeniusLinearGradientBrush(System.Drawing.Color.Black, System.Drawing.Color.Empty, 0F); this.geniusTreeViewColonne2.HeadColor = new Genius.Controls.GeniusLinearGradientBrush(System.Drawing.Color.Empty, System.Drawing.Color.Empty, 0F); this.geniusTreeViewColonne2.Text = "TextEditor"; // // geniusTreeViewColonne3 // this.geniusTreeViewColonne3.BackColor = new Genius.Controls.GeniusLinearGradientBrush(System.Drawing.Color.Empty, System.Drawing.Color.Empty, 0F); this.geniusTreeViewColonne3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.geniusTreeViewColonne3.FontColonne = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.geniusTreeViewColonne3.ForeColor = new Genius.Controls.GeniusLinearGradientBrush(System.Drawing.Color.Black, System.Drawing.Color.Empty, 0F); this.geniusTreeViewColonne3.HeadColor = new Genius.Controls.GeniusLinearGradientBrush(System.Drawing.Color.Empty, System.Drawing.Color.Empty, 0F); this.geniusTreeViewColonne3.Text = "ComboEditor"; // // DemoEditors // this.Controls.Add(this.geniusTreeView1); this.Name = "DemoEditors"; this.Size = new System.Drawing.Size(376, 328); this.Load += new System.EventHandler(this.DemoEditors_Load); this.ResumeLayout(false); }