@1:
@2: just put a "&" before the character you want to underline
···
wxpython-users@lists.wxwindows.org schrieb am 25.04.02: > On Tue, Apr 23, 2002 at 03:02:13PM -0700, Robin Dunn wrote:
> > I looked at the demo.py and at the wiki, but I can't find a solution
> > to make shortcuts for buttons. In menu items you can do it with
> > "&foo", but how do I get something like this for buttons? I would like
> > an application where I can control everything without a mouse.
> >
> > One solution is to use an eventhandler, but how do I underline
> > characters in buttons, so that the user knows which shortcuts are
> > available?
>
> On wxMSW you can still use the & in button's label and it draws the
> underline and also takes care of capturing the Alt-key and turning it into a
> EVT_BUTTON. I don't think that is supported with wxGTK, but you can at
> least use a wxAcceleratorTable to define the keys that should be turned into
> events.Sad to hear that it is not supported on wxGTK. But it should be easy
to program this myself.Two questions:
1. Why does EVT_CHAR don't give me events? EVT_SIZE does work
class MyFrame(wxFrame):
def __init__(self):
wxFrame.__init__(self, NULL, ID_NULL, "SimpleImageViewer")
EVT_CHAR(self, self.onChar)
EVT_SIZE(self, self.onSize)
2. Who can I underline a character in a button?thomas
--
Thomas Guettler <guettli@thomas-guettler.de>
http://www.thomas-guettler.de_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users
______________________________________________________________________________
All inclusive! 100 MB Speicher, werbefrei, SMS günstiger, Wunschrufnummer, Events,
Preisvorteile und mehr unter WEB.DE Club - Login