Re: [Java-gnome-developer] Deck
Brought to you by:
afcowie
From: Andrew C. <an...@op...> - 2008-11-16 06:48:54
|
On Thu, 2008-11-13 at 16:46 +0100, Ben Bucksch wrote: > How do I make a deck? Basically a |Notebook| without > tabs. I need it when I want to display two different kinds of UI, one at > a time, in the same UI space, because they are mutually exclusive or the > selection is triggered by something else, e.g. a tree node selection. > > For now, I implemented it myself, by adding and removing children from a > HBox, and setting setSizeRequest(), calculated based on maxima of > getRequisition() of the children. That's one way. Another way I've heard of is to add both Widgets to the parent container, and use hide() on one of them, toggling to the other "state" by show()ing the second and hide()ing the first one. A third way to do this would be to use a Notebook and call its setShowTabs() to turn off the display of tab controls. Interestingly, that method just turned up on 'mainline' while I was writing this email. :) AfC Sydney |