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
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 534
Joined: Thu Jun 01, 2006 4:36 pm
Location: Right here!

centering wxbusyinfo on parent app rather than primary monitor

Post by Widgets »

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/11 64-bit & Mint 21.1
MSVC Express 2019/2022
wxWidgets 3.2.2
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: centering wxbusyinfo on parent app rather than primary monitor

Post by doublemax »

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
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 534
Joined: Thu Jun 01, 2006 4:36 pm
Location: Right here!

Re: centering wxbusyinfo on parent app rather than primary monitor

Post by Widgets »

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/11 64-bit & Mint 21.1
MSVC Express 2019/2022
wxWidgets 3.2.2
Post Reply