Re: Buttons
- Posted by George Walters <gwalters at sc.rr.com> Aug 01, 2001
- 443 views
Irv, and Derick Where is ... onKeyPress[Screen] = routine_id("onKeyPress_Screen")... documented? the w32lib_full.ew book says the syntax for onKeyPress is like....onKeyPress(keyCode,shift)....which does not work but what you send does...am I missing some doc somewhere?? ..george ----- Original Message ----- From: "Irv Mullins" <irvm at ellijay.com> To: "EUforum" <EUforum at topica.com> 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? > > I was wondering when you were going to ask :) > > Hook the onKeyPress event for the window on which the buttons appear: > procedure MainWindow_onKeyPress ( int keyCode, int shift ) > keyCode = upper(keyCode) > if keyCode = 'C' then > ReadCustomerFile() > openWindow(CustomerWindow,Normal) > elsif keyCode = 'D' then > ReadDriverFile() > openWindow(DriverWindow,Normal) > .... and so on. > > Regards, > Irv > > > > >