gtkgtk2hs

Gtk widget for text


I want build a GUI with gtk2hs, which will contain a lot of text (non editable) with a different formatting options for each piece of text. Is there any Gtk widget that was designed for this purpose? What kind of widgets are most appropriate for this?


Solution

  • you should use a GtkTextView widget that has been set as non-editable.

    if the text is not overly long (a couple of short paragraphs) you can also use a GtkLabel, but if the length or number of the paragraphs get too big then measuring text will start to become a performance issue.