On Mon, 2003-01-27 at 12:54, Germano Rizzo wrote:
> Hi!
> what's the right way to make a GtkMessageDialog with two buttons, say Ok
> and Cancel? I can't even get to make one with only Ok!
>
> ok=gtk.MessageDialog(self.win, gtk.DIALOG_MODAL, gtk.MESSAGE_INFO, 1, "Very
> good!")
Don't confuse gtk.MessageDialog with gtk.Dialog. Try this:
dialog = gtk.MessageDialog(
parent = self.parent
flags = gtk.DIALOG_DESTROY_WITH_PARENT,
type = gtk.MESSAGE_INFO,
buttons = gtk.BUTTONS_OK,
message_format = "Very good!")
>
> this for some reason work. I think I have to substitute a tuple to "1", with
> the couples button/response code, but... how? I tried in every way, but I
> only get errors. What are the right constants to use?
>
> BTW, where can I get a list of all the "constants" (I know they aren't
> really) defined in gtk, gdk, pango etc?
Try this:
$ python
>>> import gtk
>>> help(gtk)
>
> Thanks, sorry if this is a trivial question, but I can't find any
> documentation anywhere...
> Mano :)
>
> _______________________________________________
> pygtk mailing list [EMAIL PROTECTED]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
--
Gustavo Jo�o Alves Marques Carneiro
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/