Thread: Re: [Java-gnome-developer] Glade file question
Brought to you by:
afcowie
From: basquale\.fersini\@libero\.it <bas...@li...> - 2005-12-20 10:26:48
|
Il giorno mar, 20/12/2005 alle 10.11 +1100, Andrew Cowie ha scritto: On Mon, 2005-19-12 at 22:33 +0100, bas...@li... wrote: > > how can I load a particular > > form, defined in my foo.glade, in which there are three forms (main, > > search, about)? > > > LibGlade glade =3D new LibGlade("foo.glade", this); > .. > Window mainForm =3D (Window) glade.getWidget("main"); > Window searchForm =3D (Window) glade.getWidget("search"); > Window aboutForm =3D (Window) glade.getWidget("about"); > > AfC > Sydney > Thanks Andrew, but I have another thing to understand. In particular, whe= n I load the glade file with LibGlade glade =3D new LibGlade("foo.glade", this); and launch the main, ALL forms are displayed! What about if I want to loa= d a single form when I pressed a button? Are forms managed in the same c= lass file? ThanXyou in advance, Pas. |
From: basquale\.fersini\@libero\.it <bas...@li...> - 2005-12-20 15:15:22
|
Il giorno mar, 20/12/2005 alle 09.44 -0500, Adam Jocksch ha scritto: Scott J. Harmon wrote: > > >bas...@li... wrote: > > > > > >>Il giorno mar, 20/12/2005 alle 10.11 +1100, Andrew Cowie ha scritto: > >>On Mon, 2005-19-12 at 22:33 +0100, bas...@li... wrote: > >> > >>Thanks Andrew, but I have another thing to understand. In particular,= when I load the glade file with > >> > >>LibGlade glade =3D new LibGlade("foo.glade", this); > >> > >>and launch the main, ALL forms are displayed! What about if I want to= load a single form when I pressed a button? Are forms managed in the sa= me class file? > >> > >> > >> > > > >Try the other constructor, which allows you to specify the window: > >LibGlade gladeMain =3D new LibGlade("foo.glade", this, "main"); //Load= s main > > > >LibGlade gladeMain =3D new LibGlade("foo.glade", this, "search"); //Lo= ads > >search > > > >LibGlade gladeMain =3D new LibGlade("foo.glade", this, "about"); //Loa= ds about > > > >Scott. > > > > > As another alternative you can set all the windows to not be visible in= > glade, and then that way they will stay hidden until you explicitly sho= w > them. > > Adam Thanks a lot, guys!!! My simple application works as I want now! For Adam: I want to associate each form to a class, so I can managed them= with "structured" sense, you know; thanks however for the trik :-) . If the java-gnome community wants, when useful, I whis to translate the g= lade tutorial in Italian, just few days... Bye, Pas. |
From: Remy S. <rem...@gm...> - 2005-12-20 17:29:16
|
> Thanks a lot, guys!!! My simple application works as I want now! > For Adam: I want to associate each form to a class, so I can managed > them with "structured" sense, you know; thanks however for the > trik :-) . If the java-gnome community wants, when useful, I whis to > translate the glade tutorial in Italian, just few days... By all means, you're certainly more than welcome to if you wish. I wrote it back aroun mid-April in hopes of helping at least one person out with Glade. I guess I now have a confirmation that that's been fulfilled. :) You'll need to contact someone with rights to our sourceforge server once you're done to get it uploaded, that would probably be Joao Victor. Please don't hesitate to ask any other questions through the mailing list or to talk with some of us directly at #java-gnome on irc.gimp.net. Good luck! Regards, Rem |
From: Joao V. <jvi...@ya...> - 2005-12-22 14:55:52
|
--- Remy Suen <rem...@gm...> escreveu: > > [...] > By all means, you're certainly more than welcome to if you > wish. I wrote it back aroun mid-April in hopes of helping at least one > person out with Glade. I guess I now have a confirmation that that's > been fulfilled. :) Yeah, go ahead! Translate it and send it to me and i'll put it on the website. Also, if later you wish to write about more stuff, you're welcome. The whole JG website is a Wiki, so to write/edit anything you just need to subscribe here: http://java-gnome.sourceforge.net/cgi-bin/bin/view/TWiki/TWikiRegistration And there you go. Also feel free to come by at irc.gimp.net at #java-gnome and talk about java, gnome, glade, wiki, christmas, AfC's travels (kidding), etc... Cheers, J.V. _______________________________________________________ Yahoo! doce lar. Faça do Yahoo! sua homepage. http://br.yahoo.com/homepageset.html |
From: Scott J. H. <ha...@ks...> - 2005-12-20 13:35:41
|
bas...@li... wrote: > Il giorno mar, 20/12/2005 alle 10.11 +1100, Andrew Cowie ha scritto: > On Mon, 2005-19-12 at 22:33 +0100, bas...@li... wrote: > >>>how can I load a particular >>>form, defined in my foo.glade, in which there are three forms (main, >>>search, about)? >> >> >>LibGlade glade = new LibGlade("foo.glade", this); >>.. >>Window mainForm = (Window) glade.getWidget("main"); >>Window searchForm = (Window) glade.getWidget("search"); >>Window aboutForm = (Window) glade.getWidget("about"); >> >>AfC >>Sydney >> > > > Thanks Andrew, but I have another thing to understand. In particular, when I load the glade file with > > LibGlade glade = new LibGlade("foo.glade", this); > > and launch the main, ALL forms are displayed! What about if I want to load a single form when I pressed a button? Are forms managed in the same class file? > Try the other constructor, which allows you to specify the window: LibGlade gladeMain = new LibGlade("foo.glade", this, "main"); //Loads main LibGlade gladeMain = new LibGlade("foo.glade", this, "search"); //Loads search LibGlade gladeMain = new LibGlade("foo.glade", this, "about"); //Loads about Scott. -- "Computer Science is no more about computers than astronomy is about telescopes." - Edsger Dijkstra |
From: Adam J. <ajo...@re...> - 2005-12-20 14:45:42
|
Scott J. Harmon wrote: >bas...@li... wrote: > > >>Il giorno mar, 20/12/2005 alle 10.11 +1100, Andrew Cowie ha scritto: >>On Mon, 2005-19-12 at 22:33 +0100, bas...@li... wrote: >> >>Thanks Andrew, but I have another thing to understand. In particular, when I load the glade file with >> >>LibGlade glade = new LibGlade("foo.glade", this); >> >>and launch the main, ALL forms are displayed! What about if I want to load a single form when I pressed a button? Are forms managed in the same class file? >> >> >> > >Try the other constructor, which allows you to specify the window: >LibGlade gladeMain = new LibGlade("foo.glade", this, "main"); //Loads main > >LibGlade gladeMain = new LibGlade("foo.glade", this, "search"); //Loads >search > >LibGlade gladeMain = new LibGlade("foo.glade", this, "about"); //Loads about > >Scott. > > As another alternative you can set all the windows to not be visible in glade, and then that way they will stay hidden until you explicitly show them. Adam |