[wxPython-users] how do i prevent focus getting lost?

Robin Dunn robin at alldunn.com
Mon Feb 4 10:49:44 PST 2008


ygao wrote:
> i have wx.stc editor and a textctrl,when i am editing in the editor ,and 
> i use a thread to pass infomation to textctrl.I notice the editor focus 
> was lost
> and this isn't what i wanted. is there a way that enable the editor 
> focus not to get lost?

How are you giving the information to the textctrl?  Is it just a 
SetValue()?  Unless you are doing something weird I wouldn't expect it 
to steal focus for something like this.

If all else fails you can always just call the stc's SetFocus method and 
that should put the focus back there.


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





More information about the wxpython-users mailing list