RE: [gtk-list] widget alignment

On 20-Jan-99 Lee wrote:
> Hi,
> Is it possible to align widgets in tables?
> More specifically I'm packing labels in cells next to entry widgets, but
> the labels are always aligned in the center of the table cell.
> This looks really bad, but I can't for the life of me find out how to
> left (or even right) align the labels against the table edges.

Yes, it's possible. I have had the same problem and I tried to solve it wrongly
with gtk_label_set_justify()

You can align the text in the cell with:

gtk_misc_set_alignment (GTK_MISC (your_label), x_align, y_align);

where x_align and y_align varies from 0.0 to 1.0 beign 0.0 totally alligned to
the left position and 1.0 totally to the right in the x_align case, the same
applies to y_align.

At least it works perfectly for me.


Cesar Talon <>
Laboratorio de Bajas Temperaturas
Universidad Autonoma de Madrid

Croll's Query:
        If tin whistles are made of tin, what are foghorns made of?


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