On Sun, Jun 20, 2010 at 11:50 AM, imacarthur <[email protected]> wrote: > > On 20 Jun 2010, at 12:55, Lars Ruoff wrote: > >> I would have imagined that all Widget positions are relative to the >> origin of the containing group, but it seems widget positions are >> always absolute? (to the top level window) That's awkward. Or do i >> do something wrong? > > That's a "feature" of the fltk-1.x API. In fltk-2, the origin is wrt > the containing group, but under fltk-1.x is wrt the outer parent window. >
It works with 1.x too. This is Python but it's the same with C++. #!/usr/bin/python from fltk import * w = Fl_Window(400, 400) w.begin() G1=Fl_Group(0, 0, 1, 1) G2=Fl_Group(1, 0, 399, 1) G3=Fl_Group(0, 1, 1, 399) G4=Fl_Group(1, 1, 399, 399) G4.begin() but = Fl_Button(100, 100, 70, 30, "Okay") G4.end() w.end() w.resizable(G1) w.show() Fl.run() Try also making G1, G2, G3 resizable for fun. -- Robert Arkiletian Eric Hamber Secondary, Vancouver, Canada _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

