[Gtk-sharp-list] Glade app in many files
Tue, 17 Aug 2004 09:00:18 +0200
I don't know if it is the cleanest way to do it, but one solution can be
passing your gxml object to your OneAction() function like this :
then in your otherclass you can get your button with the glade
GetWidget() function like this :
Button myButton = (gxml.GetWidget ("MyButtonName") as Button);
Another way, is to parse your file again in your otherclass. But if you
do it like that, don't forget to set your windows not visible to avoid
them to appear for each file parsing. To do this, go to the "Common"
properties of your window (or any object you want to hide) in glade and
set "Visible" properties to "No".
Hope it will help,
Have a nice day,
Arx Henrique wrote:
>One more time, sorry my english :) I hope that all understand...
>I can try write a app in gtk#/glade and i wanted know how i separate my
>app in many files and using the same Glade.XML like this:
> Glade.XML gxml;
> public app()
> gxml = new Glade.XML(null, gui.glade ....)
> public void on_button_clicked(object o, EventArgs args)
> otherclass other = new otherclass();
>now in other file, i want run OneAction that will do something with a
>button that is contained in gui.glade
>how i do it ?