CheckBox inside GroupBox : GroupBox « GUI Windows Form « C# / C Sharp

Home
C# / C Sharp
1.2D Graphics
2.Class Interface
3.Collections Data Structure
4.Components
5.Data Types
6.Database ADO.net
7.Design Patterns
8.Development Class
9.Event
10.File Stream
11.Generics
12.GUI Windows Form
13.Language Basics
14.LINQ
15.Network
16.Office
17.Reflection
18.Regular Expressions
19.Security
20.Services Event
21.Thread
22.Web Services
23.Windows
24.Windows Presentation Foundation
25.XML
26.XML LINQ
C# / C Sharp by API
C# / CSharp Tutorial
C# / CSharp Open Source
C# / C Sharp » GUI Windows Form » GroupBoxScreenshots 
CheckBox inside GroupBox
CheckBox inside GroupBox

/*
C# Programming Tips & Techniques
by Charles Wright, Kris Jamsa

Publisher: Osborne/McGraw-Hill (December 28, 2001)
ISBN: 0072193794
*/
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace Group
{
  /// <summary>
  /// Summary description for FormGroup.
  /// </summary>
  public class FormGroup : System.Windows.Forms.Form
  {
    private System.Windows.Forms.GroupBox groupBox1;
    private System.Windows.Forms.TextBox textBox1;
    private System.Windows.Forms.CheckBox checkBox1;
    private System.Windows.Forms.CheckBox checkBox2;
    private System.Windows.Forms.CheckBox checkBox3;
    /// <summary>
    /// Required designer variable.
    /// </summary>
    private System.ComponentModel.Container components = null;

    public FormGroup()
    {
      //
      // Required for Windows Form Designer support
      //
      InitializeComponent();

      //
      // TODO: Add any constructor code after InitializeComponent call
      //
      Application.Idle += new System.EventHandler (OnIdle);

    }

    private void OnIdle (object sender, EventArgs e)
    {
      groupBox1.Enabled = checkBox3.Checked;
    }

    #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()
    {
      this.checkBox3 = new System.Windows.Forms.CheckBox();
      this.checkBox2 = new System.Windows.Forms.CheckBox();
      this.textBox1 = new System.Windows.Forms.TextBox();
      this.groupBox1 = new System.Windows.Forms.GroupBox();
      this.checkBox1 = new System.Windows.Forms.CheckBox();
      this.groupBox1.SuspendLayout();
      this.SuspendLayout();
      // 
      // checkBox3
      // 
      this.checkBox3.Location = new System.Drawing.Point(24120);
      this.checkBox3.Name = "checkBox3";
      this.checkBox3.Size = new System.Drawing.Size(18416);
      this.checkBox3.TabIndex = 1;
      this.checkBox3.Text = "checkBox3";
      // 
      // checkBox2
      // 
      this.checkBox2.Location = new System.Drawing.Point(13656);
      this.checkBox2.Name = "checkBox2";
      this.checkBox2.Size = new System.Drawing.Size(10416);
      this.checkBox2.TabIndex = 2;
      this.checkBox2.Text = "checkBox2";
      // 
      // textBox1
      // 
      this.textBox1.Location = new System.Drawing.Point(1624);
      this.textBox1.Name = "textBox1";
      this.textBox1.Size = new System.Drawing.Size(23220);
      this.textBox1.TabIndex = 0;
      this.textBox1.Text = "textBox1";
      // 
      // groupBox1
      // 
      this.groupBox1.Controls.AddRange(new System.Windows.Forms.Control[] {
                                          this.checkBox2,
                                          this.checkBox1,
                                          this.textBox1});
      this.groupBox1.Location = new System.Drawing.Point(1616);
      this.groupBox1.Name = "groupBox1";
      this.groupBox1.Size = new System.Drawing.Size(26496);
      this.groupBox1.TabIndex = 0;
      this.groupBox1.TabStop = false;
      this.groupBox1.Text = "groupBox1";
      // 
      // checkBox1
      // 
      this.checkBox1.Location = new System.Drawing.Point(1656);
      this.checkBox1.Name = "checkBox1";
      this.checkBox1.Size = new System.Drawing.Size(10416);
      this.checkBox1.TabIndex = 1;
      this.checkBox1.Text = "checkBox1";
      // 
      // FormGroup
      // 
      this.AutoScaleBaseSize = new System.Drawing.Size(513);
      this.ClientSize = new System.Drawing.Size(292273);
      this.Controls.AddRange(new System.Windows.Forms.Control[] {
                                      this.checkBox3,
                                      this.groupBox1});
      this.Name = "FormGroup";
      this.Text = "FormGroup";
      this.groupBox1.ResumeLayout(false);
      this.ResumeLayout(false);

    }
    #endregion

    /// <summary>
    /// The main entry point for the application.
    /// </summary>
    [STAThread]
    static void Main() 
    {
      Application.Run(new FormGroup());
    }
  }
}



           
       
Related examples in the same category
1.Group Box mouse enter eventGroup Box mouse enter event
2.Using GroupBoxes and Panels to hold buttonsUsing GroupBoxes and Panels to hold buttons
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.