Re: message dialog?



On Thursday, July 10, 2003, at 09:29  AM, Bruno Boettcher wrote:

looking up the gtk docu (which BTW could take some serious lessons from, e.g. the java-docu..) i found a thing called GtkMessageDialog due to the lack of perl-gtk docu i wasn't able to build this up.... i tryed several ways and namings but this thing seems unknown in perl-gtk?
the object you want is Gtk2::MessageDialog.  the flags and constants  
appear as strings, and you can use either the full C name or the  
"nickname"; this is described in the Gtk2::api manpage.

does someone has an example script of that type of popup box?
the gtk-demo does it:

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/gtk2-perl/gtk2-perl-xs/ Gtk2/gtk-demo/dialog.pl?rev=1.3&content-type=text/vnd.viewcvs-markup
the old inline stuff has an example that should work in gtk2-perl-xs:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/gtk2-perl/gtk2-perl/ misc-examples/message-dialog.pl?rev=1.1&content-type=text/vnd.viewcvs- markup

looking through the (scarce) docu i found, there's an example script
using a Gnome::MessageBox to achieve this... first time i stumbled
accross this gnome:: stuff, what's that exactly? where do i find docus?
should i use that instead of gtk? what are the advantages/shortcomings?
gnome is the Gnu Network Object Model Environment, with an extensive  
webpage at http://gnome.org/ ...  the Gnome:: and Gnome2:: stuff is  
perl bindings to the gnome libraries for user interfaces, corba,  
application frameworks, what have you.  gnome is an added layer of  
dependency on Gtk.  Gtk is to Gnome as Qt is to KDE or (very roughly)  
the Win32 API is to MFC.
in gtk+ 2.x, a lot of the simpler aspects of the gnome ui libraries  
(like GnomeMessageBox and stock items) were moved into gtk itself (e.g.  
GtkMessageDialog and stock items).
whether you should use the Gnome perl modules to write your  
applications depends on a few things:  are you willing to require your   
users to have gnome installed to run your perl app in order to get some  
of the programmer creature-comforts it offers?  do you actually need  
any of the things that it offers?  many systems, in fact most linux  
distros, already have gnome installed, so it's not a problem; other  
systems, like win32, don't do so well with gnome.

and whilst i am at it.... my app builds up a gtk table. Each line has
several active fields (attached signal handlers...). On refreshes i
would like eventually to remove lines and shift up the rest... but as i
looked at it, it will be much simpler to destroy the whole thing, and
rebuild it, unless i overlooked something?
if the information is dynamic, why not use a GtkListStore and  
GtkTreeView?
for another program i have i thought of doing too a GUI, but there a
tabbed pane would be nice, does there such a widget allready exist ?
GtkNotebook is the tabbed thing you're thinking about.

why not have a look through the gtk tutorials on gtk.org? they're really informative for stuff like this.



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