Labels and line-wrapping
- From: Jeroen Hoek <mail jeroenhoek nl>
- To: gtk-list gnome org
- Subject: Labels and line-wrapping
- Date: Sun, 1 Feb 2009 15:45:07 +0900
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]