* sample/Subclass.cs: Added a DeleteEventHandler to the window widget,
this way a user can properly quit the sample. svn path=/trunk/gtk-sharp/; revision=22711
This commit is contained in:
parent
058077b7f1
commit
931d2e3203
2 changed files with 8 additions and 0 deletions
|
@ -7,6 +7,8 @@
|
||||||
* generator/ManualGen.cs: Ditto
|
* generator/ManualGen.cs: Ditto
|
||||||
* generator/SignalHandler.cs: Ditto
|
* generator/SignalHandler.cs: Ditto
|
||||||
* generator/StringGen.cs: Ditto
|
* generator/StringGen.cs: Ditto
|
||||||
|
* sample/Subclass.cs: Added a DeleteEventHandler to the window widget,
|
||||||
|
this way a user can properly quit the sample.
|
||||||
|
|
||||||
2004-02-02 Mike Kestner <mkestner@ximian.com>
|
2004-02-02 Mike Kestner <mkestner@ximian.com>
|
||||||
|
|
||||||
|
|
|
@ -17,12 +17,18 @@ namespace GtkSamples {
|
||||||
{
|
{
|
||||||
Application.Init ();
|
Application.Init ();
|
||||||
Window win = new Window ("Button Tester");
|
Window win = new Window ("Button Tester");
|
||||||
|
win.DeleteEvent += new DeleteEventHandler (Quit);
|
||||||
Button btn = new MyButton ();
|
Button btn = new MyButton ();
|
||||||
win.Add (btn);
|
win.Add (btn);
|
||||||
win.ShowAll ();
|
win.ShowAll ();
|
||||||
Application.Run ();
|
Application.Run ();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void Quit (object sender, DeleteEventArgs args)
|
||||||
|
{
|
||||||
|
Application.Quit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class MyButton : Gtk.Button {
|
public class MyButton : Gtk.Button {
|
||||||
|
|
Loading…
Add table
Reference in a new issue