#pragma once


namespace TableLayout {

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

	/// <summary>
	/// Zusammenfassung für Form1
	///
	/// Warnung: Wenn Sie den Namen dieser Klasse ändern, müssen Sie auch
	///          die Ressourcendateiname-Eigenschaft für das Tool zur Kompilierung verwalteter Ressourcen ändern,
	///          das allen RESX-Dateien zugewiesen ist, von denen diese Klasse abhängt.
	///          Anderenfalls können die Designer nicht korrekt mit den lokalisierten Ressourcen
	///          arbeiten, die diesem Formular zugewiesen sind.
	/// </summary>
	public ref class Form1 : public System::Windows::Forms::Form
	{
	public:
		Form1(void)
		{
			InitializeComponent();
			//
			//TODO: Konstruktorcode hier hinzufügen.
			//
         Label^ lb1 = gcnew Label();lb1->Text = "Text 1";
         Label^ lb2 = gcnew Label();lb2->Text = "Text 2"; 
         Label^ lb3 = gcnew Label();lb3->Text = "Text 3";
         Label^ lb4 = gcnew Label();lb4->Text = "Text 4";
         Label^ lb5 = gcnew Label();lb5->Text = "Text 5";
         Label^ lb6 = gcnew Label();lb6->Text = "Text 6";

         tlp->ColumnCount = 3;
         tlp->ColumnStyles->Add(gcnew ColumnStyle(SizeType::Absolute, 50));
         tlp->ColumnStyles->Add(gcnew ColumnStyle(SizeType::Absolute, 50));
         tlp->ColumnStyles->Add(gcnew ColumnStyle(SizeType::AutoSize));

         tlp->RowCount = 2;
         tlp->RowStyles->Add(gcnew ColumnStyle(SizeType::Percent, 50));
         tlp->RowStyles->Add(gcnew ColumnStyle(SizeType::Percent, 50));

         tlp->AutoSize = true;
         tlp->AutoSizeMode = System::Windows::Forms::AutoSizeMode::GrowAndShrink;
         tlp->Controls->Add(lb1, 0, 0);
         tlp->Controls->Add(lb2, 1, 0);
         tlp->Controls->Add(lb3, 2, 0);
         tlp->Controls->Add(lb4, 0, 1);
         tlp->Controls->Add(lb5, 1, 1);
         tlp->Controls->Add(lb6, 2, 1);
         tlp->CellBorderStyle = TableLayoutPanelCellBorderStyle::InsetDouble;
         tlp->BorderStyle = System::Windows::Forms::BorderStyle::None;
		}

	protected:
		/// <summary>
		/// Verwendete Ressourcen bereinigen.
		/// </summary>
		~Form1()
		{
			if (components)
			{
				delete components;
			}
		}
   private: System::Windows::Forms::TableLayoutPanel^  tlp;
   protected: 


   protected: 

	private:
		/// <summary>
		/// Erforderliche Designervariable.
		/// </summary>
		System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
		/// <summary>
		/// Erforderliche Methode für die Designerunterstützung.
		/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
		/// </summary>
		void InitializeComponent(void)
		{
         this->tlp = (gcnew System::Windows::Forms::TableLayoutPanel());
         this->SuspendLayout();
         // 
         // tlp
         // 
         this->tlp->Dock = System::Windows::Forms::DockStyle::Fill;
         this->tlp->Location = System::Drawing::Point(50, 30);
         this->tlp->Name = L"tlp";
         this->tlp->Size = System::Drawing::Size(273, 137);
         this->tlp->TabIndex = 0;
         // 
         // Form1
         // 
         this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
         this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
         this->ClientSize = System::Drawing::Size(373, 197);
         this->Controls->Add(this->tlp);
         this->Name = L"Form1";
         this->Padding = System::Windows::Forms::Padding(50, 30, 50, 30);
         this->Text = L"Table-Layout";
         this->ResumeLayout(false);

      }
#pragma endregion
	};
}

