Clear Fl_Text_Buffer

16 views
Skip to first unread message

supsm17

unread,
Mar 21, 2024, 2:30:32 PMMar 21
to fltk.general
What is the preferred way to clear a Fl_Text_Buffer? I found remove() but was wondering if there was a more efficient way to remove all the contents. Thanks in advance.

Greg Ercolano

unread,
Mar 21, 2024, 3:13:12 PMMar 21
to fltkg...@googlegroups.com

On 3/21/24 11:30, supsm17 wrote:

What is the preferred way to clear a Fl_Text_Buffer? I found remove() but was wondering if there was a more efficient way to remove all the contents. Thanks in advance.

    I think I've just used text("");

supsm17

unread,
Mar 23, 2024, 12:55:14 AMMar 23
to fltk.general
I was under the impression that text() required a mutable string but it seems that it actually doesn't. In the docs it also says
> If null, an empty string is substituted.
Thanks for the tip!

Reply all
Reply to author
Forward
0 new messages