Multiple wxFrames and modal wxDialog issue
-
- Earned some good credits
- Posts: 125
- Joined: Wed Mar 05, 2008 3:30 pm
Multiple wxFrames and modal wxDialog issue
Hi,
I have a main wxFrame started in wxApp. Then I have functions that create additional wxFrame(s) with NULL parent, by user intervention. The problem is that, if I run a modal wxDialog with any wxFrame as a parent, then all wxFrames created so far are blocked-disabled. Frames that are created after the creation and during the life of the modal dialog are not blocked.
I would like a modal dialog that will block only it's parent which will be a particular wxFrame, and not all other wxFrames.
Thanks for the input.
Chris
I have a main wxFrame started in wxApp. Then I have functions that create additional wxFrame(s) with NULL parent, by user intervention. The problem is that, if I run a modal wxDialog with any wxFrame as a parent, then all wxFrames created so far are blocked-disabled. Frames that are created after the creation and during the life of the modal dialog are not blocked.
I would like a modal dialog that will block only it's parent which will be a particular wxFrame, and not all other wxFrames.
Thanks for the input.
Chris
Unfortunately, that's not the definition of a modal-dialog; the bug is probably that windows created after the modal dialog are clickable. I do not have any direct solution since I do not know what kind of app you are making; I however can't help but wonder howcome you need that many windows (i.e. you may need to describe what you're doing to get alternative suggestions)
No, that's only wx's defnition of Modal.
In WinAPI and other toolkits I used before, modal has the normal meaning: Modal to it's parent.
But wx is doing some stange stuff, so sadly, this is how it "works" in wx.
In my book, this is a bug in wx, because when all others doing it right, and your the only one who's doing it wrong, the bug is clearly on your side.
In WinAPI and other toolkits I used before, modal has the normal meaning: Modal to it's parent.
But wx is doing some stange stuff, so sadly, this is how it "works" in wx.
In my book, this is a bug in wx, because when all others doing it right, and your the only one who's doing it wrong, the bug is clearly on your side.
-
- Earned some good credits
- Posts: 125
- Joined: Wed Mar 05, 2008 3:30 pm
I'm making instant messenger like program. I need each conversation in a separate frame. If the user has modal dialog open in the main frame, I need all other frames enabled not disabled.
The scenario I get now:
As soon as the modal dialog is shown, all frames created till then are blocked. If, let's say there is an incoming message for a new conversation while the modal dialog is running, the new conversation frame is created and runs in non-blocking mode.
The scenario I need:
Modal dialog to block only it's parent, not all other frames.
Chris
The scenario I get now:
As soon as the modal dialog is shown, all frames created till then are blocked. If, let's say there is an incoming message for a new conversation while the modal dialog is running, the new conversation frame is created and runs in non-blocking mode.
The scenario I need:
Modal dialog to block only it's parent, not all other frames.
Chris
-
- Earned some good credits
- Posts: 125
- Joined: Wed Mar 05, 2008 3:30 pm
-
- Earned some good credits
- Posts: 125
- Joined: Wed Mar 05, 2008 3:30 pm
In this kind of application there are a lot of relations between the application and it's frames, so running another instance will not do the trick.moraldi wrote:Until then and assuming that each conversation requires the same functionality by the application, you could create a new application instance for every conversationI just got reply from one of the wxWidgets developers that this feature is planed for the next release.
I would probably wait for a while for the new release or make modeless dialog and disable/enable the main frame manually.
Chris
- evstevemd
- Part Of The Furniture
- Posts: 2293
- Joined: Wed Jan 28, 2009 11:57 am
- Location: United Republic of Tanzania
- Contact:
You can well add dialogs instead of wxframe and add horizontal sizer to mimic the Toolbar or just add Pop up menu!chris_bern wrote:In this kind of application there are a lot of relations between the application and it's frames, so running another instance will not do the trick.moraldi wrote:Until then and assuming that each conversation requires the same functionality by the application, you could create a new application instance for every conversationI just got reply from one of the wxWidgets developers that this feature is planed for the next release.
I would probably wait for a while for the new release or make modeless dialog and disable/enable the main frame manually.
Chris
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 19.04/Windows 10 Pro/MacOS 10.13 - GCC/MinGW/Clang, CodeLite IDE]
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 19.04/Windows 10 Pro/MacOS 10.13 - GCC/MinGW/Clang, CodeLite IDE]