Move Dialog or Frame on second monitor.

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
User avatar
rocrail
Super wx Problem Solver
Super wx Problem Solver
Posts: 299
Joined: Fri Oct 02, 2009 2:02 pm
Contact:

Move Dialog or Frame on second monitor.

Post by rocrail »

Hi,

I'm experimenting with a second Monitor which increases the Desktop.
My application saves Dialog and Frame positions, en move them to the previous position after restart.
This works perfectly with AUI and Frames, but Dialogs always appear on the same monitor as the application.

wxDialog and wxFrame are both derived from wxTopLevelWindow.
But why this different behaviour?
Best regards,
Rob.
https://wiki.rocrail.net
User avatar
doublemax
Moderator
Moderator
Posts: 19159
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Move Dialog or Frame on second monitor.

Post by doublemax »

Does this happen on all platforms?

Do you pass a parent when creating the dialogs?
Use the source, Luke!
User avatar
rocrail
Super wx Problem Solver
Super wx Problem Solver
Posts: 299
Joined: Fri Oct 02, 2009 2:02 pm
Contact:

Re: Move Dialog or Frame on second monitor.

Post by rocrail »

Hi,

I'm developing under macOS 10.14 with wxWidget 3.1.3 (git master).

Yes, the Dialogs become in the constructor the parent.

Its no big deal to swap wxDialog to wxFrame for those few concerning Dialogs. In fact I already did. ;)
Best regards,
Rob.
https://wiki.rocrail.net
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7477
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Move Dialog or Frame on second monitor.

Post by ONEEYEMAN »

Hi,
What happens if you pass NULL as a parent to dialog constructor?

Thank you.
Post Reply