setting grid focus

Hello,

I attached an example of the problem I am having with the grid control and keyup events.

I want to be able to click on any row (cell or label) then press the delete key to delete the row. The problem I have is that there is also a text control in my app, when the user first sets the text control in focus, then goes to select the grid with the mouse, the grid never goes into focus, and the subsequent keyup event doesn’t work. my app works just fine so long as the user doesn’t touch the text control… so how can I make sure that when the user clicks on the grid window that the focus is set on the grid so the grid keyup events are working?

in the example attached, I set the text ctrl in focus and so the grid window key up event never works.

thanks!

Jeff

App1.py (440 Bytes)

Frame1.py (2.96 KB)

···

How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates.

Jeff Peery wrote:

Hello,

I attached an example of the problem I am having with the grid control and keyup events.

I want to be able to click on any row (cell or label) then press the delete key to delete the row. The problem I have is that there is also a text control in my app, when the user first sets the text control in focus, then goes to select the grid with the mouse, the grid never goes into focus, and the subsequent keyup event doesn't work. my app works just fine so long as the user doesn't touch the text control... so how can I make sure that when the user clicks on the grid window that the focus is set on the grid so the grid keyup events are working?

in the example attached, I set the text ctrl in focus and so the grid window key up event never works.

It seems to be working here...

···

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