[Gtk-sharp-list] Glade problem

Alain Perry sensei@quarkup.org
Tue, 20 Jul 2004 10:38:40 +0100


> Any simple examples floating about?

Well, I'm using glade to design the GUI of my toy app. 

You have to define your widgets the following way (and you have to
specify "using Glade;" first):

[Widget] Gtk.Window wdw;
[Widget] Gtk.Button btn;

Then, when loading your app:

Glade.Xml gxml = new Glade.Xml (null, "yourgladefile.glade", "wdw",
null);
gxml.Autoconnect (this);

And that's all. Now you can access the button widget called btn that is
defined in your glade file through the btn instance of Gtk.Button.

Hope this helps,

-- 
Alain Perry