Re: Table Widget and justification



Hi,

on Thu, 27 Dec 2001 10:42:56 -0500 (EST),
jseymour LinxNet com (Jim Seymour) wrote:

Hi,

I wish to create a window that looks like this (in part)

+---------------------------------+
|         field name: <entry box> |
| another field name: <entry box> |
|   some other field: <entry box> |
+---------------------------------+

I figured packing labels and text entry boxes into a table widget would
be the cleanest way to go.  But I can't seem to get the
right-justification I want in the first column.  I've both set right
justification on the label widget and used the non-default table attach
to no avail-- it keeps centering the labels.

So before I go tearing out what little hair I have remaining over this:
is it perhaps not possible to do what I want to do with the table
widget?

label justification means align all lines of the label (if the label has more
than one lines). What you look for, is setting the alignment with respect to
it's container, I think. The following should help:

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

where x_align is a gfloat which value is between 0.0 (left alignment) and 1.0
(right alignment), 0.5 being for centre. y_align has the same role but for the
vertical direction.

Hope this helps

Cheers

-- 
Melvin Hadasht



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