Stan wrote:
> Can anyone offer some guidance on when exactly to call this?
> My docs say
> 
> ".. If you rearrange the widgets in your group, call this method to register 
> the new arrangement with the Fl_Group that contains them."
> 
> So, for instance, suppose I do something like this:
> 
>    // Make room for a new thing and prepend it.
>    Thing* thing = new Thing(x, y, w, h);
>    for(int k = 0; k < my_group->children(); ++k) {
>        my_group->child(k)->position(
>             my_group->child(k)->x(),
>             my_group->child(k)->y() + thing->h()
>        );
>    }
>    my_group->insert(*thing, 0);
> 
> Am I supposed to call my_group->init_sizes() before the loop?
> After the loop? Inside the loop? After the insert? Never?
> 
> The fact is, I haven't been able to detect any difference.. any
> advice?

Call it after you modified the widgets in the group, if at all.

You _may_ see differences, if you define a resizable() widget within a 
group and then resize the window/group. I'm not sure what it does 
_exactly_, but if you see weird widget positions after resizing, then 
you may have to call it after assigning/modifying widget positions 
within the group.

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

Reply via email to