centering wxbusyinfo on parent app rather than primary monitor Topic is solved

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
Widgets
Super wx Problem Solver
Super wx Problem Solver
Posts: 349
Joined: Thu Jun 01, 2006 4:36 pm
Location: Right here!

centering wxbusyinfo on parent app rather than primary monitor

Post by Widgets » Tue May 21, 2019 4:15 pm

In a multi-monitor environment, with an app displayed on a non-primary monitor, I would like to have the wxBusyInfo window centered on the app's parent frame, rather than the default position, which seems to be the primary monitor.
Will I have to 'build' my own version or is there a way to do so with the stock wxBusyInfo?
Environment: Win 10 64-bit & Ubuntu 16.04
MSVC Express 2010, 2015, 2017
wxWidgets 3.1
Fight SPAM - report it with wxSR

User avatar
doublemax
Moderator
Moderator
Posts: 14080
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: centering wxbusyinfo on parent app rather than primary monitor

Post by doublemax » Tue May 21, 2019 5:28 pm

Do you pass the app window as parent for wxBusyInfo? It should center on that window. If it doesn't it could be considered a bug and it might be worth opening a ticket at http://trac.wxwidgets.org
Use the source, Luke!

Widgets
Super wx Problem Solver
Super wx Problem Solver
Posts: 349
Joined: Thu Jun 01, 2006 4:36 pm
Location: Right here!

Re: centering wxbusyinfo on parent app rather than primary monitor

Post by Widgets » Tue May 21, 2019 6:59 pm

After a bit more experimenting and reading the docs with my problem in mind, it seems I need to use the ctor
wxBusyInfo ( "string", this );
explicitly stating the app as the parent.
Perhaps the better way would be to make the parent the default, rather than the desktop
Environment: Win 10 64-bit & Ubuntu 16.04
MSVC Express 2010, 2015, 2017
wxWidgets 3.1
Fight SPAM - report it with wxSR

Post Reply