[wxPython-users] Re: Find a component by name or ID ?

Robin Dunn robin at alldunn.com
Mon Oct 29 13:01:21 PDT 2007


Bob Klahn wrote:
> Hi Larry,
> 
> I'm mystified!  This is the first I've seen wx.FindWindowByLabel fail.  
> Sure looks like a wxPython or wxWidgets bug to me.  Robin??
> 
> As a work-around, you can of course make your STFD a global variable.  
> But that's hardly satisfying.

Try using SetName and FindWindowByName instead of the label.  The label 
has meaning to the native widget and depending on the platform or the 
widget then sometimes it can be changed.  On the other hand, the name is 
purely wx and is not used by the native widget at all.


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





More information about the wxpython-users mailing list