<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp%2FGUI_Windows_Form%2FLayout</id>
		<title>Csharp/C Sharp/GUI Windows Form/Layout - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp%2FGUI_Windows_Form%2FLayout"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/GUI_Windows_Form/Layout&amp;action=history"/>
		<updated>2026-04-29T18:52:19Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp/GUI_Windows_Form/Layout&amp;diff=52&amp;oldid=prev</id>
		<title> в 15:31, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/GUI_Windows_Form/Layout&amp;diff=52&amp;oldid=prev"/>
				<updated>2010-05-26T15:31:18Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 15:31, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp/GUI_Windows_Form/Layout&amp;diff=53&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp/GUI_Windows_Form/Layout&amp;diff=53&amp;oldid=prev"/>
				<updated>2010-05-26T11:32:47Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Layout Manager==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
User Interfaces in C#: Windows Forms and Custom Controls&lt;br /&gt;
by Matthew MacDonald&lt;br /&gt;
Publisher: Apress&lt;br /&gt;
ISBN: 1590590457&lt;br /&gt;
*/&lt;br /&gt;
using System;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Collections;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
using System.Data;&lt;br /&gt;
namespace LayoutManager&lt;br /&gt;
{&lt;br /&gt;
    /// &amp;lt;summary&amp;gt;&lt;br /&gt;
    /// Summary description for LayoutManager.&lt;br /&gt;
    /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
    public class LayoutManager : System.Windows.Forms.Form&lt;br /&gt;
    {&lt;br /&gt;
        internal System.Windows.Forms.TabControl tabControl1;&lt;br /&gt;
        internal System.Windows.Forms.TabPage tabPage1;&lt;br /&gt;
        internal System.Windows.Forms.TabPage tabPage2;&lt;br /&gt;
        /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// Required designer variable.&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        private System.ruponentModel.Container components = null;&lt;br /&gt;
        public LayoutManager()&lt;br /&gt;
        {&lt;br /&gt;
            //&lt;br /&gt;
            // Required for Windows Form Designer support&lt;br /&gt;
            //&lt;br /&gt;
            InitializeComponent();&lt;br /&gt;
            //&lt;br /&gt;
            // TODO: Add any constructor code after InitializeComponent call&lt;br /&gt;
            //&lt;br /&gt;
        }&lt;br /&gt;
        /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// Clean up any resources being used.&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        protected override void Dispose( bool disposing )&lt;br /&gt;
        {&lt;br /&gt;
            if( disposing )&lt;br /&gt;
            {&lt;br /&gt;
                if (components != null) &lt;br /&gt;
                {&lt;br /&gt;
                    components.Dispose();&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
            base.Dispose( disposing );&lt;br /&gt;
        }&lt;br /&gt;
        #region Windows Form Designer generated code&lt;br /&gt;
        /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// Required method for Designer support - do not modify&lt;br /&gt;
        /// the contents of this method with the code editor.&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        private void InitializeComponent()&lt;br /&gt;
        {&lt;br /&gt;
            this.tabControl1 = new System.Windows.Forms.TabControl();&lt;br /&gt;
            this.tabPage1 = new System.Windows.Forms.TabPage();&lt;br /&gt;
            this.tabPage2 = new System.Windows.Forms.TabPage();&lt;br /&gt;
            this.tabControl1.SuspendLayout();&lt;br /&gt;
            this.SuspendLayout();&lt;br /&gt;
            // &lt;br /&gt;
            // tabControl1&lt;br /&gt;
            // &lt;br /&gt;
            this.tabControl1.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) &lt;br /&gt;
                | System.Windows.Forms.AnchorStyles.Left) &lt;br /&gt;
                | System.Windows.Forms.AnchorStyles.Right);&lt;br /&gt;
            this.tabControl1.Controls.AddRange(new System.Windows.Forms.Control[] {&lt;br /&gt;
                                                                                      this.tabPage1,&lt;br /&gt;
                                                                                      this.tabPage2});&lt;br /&gt;
            this.tabControl1.Location = new System.Drawing.Point(6, 3);&lt;br /&gt;
            this.tabControl1.Name = &amp;quot;tabControl1&amp;quot;;&lt;br /&gt;
            this.tabControl1.SelectedIndex = 0;&lt;br /&gt;
            this.tabControl1.Size = new System.Drawing.Size(280, 260);&lt;br /&gt;
            this.tabControl1.TabIndex = 1;&lt;br /&gt;
            // &lt;br /&gt;
            // tabPage1&lt;br /&gt;
            // &lt;br /&gt;
            this.tabPage1.Location = new System.Drawing.Point(4, 22);&lt;br /&gt;
            this.tabPage1.Name = &amp;quot;tabPage1&amp;quot;;&lt;br /&gt;
            this.tabPage1.Size = new System.Drawing.Size(272, 234);&lt;br /&gt;
            this.tabPage1.TabIndex = 0;&lt;br /&gt;
            this.tabPage1.Text = &amp;quot;TabPage1&amp;quot;;&lt;br /&gt;
            // &lt;br /&gt;
            // tabPage2&lt;br /&gt;
            // &lt;br /&gt;
            this.tabPage2.Location = new System.Drawing.Point(4, 22);&lt;br /&gt;
            this.tabPage2.Name = &amp;quot;tabPage2&amp;quot;;&lt;br /&gt;
            this.tabPage2.Size = new System.Drawing.Size(272, 234);&lt;br /&gt;
            this.tabPage2.TabIndex = 1;&lt;br /&gt;
            this.tabPage2.Text = &amp;quot;TabPage2&amp;quot;;&lt;br /&gt;
            this.tabPage2.Visible = false;&lt;br /&gt;
            // &lt;br /&gt;
            // LayoutManager&lt;br /&gt;
            // &lt;br /&gt;
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);&lt;br /&gt;
            this.ClientSize = new System.Drawing.Size(292, 266);&lt;br /&gt;
            this.Controls.AddRange(new System.Windows.Forms.Control[] {&lt;br /&gt;
                                                                          this.tabControl1});&lt;br /&gt;
            this.Font = new System.Drawing.Font(&amp;quot;Tahoma&amp;quot;, 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));&lt;br /&gt;
            this.Name = &amp;quot;LayoutManager&amp;quot;;&lt;br /&gt;
            this.Text = &amp;quot;LayoutManager&amp;quot;;&lt;br /&gt;
            this.Load += new System.EventHandler(this.LayoutManager_Load);&lt;br /&gt;
            this.tabControl1.ResumeLayout(false);&lt;br /&gt;
            this.ResumeLayout(false);&lt;br /&gt;
        }&lt;br /&gt;
        #endregion&lt;br /&gt;
        /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// The main entry point for the application.&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        [STAThread]&lt;br /&gt;
        static void Main() &lt;br /&gt;
        {&lt;br /&gt;
            Application.Run(new LayoutManager());&lt;br /&gt;
        }&lt;br /&gt;
        private void LayoutManager_Load(object sender, System.EventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            // Create and attach the layout manager.&lt;br /&gt;
            SingleLineFlow layoutManager = new SingleLineFlow(tabPage1, 20);&lt;br /&gt;
            // Add 10 sample checkboxes.&lt;br /&gt;
            CheckBox chkbox;&lt;br /&gt;
            for (int i = 1; i &amp;lt; 11; i++)&lt;br /&gt;
            {&lt;br /&gt;
                chkbox = new CheckBox();&lt;br /&gt;
                chkbox.Text = &amp;quot;Setting &amp;quot; + i.ToString();&lt;br /&gt;
                tabPage1.Controls.Add(chkbox);&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    public class SingleLineFlow&lt;br /&gt;
    {&lt;br /&gt;
        private Control container;&lt;br /&gt;
        private int margin;&lt;br /&gt;
        public SingleLineFlow(Control parent, int margin)&lt;br /&gt;
        {&lt;br /&gt;
            this.container = parent;&lt;br /&gt;
            this.margin = margin;&lt;br /&gt;
            // Attach the event handler.&lt;br /&gt;
            container.Layout += new LayoutEventHandler(UpdateLayout);&lt;br /&gt;
            // Refresh the layout.&lt;br /&gt;
            UpdateLayout(this, null);&lt;br /&gt;
        }&lt;br /&gt;
        public int Margin&lt;br /&gt;
        {&lt;br /&gt;
            get&lt;br /&gt;
            {&lt;br /&gt;
                return margin;&lt;br /&gt;
            }&lt;br /&gt;
            set&lt;br /&gt;
            {&lt;br /&gt;
                margin = value;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        // This is public so it can be triggered manually if needed.&lt;br /&gt;
        public void UpdateLayout(object sender,&lt;br /&gt;
            System.Windows.Forms.LayoutEventArgs e)&lt;br /&gt;
        {&lt;br /&gt;
            int y = 0;&lt;br /&gt;
            foreach (Control ctrl in container.Controls)&lt;br /&gt;
            {&lt;br /&gt;
                y += Margin;&lt;br /&gt;
                ctrl.Left = Margin;&lt;br /&gt;
                ctrl.Top = y;&lt;br /&gt;
                ctrl.Width = container.Width;&lt;br /&gt;
                ctrl.Height = Margin;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>