Hi,

the little example below works with the Group calls commented 
out, but doesn't without (box no longer changes it's size).
Any ideas, why?

Thanks,
Johannes





// hello.cxx (example1)

#include <fltk/Window.h>
#include <fltk/Widget.h>
#include <fltk/Button.h>
#include <fltk/run.h>
using namespace fltk;

Widget *box;

void button_cb () {
  box->resize (box->h(), box->w());
}

int main(int argc, char **argv) {
  Window *window = new Window(300, 300);
  window->begin();

// Group *group = new Group (10, 10, 200, 150);
// group->begin ();

  box = new Widget(20, 20, 150, 100, "Hello");
  box->box(UP_BOX);
  box->labelfont(HELVETICA_BOLD_ITALIC);
  box->labelsize(36);
  box->labeltype(SHADOW_LABEL);

// group->end ();

  Button *b = new Button (10, 200, 100, 30, "flip");
  b->callback ((Callback*) button_cb);
  window->end();
  window->show(argc, argv);
  return run();
}

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

Reply via email to