differerent behaviour on Linux and Windows

I have been developing my application on a Linux system. I decided to
take a look at the application under Windows. Much to my chagrin, the
application is pretty much broken under Windows. My version information
for both Linux and Windows is:

      * Python-2.6.2
      * wxPython-2.8.10.1

There are several issues but the biggest one is that one of the frames
has all of the widgets in the upper left corner when run under Windows.
I am attaching a sample app that demonstrates the problem. It looks fine
under Linux but not under Windows. I hope it is something simple but it
is not obvious to me at this time.

Thanks.

details.py (2.86 KB)

···

--
Glenn Johnson <glennpj@gmail.com>

Whenever things are scrunched in the upper left hand corner, try manually
resizing your frame and see if it fixes it. If so, add .Layout. In your code,
put self.panel.Layout at this point:

    self.panel.SetSizer(sizer)
    self.panel.Layout()
    self.Bind(wx.EVT_BUTTON, self.OnClose, self.close_btn)

and it fixes it. Not sure why Linux doesn’t require this or Win does. Simple,

though.

Is there anything else wrong with it?

Che

···

On Sat, Jul 25, 2009 at 6:40 PM, Glenn Johnson glennpj@gmail.com wrote:

I have been developing my application on a Linux system. I decided to

take a look at the application under Windows. Much to my chagrin, the

application is pretty much broken under Windows. My version information

for both Linux and Windows is:

  * Python-2.6.2

  * wxPython-2.8.10.1

There are several issues but the biggest one is that one of the frames

has all of the widgets in the upper left corner when run under Windows.

I am attaching a sample app that demonstrates the problem. It looks fine

under Linux but not under Windows. I hope it is something simple but it

is not obvious to me at this time.

I have been developing my application on a Linux system. I decided to
take a look at the application under Windows. Much to my chagrin, the
application is pretty much broken under Windows. My version information
for both Linux and Windows is:

 \* Python\-2\.6\.2
 \* wxPython\-2\.8\.10\.1

There are several issues but the biggest one is that one of the frames
has all of the widgets in the upper left corner when run under Windows.
I am attaching a sample app that demonstrates the problem. It looks fine
under Linux but not under Windows. I hope it is something simple but it
is not obvious to me at this time.

Whenever things are scrunched in the upper left hand corner, try manually
resizing your frame and see if it fixes it. If so, add .Layout. In your
code,
put self.panel.Layout at this point:

    self\.panel\.SetSizer\(sizer\)
    self\.panel\.Layout\(\)
    self\.Bind\(wx\.EVT\_BUTTON, self\.OnClose, self\.close\_btn\)

and it fixes it. Not sure why Linux doesn't require this or Win does.
Simple,
though.

That was it.

Is there anything else wrong with it?

There are a few other minor things but I will see if I can work my way
through them.

Thanks.

···

On Sat, Jul 25, 2009 at 6:16 PM, C M<cmpython@gmail.com> wrote:

On Sat, Jul 25, 2009 at 6:40 PM, Glenn Johnson <glennpj@gmail.com> wrote:

Sometimes a difference in behaviour reflects a difference in the OS
but usually it is something I have done wrong that one OS is
"forgiving" of and the other isn't. So solving the problem for the
"bad" OS makes the code more robust and future proofed. Not that it
feels very good to see an app you have working nicely on your
development OS fall apart when you try it on another.

···

On Jul 26, 2:08 pm, Glenn Johnson <glen...@gmail.com> wrote:

On Sat, Jul 25, 2009 at 6:16 PM, C M<cmpyt...@gmail.com> wrote:

> On Sat, Jul 25, 2009 at 6:40 PM, Glenn Johnson <glen...@gmail.com> wrote:

>> I have been developing my application on a Linux system. I decided to
>> take a look at the application under Windows. Much to my chagrin, the
>> application is pretty much broken under Windows. My version information
>> for both Linux and Windows is:

>> * Python-2.6.2
>> * wxPython-2.8.10.1

>> There are several issues but the biggest one is that one of the frames
>> has all of the widgets in the upper left corner when run under Windows.
>> I am attaching a sample app that demonstrates the problem. It looks fine
>> under Linux but not under Windows. I hope it is something simple but it
>> is not obvious to me at this time.

> Whenever things are scrunched in the upper left hand corner, try manually
> resizing your frame and see if it fixes it. If so, add .Layout. In your
> code,
> put self.panel.Layout at this point:

> self.panel.SetSizer(sizer)
> self.panel.Layout()
> self.Bind(wx.EVT_BUTTON, self.OnClose, self.close_btn)

> and it fixes it. Not sure why Linux doesn't require this or Win does.
> Simple,
> though.

That was it.

> Is there anything else wrong with it?

There are a few other minor things but I will see if I can work my way
through them.

Thanks.