I want to have a stack of widgets with only the top widget in the stack showing and have buttons for next and back which shows the next and previous widget in the stack.
It is kind of like the GWT StackPanel but horizontal and without the accordion affect.
Is there something ready for this (free) or should I roll my own?
If I was to roll my own, how would I go about it?
I want to have a stack of widgets with only the top widget in
Share
What you want is actually a
DeckPanelorDeckLayoutPanel, with a pair of buttons that increment or decrementgetVisibleWidgetIndex(orgetVisibleWidgetfor aDeckPanel) and callshowWidgetwith the resulting index (of course, you’d have to check for the first and last widget in the deck to avoidIndexOutOfBoundsExceptions).Given how easy it is to implement, you’d better roll your own than try to find an existing one (which either won’t really please you aesthetically, or would be so flexible in layout/rendering that it becomes bloated).