Labels and line-wrapping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello gtk-list,

I am trying to find a way to display paragraphs of text in a GTK
application. When I use a GTK Label, I get the following effect:

(screenshot)
http://imagebin.ca/view/nK9_cE_I.html

The smaller text that reads "Download the data dump from the default
location on the GlyphWiki website" is supplied to the Label as a
string without any line-breaks. The label is set to do line-wrapping.
The label is marked up with "<small>" Pango tags. The label is
contained inside a VBox, and has the whole width of the window
available to it.

What happens is that the Label's line-wrapping cuts of the lines way
before running out of horizontal space. What I want is a widget that
uses the horizontal space it got, and wraps accordingly.

I could write my own widget to do this, but wouldn't I be re-inventing
the wheel? Is there an easier way? If I do write my own line-wrapping
label, how can I find the default font, color and font-size that a
normal label would use?

Any tips or suggestions are welcome.

Kind regards,

Jeroen Hoek
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux