Gtk.Dialog.Run Method
Waits for the Dialog.Response event or the Gtk.Dialog to be destroyed.

Syntax

public int Run ()

Returns

an object of type uint.

Remarks

Waits for the Dialog.Response event or the Gtk.Dialog to be destroyed. If the Gtk.Dialog is destroyed during the call to Dialog.Run(), Gtk.Dialog returns ResponseType.None. Otherwise, it returns the response ID from the Dialog.Response event. Before entering the recursive main loop, Dialog.Run() calls Widget.Show() on the Gtk.Dialog for you. Note that you still need to show any children of the Gtk.Dialog yourself.

During Dialog.Run(), the default behavior of Window.DeleteEvent is disabled; if the Gtk.Dialog receives Window.DeleteEvent, it will not be destroyed as usual, and Dialog.Run() will return ResponseType.DeleteEvent. Also, during Dialog.Run() the Gtk.Dialog will be modal. You can force Dialog.Run() to return at any time by calling Dialog.Respond to emit the Dialog.Response event. Destroying the Gtk.Dialog during Dialog.Run() is a very bad idea, because your post-run code will not know whether the Gtk.Dialog was destroyed or not.

After Dialog.Run() returns, you are responsible for hiding or destroying the Gtk.Dialog if you wish to do so.

Requirements

Namespace: Gtk
Assembly: gtk-sharp (in gtk-sharp.dll)