[Gtk-sharp-list] Glade app in many files

John Luke John Luke <john.luke@gmail.com>
Mon, 23 Aug 2004 13:38:06 -0400


On Mon, 23 Aug 2004 07:19:36 -0300, Arx Henrique <arxcruz@terra.com.br> wro=
te:
> On Ter, 2004-08-17 at 09:00 +0200, RUAUDEL Fr=E9d=E9ric wrote:
> > Hi Arx,
> >
> > I don't know if it is the cleanest way to do it, but one solution can b=
e
> > passing your gxml object to your OneAction() function like this :
> >
> > other.OneAction (this.gxml);
> >
> > then in your otherclass you can get your button with the glade
> > GetWidget() function like this :
> >
> > Button myButton =3D (gxml.GetWidget ("MyButtonName") as Button);
> >
>

Still another way is to use the indexer of the Glade.Xml,
which is the equivalent of GetWidget but looks a bit nicer:
Button myButton =3D gxml ["MyButtonName"] as Button;