Re: [gtk-list] alignment oddity
- From: Damon Chaplin <damon karuna freeserve co uk>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] alignment oddity
- Date: Wed, 02 Jun 1999 12:29:53 +0100
Nils Philippsen wrote:
>
> Hi.
>
> Can someone please tell me why the following doesn't work (or better: how
> I get it working):
>
> label = gtk_label_new (_("New:"));
> gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
> gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
> 0, 0, 0, 0);
> gtk_widget_show (label);
>
> Actually, the label should get left-justified in the table cell, despite
> it's centered. From gtk+-1.0 times I knew you had to perform the function
> calls in a special order, so I shuffled the stuff around, to no avail.
You need to add GTK_FILL to the xoptions argument:
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
GTK_FILL, 0, 0, 0);
If you don't do that, the label is allocated the exact amount of space
it needs, and is placed in the middle of the table cell.
Setting the alignment then has no effect.
Damon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]