Click here to Skip to main content
15,892,537 members
Articles / Desktop Programming / Win32

A Group of GroupBox

Rate me:
Please Sign up or sign in to vote.
4.77/5 (10 votes)
16 Dec 2010CPOL5 min read 55K   1.1K   28  
CheckGroupBox, RadioGroupBox, CollapsibleGroupBox controls
namespace Demo
{
    partial class Form1
    {
        /// <summary>
        /// 必需的设计器变量。
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// 清理所有正在使用的资源。
        /// </summary>
        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows 窗体设计器生成的代码

        /// <summary>
        /// 设计器支持所需的方法 - 不要
        /// 使用代码编辑器修改此方法的内容。
        /// </summary>
        private void InitializeComponent()
        {
            this.txtMsg1 = new System.Windows.Forms.TextBox();
            this.label1 = new System.Windows.Forms.Label();
            this.button3 = new System.Windows.Forms.Button();
            this.textBox3 = new System.Windows.Forms.TextBox();
            this.radioButton1 = new System.Windows.Forms.RadioButton();
            this.radioButton2 = new System.Windows.Forms.RadioButton();
            this.radioButton3 = new System.Windows.Forms.RadioButton();
            this.radioButton4 = new System.Windows.Forms.RadioButton();
            this.radioGroupBox3 = new TR0217.ControlEx.RadioGroupBox();
            this.radioGroupBox4 = new TR0217.ControlEx.RadioGroupBox();
            this.radioGroupBox2 = new TR0217.ControlEx.RadioGroupBox();
            this.checkGroupBox2 = new TR0217.ControlEx.CheckGroupBox();
            this.textBox2 = new System.Windows.Forms.TextBox();
            this.button2 = new System.Windows.Forms.Button();
            this.checkGroupBox1 = new TR0217.ControlEx.CheckGroupBox();
            this.textBox1 = new System.Windows.Forms.TextBox();
            this.button1 = new System.Windows.Forms.Button();
            this.radioGroupBox1 = new TR0217.ControlEx.RadioGroupBox();
            this.textBox5 = new System.Windows.Forms.TextBox();
            this.label2 = new System.Windows.Forms.Label();
            this.collapsibleGroupBox1 = new TR0217.ControlEx.CollapsibleGroupBox();
            this.listView1 = new System.Windows.Forms.ListView();
            this.button4 = new System.Windows.Forms.Button();
            this.textBox4 = new System.Windows.Forms.TextBox();
            this.checkGroupBox2.SuspendLayout();
            this.checkGroupBox1.SuspendLayout();
            this.radioGroupBox1.SuspendLayout();
            this.collapsibleGroupBox1.SuspendLayout();
            this.SuspendLayout();
            // 
            // txtMsg1
            // 
            this.txtMsg1.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.txtMsg1.Location = new System.Drawing.Point(12, 12);
            this.txtMsg1.Multiline = true;
            this.txtMsg1.Name = "txtMsg1";
            this.txtMsg1.ReadOnly = true;
            this.txtMsg1.Size = new System.Drawing.Size(194, 75);
            this.txtMsg1.TabIndex = 8;
            this.txtMsg1.TabStop = false;
            this.txtMsg1.Text = "set AutoEnabledState property to true. Child controls of the GroupBox are disable" +
                "d when unchecked,and child controls of the GroupBox are enabled when checked ";
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(234, 15);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(155, 12);
            this.label1.TabIndex = 10;
            this.label1.Text = "AutoEnabledState = false.";
            // 
            // button3
            // 
            this.button3.Location = new System.Drawing.Point(234, 167);
            this.button3.Name = "button3";
            this.button3.Size = new System.Drawing.Size(192, 23);
            this.button3.TabIndex = 11;
            this.button3.Text = "add raidoitem ";
            this.button3.UseVisualStyleBackColor = true;
            this.button3.Click += new System.EventHandler(this.button3_Click);
            // 
            // textBox3
            // 
            this.textBox3.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.textBox3.Location = new System.Drawing.Point(236, 127);
            this.textBox3.Multiline = true;
            this.textBox3.Name = "textBox3";
            this.textBox3.ReadOnly = true;
            this.textBox3.Size = new System.Drawing.Size(199, 34);
            this.textBox3.TabIndex = 12;
            this.textBox3.TabStop = false;
            this.textBox3.Text = "add some RadioButton and RadioGroupBox programmatically";
            // 
            // radioButton1
            // 
            this.radioButton1.AutoSize = true;
            this.radioButton1.Location = new System.Drawing.Point(33, 249);
            this.radioButton1.Name = "radioButton1";
            this.radioButton1.Size = new System.Drawing.Size(95, 16);
            this.radioButton1.TabIndex = 13;
            this.radioButton1.Text = "radioButton1";
            this.radioButton1.UseVisualStyleBackColor = true;
            // 
            // radioButton2
            // 
            this.radioButton2.AutoSize = true;
            this.radioButton2.Checked = true;
            this.radioButton2.Location = new System.Drawing.Point(33, 227);
            this.radioButton2.Name = "radioButton2";
            this.radioButton2.Size = new System.Drawing.Size(95, 16);
            this.radioButton2.TabIndex = 14;
            this.radioButton2.TabStop = true;
            this.radioButton2.Text = "radioButton2";
            this.radioButton2.UseVisualStyleBackColor = true;
            // 
            // radioButton3
            // 
            this.radioButton3.AutoSize = true;
            this.radioButton3.Location = new System.Drawing.Point(33, 272);
            this.radioButton3.Name = "radioButton3";
            this.radioButton3.Size = new System.Drawing.Size(95, 16);
            this.radioButton3.TabIndex = 16;
            this.radioButton3.TabStop = true;
            this.radioButton3.Text = "radioButton3";
            this.radioButton3.UseVisualStyleBackColor = true;
            // 
            // radioButton4
            // 
            this.radioButton4.AutoSize = true;
            this.radioButton4.Location = new System.Drawing.Point(33, 295);
            this.radioButton4.Name = "radioButton4";
            this.radioButton4.Size = new System.Drawing.Size(95, 16);
            this.radioButton4.TabIndex = 17;
            this.radioButton4.TabStop = true;
            this.radioButton4.Text = "radioButton4";
            this.radioButton4.UseVisualStyleBackColor = true;
            // 
            // radioGroupBox3
            // 
            this.radioGroupBox3.AutoEnabledState = false;
            this.radioGroupBox3.Location = new System.Drawing.Point(280, 279);
            this.radioGroupBox3.Name = "radioGroupBox3";
            this.radioGroupBox3.Size = new System.Drawing.Size(128, 32);
            this.radioGroupBox3.TabIndex = 19;
            this.radioGroupBox3.TabStop = false;
            this.radioGroupBox3.Text = "radioGroupBox3";
            // 
            // radioGroupBox4
            // 
            this.radioGroupBox4.AutoEnabledState = false;
            this.radioGroupBox4.Location = new System.Drawing.Point(153, 279);
            this.radioGroupBox4.Name = "radioGroupBox4";
            this.radioGroupBox4.Size = new System.Drawing.Size(121, 32);
            this.radioGroupBox4.TabIndex = 18;
            this.radioGroupBox4.TabStop = false;
            this.radioGroupBox4.Text = "radioGroupBox4";
            // 
            // radioGroupBox2
            // 
            this.radioGroupBox2.AutoEnabledState = false;
            this.radioGroupBox2.Font = new System.Drawing.Font("SimSun", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.radioGroupBox2.Location = new System.Drawing.Point(280, 233);
            this.radioGroupBox2.Name = "radioGroupBox2";
            this.radioGroupBox2.Size = new System.Drawing.Size(155, 32);
            this.radioGroupBox2.TabIndex = 15;
            this.radioGroupBox2.TabStop = false;
            this.radioGroupBox2.Text = "radioGroupBox2";
            // 
            // checkGroupBox2
            // 
            this.checkGroupBox2.AutoEnabledState = false;
            this.checkGroupBox2.Checked = false;
            this.checkGroupBox2.CheckState = System.Windows.Forms.CheckState.Unchecked;
            this.checkGroupBox2.Controls.Add(this.textBox2);
            this.checkGroupBox2.Controls.Add(this.button2);
            this.checkGroupBox2.Location = new System.Drawing.Point(234, 33);
            this.checkGroupBox2.Name = "checkGroupBox2";
            this.checkGroupBox2.Size = new System.Drawing.Size(194, 88);
            this.checkGroupBox2.TabIndex = 9;
            this.checkGroupBox2.TabStop = false;
            this.checkGroupBox2.Text = "checkGroupBox2";
            // 
            // textBox2
            // 
            this.textBox2.Location = new System.Drawing.Point(16, 49);
            this.textBox2.Name = "textBox2";
            this.textBox2.Size = new System.Drawing.Size(100, 21);
            this.textBox2.TabIndex = 1;
            // 
            // button2
            // 
            this.button2.Location = new System.Drawing.Point(16, 20);
            this.button2.Name = "button2";
            this.button2.Size = new System.Drawing.Size(75, 23);
            this.button2.TabIndex = 0;
            this.button2.Text = "button2";
            this.button2.UseVisualStyleBackColor = true;
            // 
            // checkGroupBox1
            // 
            this.checkGroupBox1.Checked = false;
            this.checkGroupBox1.CheckState = System.Windows.Forms.CheckState.Unchecked;
            this.checkGroupBox1.Controls.Add(this.textBox1);
            this.checkGroupBox1.Controls.Add(this.button1);
            this.checkGroupBox1.Location = new System.Drawing.Point(12, 93);
            this.checkGroupBox1.Name = "checkGroupBox1";
            this.checkGroupBox1.Size = new System.Drawing.Size(194, 88);
            this.checkGroupBox1.TabIndex = 1;
            this.checkGroupBox1.TabStop = false;
            this.checkGroupBox1.Text = "checkGroupBox1";
            // 
            // textBox1
            // 
            this.textBox1.Location = new System.Drawing.Point(16, 49);
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(100, 21);
            this.textBox1.TabIndex = 1;
            // 
            // button1
            // 
            this.button1.Location = new System.Drawing.Point(16, 20);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(75, 23);
            this.button1.TabIndex = 0;
            this.button1.Text = "button1";
            this.button1.UseVisualStyleBackColor = true;
            // 
            // radioGroupBox1
            // 
            this.radioGroupBox1.Controls.Add(this.textBox5);
            this.radioGroupBox1.Location = new System.Drawing.Point(153, 219);
            this.radioGroupBox1.Name = "radioGroupBox1";
            this.radioGroupBox1.Size = new System.Drawing.Size(121, 46);
            this.radioGroupBox1.TabIndex = 0;
            this.radioGroupBox1.TabStop = false;
            this.radioGroupBox1.Text = "radioGroupBox1";
            // 
            // textBox5
            // 
            this.textBox5.Location = new System.Drawing.Point(6, 19);
            this.textBox5.Name = "textBox5";
            this.textBox5.Size = new System.Drawing.Size(100, 21);
            this.textBox5.TabIndex = 2;
            // 
            // label2
            // 
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(31, 204);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(299, 12);
            this.label2.TabIndex = 20;
            this.label2.Text = "set AutoCheck property to true to make them raido";
            // 
            // collapsibleGroupBox1
            // 
            this.collapsibleGroupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.collapsibleGroupBox1.BackColor = System.Drawing.Color.Transparent;
            this.collapsibleGroupBox1.Collapsed = false;
            this.collapsibleGroupBox1.CollapseParent = true;
            this.collapsibleGroupBox1.Controls.Add(this.listView1);
            this.collapsibleGroupBox1.Controls.Add(this.button4);
            this.collapsibleGroupBox1.Font = new System.Drawing.Font("SimSun", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.collapsibleGroupBox1.Location = new System.Drawing.Point(12, 368);
            this.collapsibleGroupBox1.Name = "collapsibleGroupBox1";
            this.collapsibleGroupBox1.Size = new System.Drawing.Size(423, 118);
            this.collapsibleGroupBox1.TabIndex = 21;
            this.collapsibleGroupBox1.TabStop = false;
            this.collapsibleGroupBox1.Text = "collapse";
            // 
            // listView1
            // 
            this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.listView1.Location = new System.Drawing.Point(0, 49);
            this.listView1.Name = "listView1";
            this.listView1.Size = new System.Drawing.Size(423, 66);
            this.listView1.TabIndex = 2;
            this.listView1.UseCompatibleStateImageBehavior = false;
            // 
            // button4
            // 
            this.button4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.button4.Location = new System.Drawing.Point(291, 20);
            this.button4.Name = "button4";
            this.button4.Size = new System.Drawing.Size(75, 23);
            this.button4.TabIndex = 1;
            this.button4.Text = "button4";
            this.button4.UseVisualStyleBackColor = true;
            // 
            // textBox4
            // 
            this.textBox4.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.textBox4.Location = new System.Drawing.Point(12, 331);
            this.textBox4.Multiline = true;
            this.textBox4.Name = "textBox4";
            this.textBox4.ReadOnly = true;
            this.textBox4.Size = new System.Drawing.Size(423, 34);
            this.textBox4.TabIndex = 22;
            this.textBox4.TabStop = false;
            this.textBox4.Text = "set CollapseParent to true to collapse it\'s parent when collapsed. It work well r" +
                "egardless of it\'s Dock or Anchor property.";
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(447, 498);
            this.Controls.Add(this.textBox4);
            this.Controls.Add(this.collapsibleGroupBox1);
            this.Controls.Add(this.label2);
            this.Controls.Add(this.radioGroupBox2);
            this.Controls.Add(this.radioButton1);
            this.Controls.Add(this.radioButton2);
            this.Controls.Add(this.textBox3);
            this.Controls.Add(this.button3);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.checkGroupBox2);
            this.Controls.Add(this.txtMsg1);
            this.Controls.Add(this.checkGroupBox1);
            this.Controls.Add(this.radioGroupBox1);
            this.Name = "Form1";
            this.Text = "Form1";
            this.checkGroupBox2.ResumeLayout(false);
            this.checkGroupBox2.PerformLayout();
            this.checkGroupBox1.ResumeLayout(false);
            this.checkGroupBox1.PerformLayout();
            this.radioGroupBox1.ResumeLayout(false);
            this.radioGroupBox1.PerformLayout();
            this.collapsibleGroupBox1.ResumeLayout(false);
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private TR0217.ControlEx.RadioGroupBox radioGroupBox1;
        private TR0217.ControlEx.CheckGroupBox checkGroupBox1;
        private System.Windows.Forms.Button button1;
        private System.Windows.Forms.TextBox txtMsg1;
        private TR0217.ControlEx.CheckGroupBox checkGroupBox2;
        private System.Windows.Forms.TextBox textBox2;
        private System.Windows.Forms.Button button2;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Button button3;
        private System.Windows.Forms.TextBox textBox3;
        private System.Windows.Forms.RadioButton radioButton1;
        private System.Windows.Forms.RadioButton radioButton2;
        private TR0217.ControlEx.RadioGroupBox radioGroupBox2;
        private System.Windows.Forms.RadioButton radioButton3;
        private System.Windows.Forms.RadioButton radioButton4;
        private TR0217.ControlEx.RadioGroupBox radioGroupBox3;
        private TR0217.ControlEx.RadioGroupBox radioGroupBox4;
        private System.Windows.Forms.Label label2;
        private TR0217.ControlEx.CollapsibleGroupBox collapsibleGroupBox1;
        private System.Windows.Forms.Button button4;
        private System.Windows.Forms.ListView listView1;
        private System.Windows.Forms.TextBox textBox4;
        private System.Windows.Forms.TextBox textBox1;
        private System.Windows.Forms.TextBox textBox5;
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
China China
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions