* 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/SignalHandler.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>
|
||||
|
||||
|
|
|
@ -17,12 +17,18 @@ namespace GtkSamples {
|
|||
{
|
||||
Application.Init ();
|
||||
Window win = new Window ("Button Tester");
|
||||
win.DeleteEvent += new DeleteEventHandler (Quit);
|
||||
Button btn = new MyButton ();
|
||||
win.Add (btn);
|
||||
win.ShowAll ();
|
||||
Application.Run ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void Quit (object sender, DeleteEventArgs args)
|
||||
{
|
||||
Application.Quit();
|
||||
}
|
||||
}
|
||||
|
||||
public class MyButton : Gtk.Button {
|
||||
|
|
Loading…
Add table
Reference in a new issue