Re: [Java-gnome-developer] how to build reusable components with glade
Brought to you by:
afcowie
From: Joao V. <jvi...@ya...> - 2005-05-29 00:08:35
|
--- Tomasz Mielnik <tmi...@co...> escreveu: > Hi Hi Thomas, > I'm still lerning java-gnome together with glade capabilities so i > encountered a issue that I can't solve. > > Is there w way to build a window inside glade editor ant then use this > window as my own widget inside other windows (ie; in other VBox)? > Or how can I achieve this functionality with java-gnome/glade? > If i understood correctly, you want to have some kind of widget (like a HBox) which you can use in many windows. In my opinion, the best way to do that is doing it in code, instead of Glade. For example, you'd create a class which extends gtk.HBox. In the constructor you'd add anything you want; and then you'd just do 'new MyWidget()' do add it wherever you want. I've done that before, could send you the code if you want. Glade 2, IMHO, was made thinking of building Windows; so it's not very nice for just building components. It shouldn't be like this (and i think Glade 3 probably will be much better), but that's the way it is now. Cheers, J.V. ____________________________________________________ Yahoo! Mail, cada vez melhor: agora com 1GB de espaço grátis! http://mail.yahoo.com.br |