RE: How center a small button horizontally like in this picture....

>use a GtkAlignment with xalign and yalign set to 0.5.

or you can simply use a GtkFixed instead, in which you define the exact position
of the Widget:

GtkWidget *button = gtk_button_new_with_label("Hello");
gtk_widget_set_usize(button, 80, 25);

GtkWidget *fixed = gtk_fixed_new();

gtk_fixed_put(GTK_FIXED(fixed), 40, 40); // puts the button on x, y = 40.



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