/[dotgnu-pnet]/pnetlib/samples/forms/FormsTest.cs
ViewVC logotype

Diff of /pnetlib/samples/forms/FormsTest.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by t3rmin4t0r, Tue Dec 7 11:06:50 2004 UTC revision 1.6 by drobosson, Mon Aug 22 13:32:33 2005 UTC
# Line 41  namespace FormsTest Line 41  namespace FormsTest
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;
# Line 350  namespace FormsTest Line 351  namespace FormsTest
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";
# Line 440  namespace FormsTest Line 441  namespace FormsTest
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);
# Line 475  namespace FormsTest Line 483  namespace FormsTest
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                  }                  }
# Line 3493  namespace FormsTest Line 3505  namespace FormsTest
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");
# Line 3914  namespace FormsTest Line 3927  namespace FormsTest
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  }  }

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26