On 29 Apr 2012, at 17:28, fltkCoder wrote:

> I figured out what causes the problem.
> 
> Whenever I add this it will give that error about the lines I posted above:
> 
> 
> #include <FL/Fl_Text_Display.H>
> 
> Fl_Group *grp2 = new Fl_Group(25, 75, 640, 605);
> new Fl_Text_Display(145, 325, 400, 75);
> panel[2] = grp2;
> grp2->end();
> 
> 
> These 2 new lines are causing the problem.


Is this the code you are working from? 

I've modified this to enclose some widgets (buttons in this case) inside groups 
on each wizard page, and it appears to be working just fine.

I don't know what's different in your version, of course...

---------

#include <FL/Fl.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Wizard.H>
#include <FL/Fl_Button.H>

Fl_Double_Window* make_window();

Fl_Wizard *myWizard=(Fl_Wizard *)0;

Fl_Group *panes[4];

static void cb_A(Fl_Button*, void*) {
 myWizard->value(panes[0]);
}

static void cb_B(Fl_Button*, void*) {
 myWizard->value(panes[1]);
}

static void cb_C(Fl_Button*, void*) {
 myWizard->value(panes[2]);
}

static void cb_D(Fl_Button*, void*) {
 myWizard->value(panes[3]);
}

Fl_Double_Window* make_window() {
  Fl_Button *btn;
 Fl_Double_Window* w;
 { Fl_Double_Window* o = new Fl_Double_Window(499, 482);
   w = o;
   { myWizard = new Fl_Wizard(24, 24, 256, 271);
     myWizard->box(FL_UP_BOX);

     panes[0] = new Fl_Group(44, 48, 204, 212);
     panes[0]->begin();
      btn = new Fl_Button(50, 50, 200, 200, "A");
      btn->labelsize(148);
     panes[0]->end();

     panes[1] = new Fl_Group(44, 48, 204, 212);
     panes[1]->begin();
      btn = new Fl_Button(50, 50, 200, 200, "B");
      btn->labelsize(148);
     panes[1]->end();
     panes[1]->hide();

     panes[2] = new Fl_Group(44, 48, 204, 212);
     panes[2]->begin();
      btn = new Fl_Button(50, 50, 200, 200, "C");
      btn->labelsize(148);
     panes[2]->end();
     panes[2]->hide();

     panes[3] = new Fl_Group(44, 48, 204, 212);
     panes[3]->begin();
      btn = new Fl_Button(50, 50, 200, 200, "D");
      btn->labelsize(148);
     panes[3]->end();
     panes[3]->hide();

     myWizard->end();
   } // Fl_Wizard* myWizard

   { Fl_Button* o = new Fl_Button(320, 28, 63, 20, "A");
     o->callback((Fl_Callback*)cb_A);
   } // Fl_Button* o
   { Fl_Button* o = new Fl_Button(324, 84, 63, 20, "B");
     o->callback((Fl_Callback*)cb_B);
   } // Fl_Button* o
   { Fl_Button* o = new Fl_Button(328, 148, 63, 20, "C");
     o->callback((Fl_Callback*)cb_C);
   } // Fl_Button* o
   { Fl_Button* o = new Fl_Button(328, 204, 63, 20, "D");
     o->callback((Fl_Callback*)cb_D);
   } // Fl_Button* o
   o->end();
 } // Fl_Double_Window* o
 return w;
}

int main(int argc, char **argv) {
 Fl_Window *win = make_window();
 win->show(argc, argv);
 Fl::run();
}

---------



_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to