[Gtk-sharp-list] Glade app in many files
Arx Henrique
arxcruz@terra.com.br
Mon, 23 Aug 2004 07:19:36 -0300
--=-02bIZdVv/cVz17IgPk60
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
On Ter, 2004-08-17 at 09:00 +0200, RUAUDEL Fr=E9d=E9ric wrote:
> Hi Arx,
>=20
> I don't know if it is the cleanest way to do it, but one solution can be=20
> passing your gxml object to your OneAction() function like this :
>=20
> other.OneAction (this.gxml);
>=20
> then in your otherclass you can get your button with the glade=20
> GetWidget() function like this :
>=20
> Button myButton =3D (gxml.GetWidget ("MyButtonName") as Button);
>=20
> Another way, is to parse your file again in your otherclass. But if you=20
> do it like that, don't forget to set your windows not visible to avoid=20
> them to appear for each file parsing. To do this, go to the "Common"=20
> properties of your window (or any object you want to hide) in glade and=20
> set "Visible" properties to "No".
>=20
This will require more memory ?
> Hope it will help,
>=20
> Have a nice day,
>=20
> Fred
>=20
> Arx Henrique wrote:
>=20
> >Hello all,
> >
> >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:
> >
> >file1:
> >
> >class app
> >{
> > Glade.XML gxml;
> > public app()
> > {
> > gxml =3D new Glade.XML(null, gui.glade ....)
> > ...
> > }
> > public void on_button_clicked(object o, EventArgs args)
> > {
> > otherclass other =3D new otherclass();
> > other.OneAction();
> > }
> >}
> >
> >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 ?
> >
> >Cheers
> > =20
> >
> _______________________________________________
> Gtk-sharp-list maillist - Gtk-sharp-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>=20
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: VirusScan / Atualizado em 16/08/2004 / Vers=E3o: 1.5.2
> Proteja o seu e-mail Terra: http://www.emailprotegido.terra.com.br/
--=-02bIZdVv/cVz17IgPk60
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: Esta =?ISO-8859-1?Q?=E9?= uma parte de mensagem
assinada digitalmente
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQBBKcS4rz6Y0HRLNBURAvjMAJ9O0TdZUTamWFsOvb5xsLWgrQ2a3wCeOi+H
WLhqLQ8y4QwGbAb0aKrjOpA=
=49nP
-----END PGP SIGNATURE-----
--=-02bIZdVv/cVz17IgPk60--