gtk_misc_set_alignment() for a label in a table
- From: "Frank W. Miller" <fwmiller cornfed com>
- To: "gtk-app-devel-list gnome org" <gtk-app-devel-list gnome org>
- Subject: gtk_misc_set_alignment() for a label in a table
- Date: Sat, 20 Nov 2004 23:18:08 -0500
Greetings,
I'm trying to right align a set of labels that are inserted into a
table. Here's the code snippet that tries to do that:
#define LABEL_NEW(LABEL, CSTART, CEND, RSTART, REND) \
{ \
char s[128]; \
\
label = gtk_label_new(NULL); \
memset(s, 0, 128); \
sprintf(s, "<b>%s</b>", LABEL); \
gtk_label_set_markup(GTK_LABEL(label), s); \
gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); \
gtk_widget_show(label); \
gtk_table_attach(GTK_TABLE(table), label, \
CSTART, CEND, RSTART, REND, \
(GtkAttachOptions) 0, \
(GtkAttachOptions) 0, \
BORDER_WIDTH, BORDER_WIDTH); \
}
Trouble is, it all works except the label text is not right aligned.
Any thoughts on this?
Thanks,
FM
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]