> [..]
> >
> > How could I add these three new Box classes to the parent window???
> >
> > Cheers
> >
> Modifications to your code are below. (I haven't
> tried to compile or run it).
>
> However, you might find it more convenient to
> lay out all the boxes at the beginning, then
> just show() or hide() them in the callback.
>
> Good luck,
> Stan
>
> void setrowheader_cb(Fl_Widget* w, void* p)
> {
>    Fl_Check_Button* flcb = dynamic_cast<Fl_Check_Button*>(w);
>    Fl_Window* win = static_cast<Fl_Window*>(p);
>    if ( flcb->value() == 1 ) {
>       flcb->labelcolor(FL_RED);
>       flcb->label("Label&Scale");
>       win->add(new Fl_Box(0, 20, 1000, 20, " first "));
>       win->add(new Fl_Box(0, 640, 1000, 20, "  second "));
>       win->add(new Fl_Box(0, 660, 1000, 20, " third "));
>    }
>    else {
>       flcb->labelcolor(FL_BLACK);
>       flcb->label("No Label&Scale");
>   }
> }
>
> int main()
> {
>    Fl_Window* w = new Fl_Window( ...  )
>    Fl_Check_Button* flcb = new Fl_Check_Button( ... )
>    w->end()
>    flcb->callback(setrowheader_cb, w);
>
>  /// etc
>

Ha Stan,

Thanks a lot, and how could I do that with show() and hide()???
I mean the Fl_Box parameter transfer problem.

cheers,
Yang

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

Reply via email to