rendered paste bodyusing System;
using Gtk;
public class MyWindow : Window {
private static Label l;
public MyWindow () : base ("My New Window")
{
VBox v = new VBox();
this.SetDefaultSize (300, 400);
this.BorderWidth = 15;
this.DeleteEvent += new DeleteEventHandler (OnMyWindowDelete);
this.Add (v);
v.Spacing = 6;
l = new Label ("Welcome to my Application");
v.PackStart (l, true, false, 0);
Button b = new Button ("Click Me");
b.Clicked += new EventHandler (OnButtonClicked);
v.PackStart (b, false, false, 0);
this.ShowAll ();
}
void OnMyWindowDelete (object o, DeleteEventArgs args)
{
Application.Quit ();
}
void OnButtonClicked (object o, EventArgs args)
{
l.Text = "Button Clicked";
}
}