Stan wrote:
> I thought I included one, albeit in 2 parts :)
> Here goes again..
Yes, I can replicate with that.
I believe the issue is the inner + outer group
have the same xywh, and the inner widget's label
is drawing outside its parent's bounds.
The reason the label is showing at all is because
Fl_Group doesn't clip by default; it will if you have
align(FL_ALIGN_CLIP) enabled; if you do that, it will
draw 'correctly' by clipping out the label entirely..! ;)
I think the fix you want is to either: a) make the parent larger
and position the child so both it and its label are within
the parent's bounds, or b) set the child's align() to include
FL_ALIGN_INSIDE, so the label draws /within/ the child's
bounds, and size the child appropriately so that the label
is drawn within the child (and parent).
I'm thinking (b) is the better choice, so that the parent
and child can still be the same size, which seems to be what
you want.
You probably should enforce FL_ALIGN_CLIP for the Outer widget
so you can see when a child is trying to draw outside its bounds.
This will prevent drawing problems, or at least make them clearer.
I forget why the clip flag isn't on by default for Fl_Group, but
there was some reason.. it was brought up on the group a while ago.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk