[Gtk-sharp-list] How to show dialog modal and wait for it?

Maciej Pilichowski bluedzins at wp.pl
Fri Dec 25 04:20:05 EST 2009


> I think that you're missing a call to hide the dialog window. If
> you insert a md.Hide (); statement after the md.Run (); line
> everything should work fine.
> If it still doesn't work out: What is the Gtk.Response type
> returned by "(Gtk.ResponseType) dialog.Run ();"? Does the whole
> thing work if you use "null" as the parent window (first argument
> to constructor)?

Neither Hide or passing null changes anything. The result is -7.

Maybe I rephrase my wish to be more precise -- when I call modal 
dialog I would like the events in main dialog won't be run in 
parallel. Because some events in main dialog cause the modal dialog 
to show up, and if they are run in parallel I end up with several 
error dialog boxes informing user that (for example) loading of data 
were not successful.


More information about the Gtk-sharp-list mailing list