[Gtk-sharp-list] Make Run() of a Dialog return imediately
Adam Tauno Williams
adam at morrison-ind.com
Wed Apr 30 10:22:37 EDT 2008
> What I would like to do is to display some sort of Dialog on the screen
> the displays a status message (like "Please wait"), then do some stuff and
> destroy the Dialog afterwards. The ideal soulution from my perspective
> would be somethin like
> Dialog d= new Dialog(...);
> d.Run();
> foo();
> d.Destroy();
Why not just
d.Present() or d.Show()
...
d.Destroy()
You don't have to Run() a dialog, you can treat it like a normal window.
I do this all the time, like...
dialog = new ExecutantSearchDialog(
this,
task.ObjectId,
string.Format("Executant for Task#{0}", task.ObjectId));
dialog.SetExecutantId += new
ExecutantSearchDialog.SetExecutantIdHandler(OnSetExecutant);
dialog.ShowAll();
Very useful when you need more back from the dialog than just a result
code.
More information about the Gtk-sharp-list
mailing list