> > I don't know enough java or gtk to be sure, but I think you are maybe
> > describing the interface idiom provided by fltk::WizardGroup or possibly
> > by fltk::TabGroup...
> >
> > Check the docs for those, see if they do what you want.
>
> What I want is to switch containers (containing a set of widgets) when user 
> clicks a button for example; the window should be the same though...
>
> I don't think fltk::WizardGroup  or fltk::TabGroup is intended for such a 
> think....

Well I have to admit that the FLTK2 documentation for WizardGroup is
not really clear:

WizardGroup:
 This class encapsulates Groups and shows only one group among n others
 at any time. Just create a WizardGroup as you would create a Group and
 add child Widgets inside.
See http://www.fltk.org/doc-2.0/html/index.html

but the FLTK1 documentation for Fl_Wizard does explain it better:

Fl_Wizard:
 The Fl_Wizard widget is based off the Fl_Tabs widget, but instead
 of displaying tabs it only changes "tabs" under program control. Its
 primary purpose is to support "wizards" that step a user through
 configuration or troubleshooting tasks.
 As with Fl_Tabs, wizard panes are composed of child (usually Fl_Group)
 widgets. Navigation buttons must be added separately.
See http://www.fltk.org/documentation.php/doc-1.1/Fl_Wizard.html

What neither really says is that you need to have a button somewhere
whose callback calls the relevant wizard widget's prev(), next() or
value() methods in order to switch between panes

You might want to look at Greg's FLTK1 Fl_Wizard example code at
http://seriss.com/people/erco/fltk/#Fl_Wizard and then apply the
same principles to the FLTK2 WizardGroup.

Good luck
D.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to