[wxPython] My first problem with wxPython 2.3

Hi Robin and Everybody...

Using Win98, wxPython 2.3 - hybrid.

I have a very complex dialog layout using sizers, wxHtmlWindow, wxButtons
and wxGrid.
The size of the dialog is determined for the size of the widgets inside it.
But when I increase the size of my wxGrid over some limit, the dialog don't
increases the same
way and some button can't be seen on the dialog.

This worked well with 2.2.5

I send you an example of my code that shows the layout of the dialog and the
problem.

If you change the line 177 from:

        self.list = TranfeGrid(self,self.ta_lista,self.tc_lista,(550,200))

to:
        self.list = TranfeGrid(self,self.ta_lista,self.tc_lista,(550,250))

the buttons at the bottom disapear.

Thanks
Cristian Echeverria

<<DemoCode.py>>

DemoCode.py (8.87 KB)

Whoa, I wanted to look at that, but as an attachment, it came through
with all kinds of weird characters. Maybe you could just cut and
paste it?

···

I have a very complex dialog layout using sizers,
wxHtmlWindow, wxButtons and wxGrid. The size of the dialog
is determined for the size of the widgets inside it. But
when I increase the size of my wxGrid over some limit, the
dialog don't increases the same way and some button can't be
seen on the dialog.

I have a very complex dialog layout using sizers, wxHtmlWindow, wxButtons
and wxGrid.
The size of the dialog is determined for the size of the widgets inside

it.

But when I increase the size of my wxGrid over some limit, the dialog

don't

increases the same
way and some button can't be seen on the dialog.

There was a change to sizer.Fit that if the window passed is a top level
window, it won't be resized beyond 90% of the available space on the screen.
(I had thought the limit was going to be the screen size, but the person who
did it chose 90% instead...)

If you don't like the 90% restriction you can work around it by calling this
instead of box.Fit and box.SetSizeHints:

    self.SetClientSize(box.GetMinSize())

···

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

If you don't like the 90% restriction you can work around it by calling

this

instead of box.Fit and box.SetSizeHints:

    self.SetClientSize(box.GetMinSize())

I should have mentioned that with this you risk overflowing the screen
again. If you want to take that into account then you can use
wxGetDisplaySize and/or wxGetClientDisplayRect and adjust the size of the
dialog yourself so that it fits in the screen better than only 90%. (And if
you really don't like it then you can complain with a Bug Report :wink:

···

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