notebook tab events?

Catch the tab changed events from the notebook and set the focus back to the listbook.

···

lexy-lou@doyenne.com wrote:

hey there!

i have an app. on the left hand of the app is a listbok with the names of different objects. on the right hand is a bunch of AuiNotebook tabs showing different things done with the currently selected object in the listbox. normally the listbox is highlted, but if i click one of the tabs of the notebook, the lisbox loses focus.

how to remedy?

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

Hi,

this does not work when i:
1. self.Bind(...
2. self.Notebook.Bind(...
3. self.Page.Bind(...
4. self.ListBox.Bind(...

It is enough for you to do:

self.Notebook.Bind(wx.aui.EVT_AUINOTEBOOK_PAGE_CHANGED, self.Refocus)

       ##########
       # HANDLER: Notebook Change Tab
       def Refocus(self, event):
               self.ListBox.SetFocus()

ideas?

Try this:

def Refocus(self, event):
    wx.CallAfter(self.ListBox.SetFocus)

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/

···

On 5/11/07, lexy-lou@doyenne.com wrote: