GridCustEditor.py and wxDialog

Hi

I took the GridCustEditor.py from the demo and put it
on a wxDialog instead of a wxFrame.

The problem is that I can not close and quit
the cell editor with a cr.

The messages I got: from the cell editor are

MyCellEditor ctor
MyCellEditor: IsAcceptedKey: 32
MyCellEditor: Create
MyCellEditor: SetSize (0, 16, 149, 16)

than nothing.

I suspect something wrong in

    def Create(self, parent, id, evtHandler):
        """
        Called to create the control, which must derive from wxControl.
        *Must Override*
        """
        print '::', parent
        print "MyCellEditor: Create"
        self._tc = wxTextCtrl(parent, id, "")
        self._tc.SetInsertionPoint(0)
        self.SetControl(self._tc)
        if evtHandler:
            self._tc.PushEventHandler(evtHandler)

but I'm not sure. I tried to add some

    wxGridCellEditor::HandleReturn

function. This does not help. The fct is not called at all.

I'am a little sad, because I succeed to manage a grid that
works with non-us kbds. Unfortunatelly, this is only
working in a wxFrame.

Idea?

Jean-Michel Fauth, Switzerland

Jean-Michel Fauth wrote:

Hi

I took the GridCustEditor.py from the demo and put it
on a wxDialog instead of a wxFrame.

The problem is that I can not close and quit
the cell editor with a cr.

The messages I got: from the cell editor are

MyCellEditor ctor
MyCellEditor: IsAcceptedKey: 32
MyCellEditor: Create
MyCellEditor: SetSize (0, 16, 149, 16)

than nothing.

The Dialog steals the ENTER and uses it for navigation. Does using the wxTE_PROCESS_ENTER style for the text ctrl help?

···

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