Re: alignment oddity
- From: Owen Taylor <otaylor redhat com>
- To: Nils Philippsen <nils wombat dialup fht-esslingen de>
- Cc: gtk-list redhat com
- Subject: Re: alignment oddity
- Date: 02 Jun 1999 07:22:59 -0400
Nils Philippsen <nils@wombat.dialup.fht-esslingen.de> writes:
> 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);
Try
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
GTK_FILL, 0, 0, 0);
Without the GTK_FILL flag, the label's allocation will only
be what it requested, and the allocation will be centered
in the cell of the table.
The gtk_misc_set_alignment call will only have an effect
if the allocation is bigger than the requisition.
(Would anybody like to write up a FAQ entry on aligning
labels?)
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]