**** Merged from MCS ****
[mono-project.git] / mcs / class / System.Windows.Forms / Gtk / Samples / singlewidget.cs
blob5782f5d770ae7774c6e7e7771cce19af35d7fdab
1 //
2 // System.Windows.Forms Demo app
3 //
4 // Authors:
5 // Philip Van Hoof (me@freax.org)
6 //
7 // I use this sample for testing a single widget
8 //
10 using System;
11 using System.Drawing;
12 using System.Windows.Forms;
14 namespace singlewidget
17 public class GtkForm : System.Windows.Forms.Form
19 private HScrollBar hScrollBar1 = new HScrollBar();
21 private void InitializeWidgets()
24 this.hScrollBar1.Location = new System.Drawing.Point(50, 60);
25 this.hScrollBar1.Maximum = 200;
26 this.hScrollBar1.Minimum = 10;
27 this.hScrollBar1.Name = "hScrollBar1";
28 this.hScrollBar1.Size = new System.Drawing.Size(360, 24);
30 this.Controls.AddRange(new System.Windows.Forms.Control[] {
31 this.hScrollBar1 });
33 this.Size = new Size(512, 512);
36 public GtkForm()
38 InitializeWidgets();
42 public class GtkMain
44 public static void Main()
46 GtkForm form1 = new GtkForm ();
47 form1.Text = "System.Windows.Forms at work!";
48 Application.Run(form1);