Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Gtk+/Gnome Application Development
Prev Home Next

Filling in the Dialog

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.

Figure 2. A GnomeDialog from the Gnumeric spreadsheet

Gtk+/Gnome Application Development
Prev Home Next

 
 
  Published under free license. Design by Interspire