> When a widget's label lies outside the widget, and the > label is changed to a shorter label, redraw_label() does > not clear out the excess text left over from the longer > label > > I've worked around this by calling redraw() on the > parent window, but (1) this seems crude, (2) the parent > window isn't always handy (will the parent group do it? I don't > know), and (3) I can't tell from the docs if this is supposed > to work reliably.
Yes, this is kind of a known issue, in that any label that extends outside its widget, is not guaranteed to be updated (due to clip regions and all that.) Generally, it's not just if you change the label that you see problems, you can also see problems if you damage a widget (e.g. due to overlapping other windows or etc.) and that redraws the part of the label within the bounds, but the part outside might not get redrawn... So, in general, if the label extends outside the widgets bounds, you need to manage redrawing the label more carefully, as you have seen. Usually redrawing the parent group is enough - although depending on the parent groups box type that might not clear the background (e.g. if it is only a frame, or has no box type at all) and so you might still get some "residue" left behind. Where I have chosen to have a label that extends beyond its widget (and I have only really done this with radio buttons, FWIW) I have actually created a separate flat-box to hold the label, and made sure that was big enough to enclose the full label. This is more of a hassle to set up and update, but made the labels much more "robust" in use... YMMV, -- Ian SELEX Sensors and Airborne Systems Limited Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL A company registered in England & Wales. Company no. 02426132 ******************************************************************** This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ******************************************************************** _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

