Hello, FAQ maintainer, was: Re: [gtk-list] Re:gtklabel: , GTK_JUSTIFY_LEFT



Hello,

On Tue, 11 Aug 1998, Marc wrote:

> Eric Harlow has already replied to this question in a previous message
> (Wed,15 Jul 1998).
> Next time, please seek in the archives before asking...
>  
> **Align left:
> 
> gtk_misc_set_alignment (GTK_MISC (label), 0, .5);
> 
> **Align Right:
> 
> gtk_misc_set_alignment (GTK_MISC (label, 1, .5);
> 
> The second param is the -x- and the third is the -y-
> 
> 0 is left (2nd param) or top (3rd param)
> .5 is centered
> 1 is right (2nd param) or bottom (3rd param)
> 

As an addition: the gtk_label_set_justify modifies the behaviour of the lines
in a multi line label, e.g. "a=gtk_label_new ("line 1\nline 2\nlong line 3");",
wrt the justification of the lines in the label's bounding box. If you don't
have a multi line label, use of gtk_label_set_justify has no (visible) effect.
What most people try to do is modifying the alignment of the label's bounding
box, so they should use gtk_misc_set_alignment(). Noticing the frequency of
how often this question rises up, it should go into the FAQ. Objections?

Nils
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nils Philippsen                  @college: nils@rhlx01.rz.fht-esslingen.de
Vogelsangstrasse 115             @home:    nils@wombat.dialup.fht-esslingen.de
D 70197 Stuttgart     -     clickety click     -     phone:    +49-711-6599405
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Wer heute an der Bildung spart,          Those who scrimp on education today,
hat morgen noch bloedere Politiker.      get even dumber politicians tomorrow.



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