Selection behaviour of wx.grid

Hi,

I've noticed a couple of situations where I find the behaviour of
wx.grid counter-intuitive, and I thought I'd bring them to the attention
of the list to see what others thought. All to do with selecting groups
of rows, columns, or cells. (This is with wxPython version 2.8.1.1,
with gtk2-2.2.4 RPM on Suse.)

Example code for this:

import wx
import wx.grid

class MainFrame(wx.Frame):
    def __init__(self, parent, id):
        wx.Frame.__init__(self, parent, id, 'Grid', None, (800, 60))
        self.grd = wx.grid.Grid(self, -1)
        self.grd.CreateGrid(20, 8)

class FooApp(wx.PySimpleApp):
    def OnInit(self):
        frame = MainFrame(None, -1)
        frame.Show()
        return True

app = FooApp(0)
app.MainLoop()

Behaviour when selecting whole rows:

Start program. Cell A1 is the active cell. Left-click on the label for
row 20. Shift-left-click on the label for row 10. The result is that
rows 1--10 and 20 are selected. I was expecting rows 10--20 to be
selected. Same kind of thing for columns.

Start program. Left-click-and-hold in label for row 1. (Row 1 becomes
selected.) QUICKLY move the mouse straight down, aiming for the label
for row 20. Some subset of rows 1--20 will become selected, depending
on how quickly you moved the mouse, how busy the system is, etc. I was
expecting rows 1--20 to be selected. Again, same kind of thing for
columns.

Selecting regions of cells:

If you click-hold in cell A18, then quickly move down to beyond cell
A20, the behaviour is usually correct. If you're very quick you can
sometimes trigger similar behaviour as for rows/columns though. Quite
often cell A20 is left unselected, less often, A19 too. Sometimes, only
A20 gets selected; sometimes, no cells get selected.

Control-clicking to select non-contiguous regions of cells:

Start program. Click in cell B2. Shift-click in cell D5. A 4-row by
3-col block is selected, as expected. Control-click-and-hold in the
middle of cell C3. Cell C3 is deselected. Move (while holding) towards
the right edge of cell C3. At some point, cell C3 selects again. I
think the reason is that you can't control-drag out a region to toggle
its selected-ness --- only to select it.

Control-shift-clicking doesn't behave as I would expect: Click in C3.
Shift-click in D4. Control-click in B2. If you shift-click in A1, you
get the 3x3 A1--C3 region. If you control-shift-click in A1, you get
the union of the 3x3 A1--C3 region and the 2x2 C3--D4 region. You can't
get the union of the 2x2 region A1--B2 and the 2x2 C3--D4 region.
(Well, you can control-drag B2--A1 but you can't by clicking alone.)

In general, I think shift-click should extend the selection by the
region between the last clicks, not the click just done and the location
of the active cell. This would apply to row/column selection and cell
region selection. Don't know whether others would prefer this
behaviour.

Ben.