In a grid, when I press a key in a cell I can't catch the KeyEvent.
Where are this events going?
Thanks.
Jorge Hojyo
In a grid, when I press a key in a cell I can't catch the KeyEvent.
Where are this events going?
Thanks.
Jorge Hojyo
Jorge Hojyo wrote:
In a grid, when I press a key in a cell I can't catch the KeyEvent.
Where are this events going?
If there is a cell editor control active then it gets the events. If not then which event component window of the wxGrid that has the focus and then it passes it (via ProcessEvent) to the wxGrid for processing.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
Robin Dunn wrote:
Jorge Hojyo wrote:
In a grid, when I press a key in a cell I can't catch the KeyEvent.
Where are this events going?
If there is a cell editor control active then it gets the events. If not then which event component window of the wxGrid that has the focus and then it passes it (via ProcessEvent) to the wxGrid for processing.
There is a cell text editor control active, I want to do some processing right after the user enters a character. I can detect the OnEnter event on the grid but no OnChar event. I supose I need to detect the OnChar event on the cell editor control. Am I right?, How is this done?
Thanks.
Jorge
Jorge Hojyo wrote:
Robin Dunn wrote:
Jorge Hojyo wrote:
In a grid, when I press a key in a cell I can't catch the KeyEvent.
Where are this events going?
If there is a cell editor control active then it gets the events. If not then which event component window of the wxGrid that has the focus and then it passes it (via ProcessEvent) to the wxGrid for processing.
There is a cell text editor control active, I want to do some processing right after the user enters a character. I can detect the OnEnter event on the grid but no OnChar event. I supose I need to detect the OnChar event on the cell editor control. Am I right?, How is this done?
You can use the EVT_GRID_EDITOR_CREATED event to get notified when a new cell editor is created, and then use event.GetControl() to get a reference to the control itself. Then just attach event handlers to it like normal.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
Robin Dunn wrote:
Jorge Hojyo wrote:
Robin Dunn wrote:
Jorge Hojyo wrote:
In a grid, when I press a key in a cell I can't catch the KeyEvent.
Where are this events going?
If there is a cell editor control active then it gets the events. If not then which event component window of the wxGrid that has the focus and then it passes it (via ProcessEvent) to the wxGrid for processing.
There is a cell text editor control active, I want to do some processing right after the user enters a character. I can detect the OnEnter event on the grid but no OnChar event. I supose I need to detect the OnChar event on the cell editor control. Am I right?, How is this done?
You can use the EVT_GRID_EDITOR_CREATED event to get notified when a new cell editor is created, and then use event.GetControl() to get a reference to the control itself. Then just attach event handlers to it like normal.
OK, It works now.
Thanks.
Jorge..