AUI / AGW pane | second monitor | maximize button by floating pane

Hello everyone.

I’m currently trying to implement an option for end users to use two monitors. Ideally, I’d like to use AUI or AGW panes for this. To demonstrate my wish, I tried to create a gif:

floatable_pane_4_second_monitor

The problem: When the panes float, the maximize/minimize buttons aren’t there. In the ‘AuiFloatingFrame’ class in the framemanager.py file (AGW), I was able to change wx.MiniFrame to wx.Frame (the changed code is further below). This seems to work. The documentation says that wx.MiniFrame is wx.Frame with a small title bar, but I need to know what I’m doing. So, my first question is: Am I allowed to make the changes? Could this cause problems? Keywords: stability, reliability…

My second concern is: I use a lot of widgets in my app. With the AGW Manager, I get black spots when I change the size of the main frame (as an end user, not in the code). In defense of AGW, I also get a few of these spots with LibreCalc, so it could also be due to my weak laptop. However, I don’t have that problem with the AUI. But I haven’t been able to hack the AUI-AuiFloatingFrame (or whatever) class in AUI. Hence the second question: Is there a way to add the standard buttons to the floating frame title bars in AUI or change the wx.MiniFrame to wx.Frame for floating panes?

I tried to get rid of the spots in AGW, but they’re in the demo example (AUI.py) too, when I add a few widgets, such as HTML2 WebView. So, I gave up sooner. Are there any measures that could minimize/solve the problem?

Back to the context of the question: Using a second monitor is a common practice. Did I miss a good approach? How did you solve the problem?

Many Thanks!

changed code:
class AuiFloatingFrame(wx.MiniFrame) → class AuiFloatingFrame(wx.Frame)

in init the style flags:
style=wx.DEFAULT_FRAME_STYLE | wx.CLIP_CHILDREN | wx.STAY_ON_TOP)

line 2732:
self._useNativeMiniframes = False → self._useNativeMiniframes = True

and line 2744
wx.MiniFrame.init(self, parent, id,…) → wx.Frame.init(self, parent, id,…)

my system:
Python 3.13.1 (tags/v3.13.1:0671451, Dec 3 2024, 19:06:28)
[MSC v.1942 64 bit (AMD64)]
wx.version: 4.2.3 msw (phoenix) wxWidgets 3.2.7

1 Like