[wxPython] Window Resize wxMDIChildFrame

I am having problems preventing the resize on a wxMDIChildFrame with Windows 2000.

I searched through the archive and have tried multiple combinations of ~wxTHICK_FRAME and ~wxRESIZE_BORDER but I can still resize the window

with the mouse.

Is there something else when using wxMDI frames?

  • Michael
···

I am having problems preventing the resize on a wxMDIChildFrame
with Windows 2000.

I searched through the archive and have tried multiple combinations
of ~wxTHICK_FRAME and ~wxRESIZE_BORDER but I can still resize the
window with the mouse.

Is there something else when using wxMDI frames?

See http://lists.wxwindows.org/pipermail/wxpython-users/2001-May/005467.html
and the reply. You could also try SetSizeHints.

···

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

> I am having problems preventing the resize on a wxMDIChildFrame
> with Windows 2000.
>
> I searched through the archive and have tried multiple combinations
> of ~wxTHICK_FRAME and ~wxRESIZE_BORDER but I can still resize the
> window with the mouse.
>
> Is there something else when using wxMDI frames?

See

http://lists.wxwindows.org/pipermail/wxpython-users/2001-May/005467.html

and the reply. You could also try SetSizeHints.

I have tried everything and I still get a default frame.

Here is how I initialize the frame after receiving your response.

class EntryFrame(wxMDIChildFrame):
    def __init__(self, parent, title):
        wxMDIChildFrame.__init__(self, parent, -1, title, wxDefaultPosition,
wxSize(600, 300), style=wxCAPTION)
        self.SetSizeHints(600, 300, 600, 300, 0, 0)

It doesn't matter which combination I used for the style, the only ones
which appear to work are
wxMAXIMIZE and wxICONIZE. Specifying wxDEFAULT_FRAME_STYLE | ~THICK_FRAME
causes
the window to iconize but still allows for resizing.

Any other thaughts?

Thanks - Michael

It doesn't matter which combination I used for the style, the only ones
which appear to work are
wxMAXIMIZE and wxICONIZE. Specifying wxDEFAULT_FRAME_STYLE | ~THICK_FRAME
causes
the window to iconize but still allows for resizing.

Any other thaughts?

Platform?

An ugly solution would be to catch EVT_SIZE and if the new size is not what
you want then reset the size.

You should probably enter a bug report about it since SetSizeHints really
should work.

···

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

>
> It doesn't matter which combination I used for the style, the only ones
> which appear to work are
> wxMAXIMIZE and wxICONIZE. Specifying wxDEFAULT_FRAME_STYLE |

~THICK_FRAME

> causes
> the window to iconize but still allows for resizing.
>
> Any other thaughts?

Platform?

Windows 2000.

An ugly solution would be to catch EVT_SIZE and if the new size is not

what

you want then reset the size.

I was afraid of that.

You should probably enter a bug report about it since SetSizeHints really
should work.

Okay.

Thanks.

>
> Platform?
>

Windows 2000.

That's what I've got too and just wxCAPTION worked for me. Could be some
change in the 2.3 branch that makes that possible, if so then there is good
new for you in the upcoming release. :wink:

···

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