[wxPython-users] callback on wx.GridCellChoiseEditor
Bruno Normand
bruno.normand at gmail.com
Tue Jul 3 02:30:44 PDT 2007
thank you for the solution. It's good now.
2007/7/2, Robin Dunn <robin at alldunn.com>:
>
> Bruno Normand wrote:
> > Hi,
> > I use wx.grid.Grid with wxPython, in cell I have a
> wx.GridCellChoiseEditor.
> > I want to be able to control the selection made by the user, as I did
> > not find a callback being able to be associated the selection in the
> > combobox, I used the callback associated the change of the value in the
> > cell (wx.grid.EVT_GRID_CELL_CHANGE), which is active at the exit of the
> > cell and not when the user selected a value in the combobox posted by
> > GridCellChoiseEditor.
> > That goes as much as the seized value is valid and that I do not need
> > not modified; but if the value is invalid, I want to give the old value
> > and there begins the problem, the callback is automatically called as
> > soon as I carry out SetCellValue on the cell and as the posted value is
> > not that passed to SetCellValue but the value posted by the selection in
> > the combobox, I detect that the answer is invalid and impossible to
> > leave there.
> >
> > Would somebody have a solution to associate a callback during the
> > seizure in the combobox posted by wx.GridCellChoiseEditor ?
>
> You can get access to the actual control used by the editor in the
> EVT_GRID_EDITOR_CREATED event. In the handler just call
> event.GetControl() and then you can bind your own event handlers to it.
>
>
> --
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200707=
03/0ae4a1f7/attachment.htm
More information about the wxpython-users
mailing list