[wxPython] wxGrid edit invalid page fault

Hi all,

I searched the archives, and didn't find this, so...

On Windows 98, Python 2.0, wxPython 2.2.5, there is a bug when a cell
is edited that is in a row that can't be displayed completely.

If you size the grid's window so that it is slightly smaller than the
height of the current row, and then select and type into an editable
cell, you get a page fault:

PYTHON caused an invalid page fault in
module WX22_5.DLL at 015f:00ee40b5.

This occurs both in my program using wxGrid, and the demo grids that
I've experimented with. Try it on SimpleGrid, since one of the rows
is extra-tall, which makes this easy.

It also occurs if the wxGrid frame is sized so the last row can't
quite be displayed entirely. (For some reason, AutoSize() alone sizes
the wxGrid a little too small, while AutoSizeColumns(false) followed
by AutoSize() sizes it correctly).

Any suggestions for work-arounds? I'm working with two grids in a splitter
window, and the user might very well decide to size one of the windows
too small.

--Patricia

On Windows 98, Python 2.0, wxPython 2.2.5, there is a bug when a cell
is edited that is in a row that can't be displayed completely.

This has been fixed already. The CVS version will scroll the grid until the
full cell is visible when it gets selected.

···

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

On Windows 98, Python 2.0, wxPython 2.2.5, there is a bug when a cell
is edited that is in a row that can't be displayed completely.

This has been fixed already. The CVS version will scroll the grid
until the full cell is visible when it gets selected.

So will my version. But it crashes when the height of the display
area of the window is smaller than the cell height, so the whole cell
cannot be made visible. Just checking, but does that also work on the
CVS version?

--Patricia

I am not sure where to go to check and see if this error is already known,
but it
does appear in WinNT and python (2.1) and wxPython (2.2).

I have an app with a splitter window, with a left and right window. If I
partially cover
the app with some other app (doesn't matter what, but it's usually VIM for
me) and
then change focus by clicking on the exposed portion of the splitter window,
the panel
I clicked in will not refresh completely. The previously-covered part
remains background
grey. If I click in some other part of the window, refresh is fine.
Alt-Tab works fine.
It's only when changing focus by clicking.

I've not tried this out at home under Linux yet.

Tim

>> On Windows 98, Python 2.0, wxPython 2.2.5, there is a bug when a cell
>> is edited that is in a row that can't be displayed completely.
>>

> This has been fixed already. The CVS version will scroll the grid
> until the full cell is visible when it gets selected.

So will my version. But it crashes when the height of the display
area of the window is smaller than the cell height, so the whole cell
cannot be made visible. Just checking, but does that also work on the
CVS version?

Sorta. It just doesn't enable the editor. I was under the impression that
it fixed it better than that, but I haven't actually looked at the changes
to the source yet. Maybe there is more going on than that...

···

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

I have an app with a splitter window, with a left and right window. If I
partially cover
the app with some other app (doesn't matter what, but it's usually VIM for
me) and
then change focus by clicking on the exposed portion of the splitter

window,

the panel
I clicked in will not refresh completely. The previously-covered part
remains background
grey.

I've seen this before with wxNotebooks and for that case it made a
difference if I put a wxPanel under the window that I wanted to display.
For example, instead of

    wxNoebook --> MyWindow (derived from wxScrolledWinow)

I did this

    wxNOtebook --> wxPanel --> MyWindow

with the appropriate sizers or whatever so the panel would resize the
MyWindow to fill it. There is a bug report open about this if you want to
look for it and get more details.

I suspect that the same workaround will work with splitter windows too.

···

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