[wxPython-users] accelarator and radio buttons

Robin Dunn robin at alldunn.com
Mon Sep 17 15:20:27 PDT 2007


Didier BRETIN wrote:
> Hi,
> 
> I try to setup an interface with text control, radio buttons and buttons.
> Apparently I can add accelerators to buttons (I'm under windows). But how
> can I add accelarators to text control and radio buttons ? If not how can
> I set focus to text control and radio buttons with keyboard ?

For text controls try putting the accelerator in a wx.StaticText used as 
the textctrl's label.  If it is created just before the textctrl then I 
think that it will automatically select the textctrl when the 
accelerator happens.  For radio buttons using the & in the label should 
do it.


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





More information about the wxpython-users mailing list