FLTK logo

[fltk.general] Re: Color in Fl_Text_Display

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Color in Fl_Text_Display supsm17 Nov 18, 2021  
  Thank you, I am actually using 1.3.6, but Fl_Browser works well and the examples were also very helpful.
On Thursday, November 18, 2021 at 4:56:38 AM UTC-8 Matthias Melcher wrote:
If you use 1.4.0, also check out Fl_Simple_Terminal. It supports color by interpreting ANSI code in text. It's for displaying tet, not for editing.


Ian MacArthur schrieb am Montag, 15. November 2021 um 10:36:51 UTC+1:
On Saturday, 13 November 2021 at 18:07:42 UTC sups... wrote:
Is there some way to change the color of certain lines in Fl_Text_Display? For example, if I want a certain line to be red and another line to be blue, how would I do that? On the docs I saw there was linenumber_fgcolor, but the docs are rather unclear how to use it. How do I select which lines will be affected by the color change?

Also, is there a better way to add text to the display? Currently I just add to a string, then call buffer() every time I update it. I was wondering if there was some better way to print text to the display (I won't need to delete anything, only add).

An Fl_Browser might be a better option than a Fl_Text_* for this purpose, if it is just adding lines of text.
Also simpler to colourize too, in that case.
It is not an "editor" but it sounds like what you want is just a text list of sorts, so Fl_Browser is possibly a "btter fit" for that case...?

 

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/d8a26991-e5dd-4ee9-b25c-e2b394130c02n%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.