On 8/11/11 9:50 AM, ahmad wrote:
> Hello:
>
> can someone please tell me how to do you erase a line with a use of a button.
> For example if I have drawn 5 lines but the fifth line is icorrect, I would
> like to erase it.
Need more info.
What widget is drawing the lines, is it a label() or the contents of an
Fl_Text_Editor,
or are you using fl_draw(), or..?
If you're drawing text with fl_draw(), you'd call redraw() on the
parent window
(so that the entire background redraws) then draw the correct 5 lines.
Or you can draw an fl_rectf() over the old 5 lines and draw the correct
4.
If you're using a label(), I'd do the redraw() on the parent window
followed by changing the label text.
If you're using Fl_Text_Editor and friends, you'd use the edit methods
in that widget.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk