Non modal dialog : how?
- From: Yannick <ybarbeaux gmail com>
- To: gtkmm-list gnome org
- Subject: Non modal dialog : how?
- Date: Tue, 7 May 2013 14:14:21 +0000 (UTC)
Hello all,
I have been looking for a solution for many days but I am really stuck with
this very simple issue:
I want to display a MessageDialog saying only "Please wait" (no button)
while executing another command then automatically destroy this dialog when
the command has finished:
basically:
1-create and show messageDialog
2-do something else
3-hide or destroy messageDialog
Thus I want this MessageDialog NOT to be modal (otherwise it won't reach the
"do something else" before being closed).
The problem I face is the following:
- if I use waitingDialog->run(); then the dialog is modal (even if I set the
bool modal=false; at creation of the dialog)
- if I use waitingDialog->show() or showall(); then the dialog appears but
it is ALL BLANK, without any widget (the text I defined at creation of the
dialog or using the setMessage function does not appear). How strange!
I tried to call show() on the Box content_area of the dialog but that does
not work either.
Strangely, I cannot find much information about non modal dialogs on the web.
Any help would be greatly appreciated. Thanks!
Yannick.
here is the code with everything I tried, unsuccessfully:
Gtk::MessageDialog *waitingDialog = new Gtk::MessageDialog(*this, "Please
wait", false, Gtk::MESSAGE_INFO, Gtk::BUTTONS_NONE, false);
Gtk::Box *contentDialog = waitingDialog->get_content_area();
contentDialog->show_all();
waitingDialog->set_message("Please wait")
waitingDialog->activate();
waitingDialog->show();
waitingDialog->show_all();
waitingDialog->present();
//waitingDialog->run(); --> only for MODAL dialog (I think...)
doSomethingElse();
waitingDialog->hide();
delete(waitingDialog);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]