Forbid multi-row-select on wx.Grid

Hi

I would like to have a grid in which one could select only 1 row at a time. I don't know how to prevent a user from selecting more than one row.

One can say, that he wishes to go for either: cell-, column- or row-selection-mode (SetSelectionMode). Why isn't it possible to state, whether the grid is in: single- or multi-select-mode?

I looked here:

http://wiki.wxpython.org/index.cgi/wxGrid

And could imagine that there is some arcane way using the grid-range-select event after the user has selected a bunch of rows, but I would like to prevent this from the beginning.

Any simple proposals how to achive my single-row-selecting-grid?

Thanks in advance,
Marco

There's no simple way. You have to modify the underlying C++ class to
be able to implement it. I've got a patch on SF that does it, but it
needed (needs?) more testing before it gets accepted. Maybe you could
help out :wink:

···

On Wed, 18 Aug 2004 15:08:04 +0200, Marco Aschwanden <ppntwimbxffc@spammotel.com> wrote:

Hi

I would like to have a grid in which one could select only 1 row at a
time. I don't know how to prevent a user from selecting more than one row.

One can say, that he wishes to go for either: cell-, column- or
row-selection-mode (SetSelectionMode). Why isn't it possible to state,
whether the grid is in: single- or multi-select-mode?

I looked here:

http://wiki.wxpython.org/index.cgi/wxGrid

And could imagine that there is some arcane way using the
grid-range-select event after the user has selected a bunch of rows, but I
would like to prevent this from the beginning.

Any simple proposals how to achive my single-row-selecting-grid?

Thanks in advance,
Marco

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Sure. I am good at cheering. 8o)

···

On Wed, 18 Aug 2004 22:55:32 -0500, Chris Mellon <arkanes@gmail.com> wrote:

There's no simple way. You have to modify the underlying C++ class to
be able to implement it. I've got a patch on SF that does it, but it
needed (needs?) more testing before it gets accepted. Maybe you could
help out :wink:

Hello

I'm caught in an import cycle and I don't know how to solve it. Does anyone have a miracle recipe ?

Thomas Zuliani

File "wsmain.py", line 12 in ?
   import WSFrame
File "wsframe.py", line 12 in ?
   import WSServicePanel
File "wsservicepanel.py", line 12 in ?
   import WSTree
File "wstree.py", line 11 in ?
   import WSForms
File "wsforms.py", line 15 in ?
   import WSInvoke
File "wsinvoke.py", line 13 in ?
   import WSInvokeForm
File "wsinvokeform.py", line 22 in ?
   class InvokeForm(WSForms.BasicForm): AttributeError: 'module' object has no attribute 'BasicForm'