[wxPython-users] Forced endedit on a custom cell editor
Simen Haugen
Simen at nordicstats.com
Thu Jun 1 05:25:34 PDT 2006
Thanks a lot. It works well!
I call disablecelleditcontrol at the end of beginedit, and
enablecelleditcontrol in the beginning of endedit.
The same works well for my time celleditor that uses a timectrl as
editing (I had to catch enter and escape myself and had problems calling
endedit here too, but now that works too).
Thanks again.
-----Original Message-----
From: Robin Dunn [mailto:robin at alldunn.com]
Sent: 31. mai 2006 21:52
To: wxPython-users at lists.wxwidgets.org
Subject: Re: [wxPython-users] Forced endedit on a custom cell editor
Simen Haugen wrote:
> Hi.
>
>
>
> I have a custom cell editor that shows a date and time picking dialog
> when you edit it, but I have one problem:
>
> Endedit is not called until the cell looses focus, but I want it to be
> called when the dialog returns.
>
> I've tried to explicit call endedit after the dialog returns, but that
> does not work either.
Try calling grid.DisableCellEditControl()
>
> It's pretty annoying, since after you have created began editing, it
> will not refresh the view until you loose focus. It will also open my
> dialog every time I resize the cell.
Which cell editor callback are you launching the dialog from?
> The celleditor also requires a control to be set for it. I have a hack
> like self.SetControl(wx.Control(wx.Frame(None)))
At a minimum you want the parent to be the grid.GetGridWindow()
otherwise you are going to be creating a new frame every time you edit
the cell, and the frames will never be destroyed...
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
More information about the wxpython-users
mailing list