Files
mono/mcs/class/System.Windows.Forms/Gtk/Samples/singlewidget.cs
T
2004-02-16 08:39:22 +00:00

53 lines
999 B
C#

//
// System.Windows.Forms Demo app
//
// Authors:
// Philip Van Hoof ([email protected])
//
// I use this sample for testing a single widget
//
using System;
using System.Drawing;
using System.Windows.Forms;
namespace singlewidget
{
public class GtkForm : System.Windows.Forms.Form
{
private HScrollBar hScrollBar1 = new HScrollBar();
private void InitializeWidgets()
{
this.hScrollBar1.Location = new System.Drawing.Point(50, 60);
this.hScrollBar1.Maximum = 200;
this.hScrollBar1.Minimum = 10;
this.hScrollBar1.Name = "hScrollBar1";
this.hScrollBar1.Size = new System.Drawing.Size(360, 24);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.hScrollBar1 });
this.Size = new Size(512, 512);
}
public GtkForm()
{
InitializeWidgets();
}
public class GtkMain
{
public static void Main()
{
GtkForm form1 = new GtkForm ();
form1.Text = "System.Windows.Forms at work!";
Application.Run(form1);
}
}
}
}