Re: buttons
- Posted by George Walters <gwalters at sc.rr.com> Aug 01, 2001
- 428 views
thanks Derick, I'll try it.... ..george ----- Original Message ----- From: "Derek Parnell" <ddparnell at bigpond.com> To: "EUforum" <EUforum at topica.com> Subject: Re: buttons > > Here is some same code that might do what you need... > ---------------- > include win32lib_full.ew > without warning > > integer win, ExitBtn, NextBtn, SB > > win = create(Window, "Test Btns", 0, 0, 0, 400, 300, 0) > SB = create(StatusBar, "", win, 0, 0, 0, 0, 0) > ExitBtn = create(Button, "E&XIT", win, 5, 10, 80, 30, 0) > NextBtn = create(Button, "&NEXT", win, 5, 50, 80, 30, 0) > > procedure onClick_Exit() > setText(SB, "Exit") > end procedure > > procedure onClick_Next() > setText(SB, "Next") > end procedure > > onClick[ExitBtn] = routine_id("onClick_Exit") > onClick[NextBtn] = routine_id("onClick_Next") > > procedure onKeyPress_Screen(integer keycode, integer shift) > if find(keycode, "xX") then > onClick_Exit() > elsif find(keycode, "nN") then > onClick_Next() > > end if > end procedure > onKeyPress[Screen] = routine_id("onKeyPress_Screen") > > WinMain(win, Normal) > ---------------- > > ----- Original Message ----- > From: "George Walters" <gwalters at sc.rr.com> > To: "EUforum" <EUforum at topica.com> > Sent: Thursday, August 02, 2001 1:03 AM > Subject: buttons > > > > > > I have several buttons on panels like: > > > > leftButtonText = {"E&XIT","&NEXT","&PREV","&FIND","&ADD","&SETTAB"} > > > > and 'alt letter' like 'alt x' will activate the EXIT button's process. I > > would also like to just press the letter 'x' (upper or lower) and not have > > to press the alt as well. Is their a way to do this? > > > > ...george > > > > > > >