wx.grid.Grid inside a wx.Notebook

Hi,

I have a Notebook whose pages contain Grid-objects.
I’d like to have the Grid to gain focus whenever the page of the Notebook is changed.
(By default, the Notebook retains the focus, and in order to start editing the grid, I need to click on a cell.)

How do I best accomplish this ?

br,

Janne Härkönen

Janne Härkönen <janne.t.harkonen <at> gmail.com> writes:

Hi,I have a Notebook whose pages contain Grid-objects.I'd like to have the

Grid to gain focus whenever the page of the Notebook is changed.(By default, the
Notebook retains the focus, and in order to start editing the grid, I need to
click on a cell.)

Catch the NOTEBOOK_PAGE_CHANGED event and in the event handler set the focus to
the grid.

Christian