Re: GtkTable and allignment



On Wed, Jun 01, 2005 at 03:04:51AM -0700, anonymous user wrote:
I just started playing around with gtk+ and I've run into a very
frusterating problem.  I'm hoping someone can help me out.

All I need is a simple table with X rows and 2 column's.  both left
and right column hold text only and alligned to the left.

I can't seem to get them alligned correctly.  No matter what I try,
the text gets centered.

...

   gtk_misc_set_alignment(GTK_MISC(tmpw) , 0.0f , 0.0f );
   gtk_table_attach( GTK_TABLE(table ) , tmpw , 0 , 1 , 0 , 1 ,
                     GTK_SHRINK , GTK_SHRINK , 0 , 0 );

You have to use GTK_FILL attach option, aligment has no
effect otherwise (the widget takes only its real size and
there's no extra space to align the label in).  See widget
packing section in Gtk+ tutorial.

Yeti


--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?



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