left justify of label



I'm trying to left justify labels in a table, but gtk insists on centering
them no matter what I do.  Here's an example code snippet:


	table = gtk_table_new (2, 2, FALSE);
       
        label1 = gtk_label_new ("Howdy");
	gtk_label_set_justify (label1, GTK_JUSTIFY_LEFT);
	gtk_table_attach (table, label1, 0, 1, 0, 1, GTK_FILL,
			  GTK_FILL|GTK_EXPAND, 0, 0);

	entry1 = gtk_entry_new();
	gtk_table_attach (table, entry1, 1, 2, 0, 1, GTK_FILL,
			  GTK_FILL|GTK_EXPAND, 0, 0);

	label2 = gtk_label_new ("HowdyDoody");
	gtk_label_set_justify (label2, GTK_JUSTIFY_LEFT);
	gtk_table_attach (table, label2, 0, 1, 1, 2, GTK_FILL,
			  GTK_FILL|GTK_EXPAND, 0, 0);

	entry2 = gtk_entry_new();
	gtk_table_attach (table, entry2, 1, 2, 1, 2, GTK_FILL,
			  GTK_FILL|GTK_EXPAND, 0, 0);


Is there something I'm missing here?

Thanks,
Dave Cook



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