On 10/14/11 20:47, David wrote:
>> On 10/14/11 14:11, David wrote:
>>> and the text label is printed
>>> on top of the frame at top left?
>
> But would that also put the label over the top of the frame?
Right; as requested, your OP asked for the text label
to be "printed on top of the frame at top left",
and that's what align(FL_ALIGN_TOP_LEFT) should do, eg:
label
-----------------------
| |
-----------------------
But now I'm beginning to think by 'on top'
perhaps you mean you want the label obscuring
the border, eg:
-- label -----------------
| |
--------------------------
Is that what you mean?
If so, yes, that would involve deriving your own widget
to get that behavior; fltk would not have an align() flag
for this, because the label itself has no background;
the border would show through the letters.
To get that behavior, you'd want to probably derive your
own widget and overload the draw() method to draw the border
and label as you like using fl_rectf() to obscure the border
based on the label's text size, and then comp the label
'over' it.
I suppose if you're suggesting a feature for FLTK's align()
that does this, it would probably involve a clip region to
prevent the border box from being drawn where the label is,
so that the border doesn't show through underneath. Might
be possible, not sure.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk