Re: How do I left justify



Billy Patton wrote:

How do I left justify objects placed into a list?

Snippett:

   label     = gtk_label_new(cp);

gtk_misc_set_alignment(GTK_MISC(label), 0,0.5); /* aligns your label to left of the container */

Hello, Billy

There're 2 kinds of alignment for GtkLabel:
1. Text justify. Consider gtk_label_set_justify():
Sets the alignment of the lines in the text of the label relative to each other.
"gtk-doc/gtk/gtklabel.html#GTK-LABEL-SET-JUSTIFY"

2. Label's alignment (cause it derived from GtkMisc). This's what you need.
Consider gtk_misc_set_alignment():
Sets the alignment of the widget.
"gtk-doc/gtk/gtkmisc.html#GTK-MISC-SET-ALIGNMENT"

Olexiy





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