DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2624
Version: 1.3-feature


As per the discussion on the list "x y position in group". Have widget x,y
location be relative to the Group they are placed inside. As suggested by
Matt, this should be a choice and the default be group-relative.


Link: http://www.fltk.org/str.php?L2624
Version: 1.3-feature
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Button.H>
using namespace std;

int main(int argc, char **argv) {

        Fl_Window *window = new Fl_Window(400,400);

        window->begin();
                Fl_Group* g1 = new Fl_Group(100,100,200,200); 
                // want any widgets placed in g1 to be in relation to 100,100
        window->end();

        g1->begin();
                Fl_Button *b1 = new Fl_Button(0,0,50,50);
                // 0,0 is in relation to window not group g1
        g1->end();

        window->show(argc, argv);
        return Fl::run();
}

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

Reply via email to