C#界面设计之TabControl控件的使用

还是先上效果图吧!
C#界面设计之TabControl控件的使用_第1张图片

没有触发响应事件,下面给出控件的标注信息代码:

namespace TabControls
{
    partial class Form1
    {
        /// 
        /// 必需的设计器变量。
        /// 
        private System.ComponentModel.IContainer components = null;

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

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

        /// 
        /// 设计器支持所需的方法 - 不要
        /// 使用代码编辑器修改此方法的内容。
        /// 
        private void InitializeComponent( )
        {
            this.tabCtrSettings = new System.Windows.Forms.TabControl( );
            this.tabPgColor = new System.Windows.Forms.TabPage( );
            this.tabPgFont = new System.Windows.Forms.TabPage( );
            this.btnOK = new System.Windows.Forms.Button( );
            this.btnCancel = new System.Windows.Forms.Button( );
            this.button1 = new System.Windows.Forms.Button( );
            this.label1 = new System.Windows.Forms.Label( );
            this.label2 = new System.Windows.Forms.Label( );
            this.button2 = new System.Windows.Forms.Button( );
            this.tabCtrSettings.SuspendLayout( );
            this.tabPgColor.SuspendLayout( );
            this.tabPgFont.SuspendLayout( );
            this.SuspendLayout( );
            // 
            // tabCtrSettings
            // 
            this.tabCtrSettings.Controls.Add(this.tabPgColor);
            this.tabCtrSettings.Controls.Add(this.tabPgFont);
            this.tabCtrSettings.Location = new System.Drawing.Point(13, 34);
            this.tabCtrSettings.Name = "tabCtrSettings";
            this.tabCtrSettings.SelectedIndex = 0;
            this.tabCtrSettings.Size = new System.Drawing.Size(356, 164);
            this.tabCtrSettings.TabIndex = 0;
            // 
            // tabPgColor
            // 
            this.tabPgColor.Controls.Add(this.label1);
            this.tabPgColor.Location = new System.Drawing.Point(4, 21);
            this.tabPgColor.Name = "tabPgColor";
            this.tabPgColor.Padding = new System.Windows.Forms.Padding(3);
            this.tabPgColor.Size = new System.Drawing.Size(348, 139);
            this.tabPgColor.TabIndex = 0;
            this.tabPgColor.Text = "设置颜色";
            this.tabPgColor.UseVisualStyleBackColor = true;
            // 
            // tabPgFont
            // 
            this.tabPgFont.Controls.Add(this.label2);
            this.tabPgFont.Location = new System.Drawing.Point(4, 21);
            this.tabPgFont.Name = "tabPgFont";
            this.tabPgFont.Padding = new System.Windows.Forms.Padding(3);
            this.tabPgFont.Size = new System.Drawing.Size(348, 139);
            this.tabPgFont.TabIndex = 1;
            this.tabPgFont.Text = "设置字体";
            this.tabPgFont.UseVisualStyleBackColor = true;
            // 
            // btnOK
            // 
            this.btnOK.Location = new System.Drawing.Point(59, 208);
            this.btnOK.Name = "btnOK";
            this.btnOK.Size = new System.Drawing.Size(75, 23);
            this.btnOK.TabIndex = 1;
            this.btnOK.Text = "确定";
            this.btnOK.UseVisualStyleBackColor = true;
            // 
            // btnCancel
            // 
            this.btnCancel.Location = new System.Drawing.Point(209, 208);
            this.btnCancel.Name = "btnCancel";
            this.btnCancel.Size = new System.Drawing.Size(75, 23);
            this.btnCancel.TabIndex = 1;
            this.btnCancel.Text = "取消";
            this.btnCancel.UseVisualStyleBackColor = true;
            // 
            // button1
            // 
            this.button1.Location = new System.Drawing.Point(167, 5);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(75, 23);
            this.button1.TabIndex = 2;
            this.button1.Text = "设置颜色";
            this.button1.UseVisualStyleBackColor = true;
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(75, 55);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(53, 12);
            this.label1.TabIndex = 0;
            this.label1.Text = "设置颜色";
            // 
            // label2
            // 
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(75, 65);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(53, 12);
            this.label2.TabIndex = 0;
            this.label2.Text = "设置字体";
            // 
            // button2
            // 
            this.button2.Location = new System.Drawing.Point(248, 5);
            this.button2.Name = "button2";
            this.button2.Size = new System.Drawing.Size(75, 23);
            this.button2.TabIndex = 2;
            this.button2.Text = "设置字体";
            this.button2.UseVisualStyleBackColor = true;
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(380, 240);
            this.Controls.Add(this.button2);
            this.Controls.Add(this.button1);
            this.Controls.Add(this.btnCancel);
            this.Controls.Add(this.btnOK);
            this.Controls.Add(this.tabCtrSettings);
            this.Name = "Form1";
            this.Text = "TabControl实例";
            this.tabCtrSettings.ResumeLayout(false);
            this.tabPgColor.ResumeLayout(false);
            this.tabPgColor.PerformLayout( );
            this.tabPgFont.ResumeLayout(false);
            this.tabPgFont.PerformLayout( );
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.TabControl tabCtrSettings;
        private System.Windows.Forms.TabPage tabPgColor;
        private System.Windows.Forms.TabPage tabPgFont;
        private System.Windows.Forms.Button btnOK;
        private System.Windows.Forms.Button btnCancel;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.Button button1;
        private System.Windows.Forms.Button button2;
    }
}

你可能感兴趣的:(C#学习笔记)