General information
Category:
Coding, syntax & commands
Hilmar, thanks for your reply.
I'm wondering how a menu Shoertcut would work ? . I have a global ON Key F10 which activates a lookup if the user is on a particular text box.
Regards,
Gerard
>>Hi,
>>
>>I have a Private Data session form , with one File in DE (called KMA)
>>Also have a simple MyPrg1.prg with two lines:
>>Sele KMA
>>Brow
>>
>>I have two buttons, each which call MPPrg in different way
>>MyButt1: Do MyPrg1
>>MyButt2: On Key Label F10 do MyPrg1
>>
>>If I click button 1, Mprg1 runs ok
>>If I click Button 2,and F10, I get an error saying Alias Kma not found
>>
>>Now if I change the screen to a Deafult Data session, all is ok !!
>>
>>Is there some inherent problem using Private datasessions and an On Key Label ??
>>
>>If so, is there a workaround. In my calling prg, I want to set a few on key label commands so tht they stay in place for the duration of the app.
>>
>>Any help appreciated.
>>regards,
>>
>>Gerard
>
>Hmmm... looks like the OKL uses the default data session.
>
>In general, I have the impression that most programmers discourage OKL. Personally, I avoid it, at least in most cases.
>
>Try using a menu shortcut instead.
>
>Another workaround might be to intercept Form.KeyPress (you must also set Form.KeyPreview to .T.).
>
>HTH, Hilmar.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only