Let's say I have a simple application such as the following:
import wx
app = wx.App()
frame = wx.Frame(None, -1, 'This is the frame title')
frame.Show()
frame.Maximize()
app.MainLoop()
Is there a method I can call on the frame to un-maximize it? I have tried frame.Unmaximize()
and frame.Maximize(False)
but the former is undefined
, while the latter seems to 'fail' silently in Ubuntu.
Here it says that Maximize(False)
is the way to go. Is there a bug I should submit, or is there something else I miss here?
Just tried this program under OSX, Win7 and Ubuntu:
import wx
app = wx.App()
frame = wx.Frame(None, -1, 'This is the frame title')
frame.Show()
frame.Maximize()
frame.Maximize(False)
app.MainLoop()
On OSX and Win7 the frame visibly maximises then minimises.
On Ubuntu (wxpython 2.8.11 gtk-unicode), the Maximise commands appear completely ignored. I can delete the Maximize(False) line and the frame still isn't maximised.
This is with xfwm4 on Ubuntu 11.10
Looks like a bug to me. But it may also be a window manager quirk.
Amusingly, google finds a bug report where Frame.Maximize() works only on windows. But it is 11 years old. Maybe Linux has not been added yet :)