Display a scrollbar when too many examples are loaded.

This commit is contained in:
the_fiddler 2008-04-20 15:09:30 +00:00
parent 7fca6b3062
commit 21cd2fd536
2 changed files with 38 additions and 8 deletions

View file

@ -30,6 +30,10 @@
{ {
this.listBox1 = new System.Windows.Forms.ListBox(); this.listBox1 = new System.Windows.Forms.ListBox();
this.runButton = new System.Windows.Forms.Button(); this.runButton = new System.Windows.Forms.Button();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// listBox1 // listBox1
@ -39,7 +43,7 @@
this.listBox1.Location = new System.Drawing.Point(0, 0); this.listBox1.Location = new System.Drawing.Point(0, 0);
this.listBox1.Margin = new System.Windows.Forms.Padding(1); this.listBox1.Margin = new System.Windows.Forms.Padding(1);
this.listBox1.Name = "listBox1"; this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(284, 264); this.listBox1.Size = new System.Drawing.Size(292, 212);
this.listBox1.Sorted = true; this.listBox1.Sorted = true;
this.listBox1.TabIndex = 0; this.listBox1.TabIndex = 0;
this.listBox1.DoubleClick += new System.EventHandler(this.listBox1_DoubleClick); this.listBox1.DoubleClick += new System.EventHandler(this.listBox1_DoubleClick);
@ -47,28 +51,50 @@
// //
// runButton // runButton
// //
this.runButton.Dock = System.Windows.Forms.DockStyle.Bottom; this.runButton.Dock = System.Windows.Forms.DockStyle.Fill;
this.runButton.Location = new System.Drawing.Point(0, 220); this.runButton.Location = new System.Drawing.Point(0, 0);
this.runButton.Margin = new System.Windows.Forms.Padding(1); this.runButton.Margin = new System.Windows.Forms.Padding(1);
this.runButton.Name = "runButton"; this.runButton.Name = "runButton";
this.runButton.Size = new System.Drawing.Size(284, 44); this.runButton.Size = new System.Drawing.Size(292, 52);
this.runButton.TabIndex = 0; this.runButton.TabIndex = 0;
this.runButton.Text = "Run Example"; this.runButton.Text = "Run Example";
this.runButton.UseVisualStyleBackColor = true; this.runButton.UseVisualStyleBackColor = true;
this.runButton.Click += new System.EventHandler(this.runButton_Click); this.runButton.Click += new System.EventHandler(this.runButton_Click);
// //
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.IsSplitterFixed = true;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.listBox1);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.runButton);
this.splitContainer1.Size = new System.Drawing.Size(292, 266);
this.splitContainer1.SplitterDistance = 213;
this.splitContainer1.SplitterWidth = 1;
this.splitContainer1.TabIndex = 1;
//
// ExampleLauncher // ExampleLauncher
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 264); this.ClientSize = new System.Drawing.Size(292, 266);
this.Controls.Add(this.runButton); this.Controls.Add(this.splitContainer1);
this.Controls.Add(this.listBox1);
this.MinimumSize = new System.Drawing.Size(300, 300); this.MinimumSize = new System.Drawing.Size(300, 300);
this.Name = "ExampleLauncher"; this.Name = "ExampleLauncher";
this.Text = "OpenTK Example Launcher"; this.Text = "OpenTK Example Launcher";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ExampleLauncher_FormClosing);
this.Load += new System.EventHandler(this.ExampleLauncher_Load); this.Load += new System.EventHandler(this.ExampleLauncher_Load);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ExampleLauncher_FormClosing);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
} }
@ -77,6 +103,7 @@
private System.Windows.Forms.ListBox listBox1; private System.Windows.Forms.ListBox listBox1;
private System.Windows.Forms.Button runButton; private System.Windows.Forms.Button runButton;
private System.Windows.Forms.SplitContainer splitContainer1;
} }
} }

View file

@ -117,4 +117,7 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="splitContainer1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root> </root>