Split Container Demo : SplitContainer « GUI Form « Visual C++ .NET

Home
Visual C++ .NET
1.2D
2.Class
3.Collections
4.Data Type
5.Database ADO.net
6.Delegate
7.Development
8.File Directory
9.Function
10.Generics
11.GUI Form
12.Language Basics
13.Network
14.Reflection
15.Security
16.Statement
17.Structure
18.Thread
19.XML
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Visual C++ .NET » GUI Form » SplitContainer 
Split Container Demo
 

  using namespace System;
  using namespace System::ComponentModel;
  using namespace System::Collections;
  using namespace System::Windows::Forms;
  using namespace System::Data;
  using namespace System::Drawing;


  public ref class Form1 : public System::Windows::Forms::Form
  {
  public:
    Form1(void)
    {
      InitializeComponent();

    }


  private:
        System::Windows::Forms::SplitContainer^  splitContainer1;
        System::Windows::Forms::TextBox^  textBox1;
        System::Windows::Forms::SplitContainer^  splitContainer2;
        System::Windows::Forms::TextBox^  textBox2;
        System::Windows::Forms::TextBox^  textBox3;

    void InitializeComponent(void)
    {
            this->splitContainer1 =
                (gcnew System::Windows::Forms::SplitContainer());
            this->textBox1 = (gcnew System::Windows::Forms::TextBox());
            this->splitContainer2 =
                (gcnew System::Windows::Forms::SplitContainer());
            this->textBox2 = (gcnew System::Windows::Forms::TextBox());
            this->textBox3 = (gcnew System::Windows::Forms::TextBox());
            this->splitContainer1->Panel1->SuspendLayout();
            this->splitContainer1->Panel2->SuspendLayout();
            this->splitContainer1->SuspendLayout();
            this->splitContainer2->Panel1->SuspendLayout();
            this->splitContainer2->Panel2->SuspendLayout();
            this->splitContainer2->SuspendLayout();
            this->SuspendLayout();
            //
            // splitContainer1
            //
            this->splitContainer1->BackColor = System::Drawing::Color::Green;
            this->splitContainer1->Dock =
                System::Windows::Forms::DockStyle::Fill;
            this->splitContainer1->Location = System::Drawing::Point(00);
            this->splitContainer1->Name = L"splitContainer1";
            //
            // splitContainer1.Panel1
            //
            this->splitContainer1->Panel1->Controls->Add(this->textBox1);
            //
            // splitContainer1.Panel2
            //
           this->splitContainer1->Panel2->Controls->Add(this->splitContainer2);
            this->splitContainer1->Size = System::Drawing::Size(292273);
            this->splitContainer1->SplitterDistance = 116;
            this->splitContainer1->TabIndex = 1;
            this->splitContainer1->Text = L"splitContainer1";
            //
            // textBox1
            //
            this->textBox1->AutoSize = false;
            this->textBox1->BorderStyle =
                System::Windows::Forms::BorderStyle::None;
            this->textBox1->Dock = System::Windows::Forms::DockStyle::Fill;
            this->textBox1->Location = System::Drawing::Point(00);
            this->textBox1->Name = L"textBox1";
            this->textBox1->Size = System::Drawing::Size(116273);
            this->textBox1->TabIndex = 0;
            this->textBox1->Text = L"Left Textbox";
            this->textBox1->TextAlign =
                System::Windows::Forms::HorizontalAlignment::Center;

            //
            // splitContainer2
            //
            this->splitContainer2->BackColor = System::Drawing::Color::Red;
            this->splitContainer2->Location = System::Drawing::Point(1882);
            this->splitContainer2->Name = L"splitContainer2";
            this->splitContainer2->Orientation =
                System::Windows::Forms::Orientation::Horizontal;
            //
            // splitContainer2.Panel1
            //
            this->splitContainer2->Panel1->Controls->Add(this->textBox2);
            //
            // splitContainer2.Panel2
            //
            this->splitContainer2->Panel2->Controls->Add(this->textBox3);
            this->splitContainer2->Size = System::Drawing::Size(132102);
            this->splitContainer2->SplitterDistance = 42;
            this->splitContainer2->TabIndex = 0;
            this->splitContainer2->Text = L"splitContainer2";
            //
            // textBox2
            //
            this->textBox2->AutoSize = false;
            this->textBox2->BorderStyle =
                System::Windows::Forms::BorderStyle::None;
            this->textBox2->Dock = System::Windows::Forms::DockStyle::Fill;
            this->textBox2->Location = System::Drawing::Point(00);
            this->textBox2->Name = L"textBox2";
            this->textBox2->Size = System::Drawing::Size(13242);
            this->textBox2->TabIndex = 0;
            this->textBox2->Text = L"Top Right Textbox";
            this->textBox2->TextAlign =
                System::Windows::Forms::HorizontalAlignment::Center;
            //
            // textBox3
            //
            this->textBox3->AutoSize = false;
            this->textBox3->BorderStyle =
                System::Windows::Forms::BorderStyle::None;
            this->textBox3->Dock = System::Windows::Forms::DockStyle::Fill;
            this->textBox3->Location = System::Drawing::Point(00);
            this->textBox3->Name = L"textBox3";
            this->textBox3->Size = System::Drawing::Size(13256);
            this->textBox3->TabIndex = 0;
            this->textBox3->Text = L"Bottom Right Textbox";
            this->textBox3->TextAlign =
                System::Windows::Forms::HorizontalAlignment::Center;
            //
            // Form1
            //
            this->AutoScaleDimensions = System::Drawing::SizeF(613);
            this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
            this->ClientSize = System::Drawing::Size(292273);
            this->Controls->Add(this->splitContainer1);
            this->Name = L"Form1";
            this->Text = L"Form1";
            this->splitContainer1->Panel1->ResumeLayout(false);
            this->splitContainer1->Panel2->ResumeLayout(false);
            this->splitContainer1->ResumeLayout(false);
            this->splitContainer2->Panel1->ResumeLayout(false);
            this->splitContainer2->Panel2->ResumeLayout(false);
            this->splitContainer2->ResumeLayout(false);
            this->ResumeLayout(false);
    }
  };


[STAThreadAttribute]
int main(array<System::String ^> ^args)
{
  Application::Run(gcnew Form1());
  return 0;
}

   
  
Related examples in the same category
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.