simple wxgrid question

If I click in a grid cell, by default the content of the cell is
selected. What is the best way to turn this off? Overriding the event
handler of left click or getattr?

Stani

SPE Stani's Python Editor wrote:

If I click in a grid cell, by default the content of the cell is
selected. What is the best way to turn this off? Overriding the event
handler of left click or getattr?

I think I would do it by catching the EVT_GRID_EDITOR_CREATED event, and then doing something like evt.GetControl().SetInsertionPointEnd() in the handler. (NOTE: you may need to use wx.CallAfter to make sure that the code that selects the text has already been run by the time that SetInsertionPointEnd is called. Also, you may need to make sure that the editor is a wx.TextCtrl first.)

ยทยทยท

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