I have main window with button “open file”. On clicking file selector dialog shows up and then file is loaded. I would like to show progress dialog while loading the data. However when I call Run
dlg.Run();
load_data(); // not executed
the execution stops there (I have to close the dialog to load the data), if I call Show
dlg.Show();
load_data();
then loading is done, but the dialog does not show up.
So, how to show modal, progress dialog and in meantime load the data?
Note: this question is only about showing the progress dialog, NOT updating the progressbar widget.
Ok, I asked on gtk# mono newsgroup and thanks to Chris Howie I finally managed to accomplish the task.
In short — because maybe someone will also fall into this:
Because the dialog is modal you don’t even have to worry about waiting for the task to complete — it is already done by Gtk#.