After creating a dialog, you'll want to put something
inside. If you just want a label inside, probably you
should use GnomeMessageBox
or one of the convenience routines (such as gnome_ok_dialog()) instead of
constructing the dialog manually. Otherwise, filling a
dialog is very simple:
GtkWidget* button;
/* ... create dialog as shown earlier ... */
button = gtk_button_new_with_label(_("Push Me"));
gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(dialog)->vbox)),
button,
TRUE,
TRUE,
0);
|
Of course you can pack the contents of dialog->vbox using the packing
options of your choice. The above code is just an
example.
Figure 2
shows a dialog from the Gnumeric spreadsheet, with its
components labelled.