Re: [gtk-list] Label justification



>>>>> "M" == Mad Matt <md7141@Bristol.ac.uk> writes:

 M> Sorry if this is an old request, but: I can't seem to get the
 M> label justification to work, they all seem to stay centred. The
 M> labels are just packed into hboxes, vboxes, and tables. I then use
 M> the justification function with GTK_JUSTIFY_LEFT as the argument,
 M> but they stay centred.

The GTK_JUSTIFY_LEFT is (asaik) only used for multi-line labels.  To
justify the label text relative to other stuff (like say a table) you want

    void        gtk_misc_set_alignment (GtkMisc *misc,
                                        gfloat       xalign,
                                        gfloat       yalign);

where [xy]align are in the range [0,1].  To left justify a label l you
write something like

    gtk_misc_set_alignment (GTK_MISC (l), 0, 0.5);

        /mailund



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