On Sat, Jun 19, 2010 at 3:58 AM, Ardhan Madras <aj...@knac.com> wrote:
>> Can anyone tell me what is the case to use 'GtkTextView' instead of 
>> 'GtkLabel'
>> to display a text with several sentences(< 100 words) in not editable way?
>
> Maybe for `beauty' looks, the author want the text wrapped as it's parent 
> container width that GtkLabel can't do.
>
>> How to make GtkLabel fill the entire range, just like what GtkTextView did?
>
> As the doc says: You can't not make the label wrap at its parent container's 
> width, because GTK+ widgets conceptually can't make their requisition depend 
> on the parent container's size. GtkLabel only wrap-able at a given specific 
> position.
>

Curiously which docs still say that ?

FWIW, GTK+ 3.0 will wrap labels to their allocated width.

Cheers,
           -Tristan


>                   Ardhan
>
>
> --- dancef...@gmail.com wrote:
>
> From: Tao Wang <dancef...@gmail.com>
> To: gtk-app-devel-list@gnome.org
> Subject: How to make GtkLabel fills like GtkTextView?
> Date: Thu, 10 Jun 2010 13:08:25 +1000
>
> Hi,
>
> Some of the code I'm working on is using 'GtkTextView' to display text,
> which is just few sentences, rather than GtkLabel. I don't know why, Can
> anyone tell me what is the case to use 'GtkTextView' instead of 'GtkLabel'
> to display a text with several sentences(< 100 words) in not editable way?
>
> I tried to replace those GtkTextView with GtkLabel, which set wrap to
> 'word', the result is different. Here is the screenshot:
> http://i48.tinypic.com/n1os9f.png . I put the GtkTextView and GtkLabel to
> seperate GtkScrolledWindow, which disabled both scrollbar. The above is the
> GtkTextView, it expend to entire GtkScrolledWindow, and the below is the
> GtkLabel, it's only in a small range in the middle of the GtkScrolledWindow.
> How to make GtkLabel fill the entire range, just like what GtkTextView did?
> Thanks.
>
>
> --
> Regards
>
> Tao Wang
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>
>
>
>
> _____________________________________________________________
> Listen to KNAC, Hit the Home page and Tune In Live! ---> http://www.knac.com
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to