Re: setting shortcut keys for WXPython widgets

  • From: Alex Hall <mehgcap@xxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Fri, 17 Jun 2011 20:07:11 -0400

That did it. Thanks!!

On 6/17/11, Haden Pike <haden.pike@xxxxxxxxx> wrote:
> When creating the button, add an & character before the character you
> want in the label.  For example:
>
> button = wx.Button(parent, -1, "T&est")
>
> The shortcut key will be e.
>
> HTH,
> Haden
>
> On 6/17/2011 7:46 PM, Alex Hall wrote:
>> Hi again,
>> I have done several different searches for this, but I can't seem to
>> find anything. By default, any widget in a dialog can be accessed by
>> pressing alt and the first character of the control, so a button
>> labeled "search" is alt-s. I would like to control this, for when
>> multiple widgets start with the same letter. I might want my search
>> button to be alt-s, and my settings button to be alt-e. Using python,
>> specifically lbc (if that changes anything), how would I do this? I
>> have seen it done before, in an application written in python whose
>> source code I cannot access, so there must be a way. I would rather
>> steer clear of accelerator tables, unless there is no other way to do
>> this. It just seems that there is an easy way to set the shortcut key
>> since jaws is able to pick it up automatically.
>>
>
> __________
> View the list's information and change your settings at
> //www.freelists.org/list/programmingblind
>
>


-- 
Have a great day,
Alex (msg sent from GMail website)
mehgcap@xxxxxxxxx; http://www.facebook.com/mehgcap
__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind

Other related posts: