41 |
private TabPage tabPage26; |
private TabPage tabPage26; |
42 |
private TabPage tabPage27; |
private TabPage tabPage27; |
43 |
private TabPage tabPage28; |
private TabPage tabPage28; |
44 |
|
private StatusBar statusBar; |
45 |
|
|
46 |
// Tab1 Labels Test |
// Tab1 Labels Test |
47 |
private Label label; |
private Label label; |
351 |
|
|
352 |
SuspendLayout(); |
SuspendLayout(); |
353 |
tabControl1 = new TabControl(); |
tabControl1 = new TabControl(); |
354 |
tabControl1.Dock = DockStyle.Fill; |
tabControl1.Size = new Size(500, 628); |
355 |
tabControl1.Multiline = true; |
tabControl1.Multiline = true; |
356 |
tabControl1.SizeMode = TabSizeMode.FillToRight; |
tabControl1.SizeMode = TabSizeMode.FillToRight; |
357 |
tabControl1.Name = "Main Tab"; |
tabControl1.Name = "Main Tab"; |
441 |
tabPage28 = new TabPage(); |
tabPage28 = new TabPage(); |
442 |
tabPage28.Text = "TrackBar"; |
tabPage28.Text = "TrackBar"; |
443 |
tabControl1.Controls.Add(tabPage28); |
tabControl1.Controls.Add(tabPage28); |
444 |
Controls.Add(tabControl1); |
|
445 |
|
statusBar = new StatusBar(); |
446 |
|
statusBar.Dock = DockStyle.Bottom; |
447 |
|
statusBar.Name = "statusBar"; |
448 |
|
statusBar.Text = "FormsTest Ready"; |
449 |
|
statusBar.Location = new Point(0, 628); |
450 |
|
statusBar.Size = new Size(500, 22); |
451 |
|
|
452 |
|
Controls.Add(statusBar); |
453 |
Controls.Add(tabControl1); |
Controls.Add(tabControl1); |
454 |
|
|
455 |
AddTreeViewTest(tabPage12); |
AddTreeViewTest(tabPage12); |
483 |
AddUpDownTest(tabPage27); |
AddUpDownTest(tabPage27); |
484 |
AddTrackbarTest(tabPage28); |
AddTrackbarTest(tabPage28); |
485 |
|
|
486 |
|
// Add the events here after the controls have been added |
487 |
|
// to the pages, otherwise the events will not be raised |
488 |
|
tabControl1.Click += new System.EventHandler(this.UpdateStatusBar); |
489 |
|
|
490 |
ResumeLayout(false); |
ResumeLayout(false); |
491 |
MinimumSize = new Size(300, 300); |
MinimumSize = new Size(300, 300); |
492 |
} |
} |
3505 |
ControlPaint.DrawSelectionFrame(g, true, b, new Rectangle(b.Left + 5, b.Top + 5, b.Width - 10, b.Height - 10), Color.Blue); |
ControlPaint.DrawSelectionFrame(g, true, b, new Rectangle(b.Left + 5, b.Top + 5, b.Width - 10, b.Height - 10), Color.Blue); |
3506 |
|
|
3507 |
b = NextBoundsPaint(g, "DSizeGrip"); |
b = NextBoundsPaint(g, "DSizeGrip"); |
3508 |
|
Console.WriteLine("DSizeGrip bounds: " + b.ToString()); |
3509 |
ControlPaint.DrawSizeGrip(g, Color.Blue, b); |
ControlPaint.DrawSizeGrip(g, Color.Blue, b); |
3510 |
|
|
3511 |
b = NextBoundsPaint(g, "DStringDisabled"); |
b = NextBoundsPaint(g, "DStringDisabled"); |
3927 |
{} |
{} |
3928 |
|
|
3929 |
} |
} |
3930 |
|
|
3931 |
|
private void UpdateStatusBar(object sender, System.EventArgs e) |
3932 |
|
{ |
3933 |
|
TabPage tabPage = (sender as TabControl).SelectedTab; |
3934 |
|
statusBar.Text = tabPage.Text; |
3935 |
|
} |
3936 |
} |
} |
3937 |
} |
} |