Frame Styles wx.MAXIMIZE and py2exe

Is there a known problem/issue with the frame styles and using py2exe for distribution ??

When I run my program with in my development environment, I can place the style wx.MAXIMIZE in my style parameter of my mainframe and when the windows opens, it is opened MAXIMIZED as expected (eg style = wx.DEFAULT_FRAME_STYLE | wx.MAXIMIZE)

If I take the exact same program and create the distribution version using py2exe, the frame opens with dimensions of (400,250). All of the controls are created and populated, the user just has to maximize the window to display.

In other words, the wx.MAXIMIZED style setting is lost, and the frame opens as just the wx.DEFAULT_FRAME_STYLE with what I assume are the minimum windows size settings.

The workaround was to get the screen dimensions from wx.SystemSettings.GetMetrics and then just explicitly set the screen size. But am I missing something on why the the wx.MAXIMIZE flag gets dropped in a py2exe distribution ?

Specs:

Python 2.4.3, wxPython 2.6.3., winXP SP2

Hi Geoff,

Geoff Skerrett wrote:

Is there a known problem/issue with the frame styles and using py2exe for distribution ??
When I run my program with in my development environment, I can place the style wx.MAXIMIZE in my style parameter of my mainframe and when the windows opens, it is opened MAXIMIZED as expected (eg style = wx.DEFAULT_FRAME_STYLE | wx.MAXIMIZE)
If I take the exact same program and create the distribution version using py2exe, the frame opens with dimensions of (400,250). All of the controls are created and populated, the user just has to maximize the window to display.
In other words, the wx.MAXIMIZED style setting is lost, and the frame opens as just the wx.DEFAULT_FRAME_STYLE with what I assume are the minimum windows size settings.
The workaround was to get the screen dimensions from wx.SystemSettings.GetMetrics and then just explicitly set the screen size. But am I missing something on why the the wx.MAXIMIZE flag gets dropped in a py2exe distribution ?
Specs:
Python 2.4.3, wxPython 2.6.3., winXP SP2

I don't recall why (it could be for this reason) but I just do:
        self.Maximize()

Werner

···

Geoff Skerrett wrote:

In other words, the wx.MAXIMIZED style setting is lost, and the frame opens as just the wx.DEFAULT_FRAME_STYLE with what I assume are the minimum windows size settings.

On Windows there is a setting someplace that controls how the the first frame is shown, minimized, maximized, or normal. It used to be something that you could set in the shortcut, but I don't see it there now. I'm not sure why it doesn't have the same problem when run from Python, but it's easy to work around (just call Maximize yourself) so I've never really worried about it.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Robin Dunn wrote:

Geoff Skerrett wrote:

In other words, the wx.MAXIMIZED style setting is lost, and the frame opens as just the wx.DEFAULT_FRAME_STYLE with what I assume are the minimum windows size settings.

On Windows there is a setting someplace that controls how the the first frame is shown, minimized, maximized, or normal. It used to be something that you could set in the shortcut, but I don't see it there now.

It is in Properties/Short Cut/Run, mine are all set to "Normal Window", but one could set it to Maximize or Minimize.

Werner

···

  I'm not sure why it doesn't have the same problem when run from Python, but it's easy to work around (just call Maximize yourself) so I've never really worried about it.