Re: Label Alignment



Kevin DeKorte wrote:

I'm adding a GTKLabel into a GTKTable

Doing this

   conf_label = gtk_label_new(_("Cache Size:"));
   gtk_table_attach_defaults(GTK_TABLE(conf_table), conf_label, 0, 1, 3,
                            4);
   gtk_widget_show(conf_label);


Works great, but the label is centered, I would like it to be left aligned. I 
looked at the gtk_label_set_justify and said that GTK_LEFT_JUSTIFY is the 
default, so how to I align the label within the table container.
 

You need

gtk_misc_set_alignment(GTK_MISC(conf_label), 0, 0.5);

Check the API docs for details on that function.

-- 
What did Mickey Mouse get for Christmas?

A Dan Quayle watch.

-- heard from a Mike Dukakis field worker

Eduardo M KALINOWSKI
ekalin bol com br
http://move.to/hpkb




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