Re: Label justification in table cell



David Necas (Yeti) wrote:
On Thu, Jun 03, 2004 at 03:54:10AM +1000, Russell Shaw wrote:

When i put GtkLabels into GtkTable cells, they get centered.
How do i get them left justified? I tried:


You probably mean left aligned?


 gtk_misc_set_alignment(GTK_MISC(label),0,0.5);
 gtk_table_attach(GTK_TABLE(tab),label,0,1,0,1,GTK_SHRINK,GTK_SHRINK,0,0);


Just let them fill the cell

  gtk_table_attach(GTK_TABLE(tab),label,0,1,0,1,
                   GTK_SHRINK|GTK_EXPAND|GTK_FILL,GTK_SHRINK,0,0);

Yeti

Hi,
What's the difference between expand and fill?

GTK_EXPAND the widget should expand to take up any extra space in its container
           that has been allocated.

GTK_FILL   the widget should fill the space allocated to it.




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