Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I _Need_ OKLs!
Message
From
08/07/1999 04:30:15
 
 
To
07/07/1999 17:59:26
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00237087
Message ID:
00238718
Views:
9
Hi Peter,
you wrote...

> It does sound simpler. My buttons execute methods on the form that they
> reside on. Could you describe a few of your 48 functions? I want to
> visualize how I might use that approach.
>

here's the first few bars of the menu definition - which should be self explanatory... (the alternating case is for readability btw)

the various functions and variables referred to establish whether the current user in the current form/module should have access to the menu item. The whole thing is then just followed by a series of 'on selection bar # of hotkeys do (whatever)'. Because each menu item has a defined hotkey the users don't have to use the menu at all - but the beauty of it is that if they can't remember the hotkey, they CAN use the menu as a reminder...

You'll also note that as the conditions can effectively scope the hotkey to where you want it to be used, there is nothing to stop you re-using the same hotkey to achieve different functions in different modules (See the definition of "F7" below for example)

define bar 1 of hotkeys prompt 'Automatic Payments in Cashbook' key ALT+Y,"ALT Y" skip for alias()<>'BALANCE' OR NOT USERS.CASPAY or adding or copying

DEFINE BAR 2 OF HOTKEYS PROMPT 'Autopay Parameters in Autopay routine' key F7,"F7" skip for alias()<>'BALANCE' OR NOT USERS.CASPAY or adding or copying

define bar 3 of hotkeys prompt 'Browse Cashbook with Running Totals' key CTRL+L,"CTRL L" skip for alias()<>'BALANCE' OR adding or copying

DEFINE BAR 4 OF HOTKEYS PROMPT 'Calculator' key F2,"F2" skip for adding or copying

define bar 5 of hotkeys prompt 'Calendar' key F3,"F3" skip for adding or copying

DEFINE BAR 6 OF HOTKEYS PROMPT 'Change Order of Data' key CTRL+O,"CTRL 0" skip for adding or copying

define bar 7 of hotkeys prompt 'Clear Allocations from Remainder of Picking List' key ALT+F7,"ALT F7" skip for alias()<>'ORDLINES' OR NOT DATAMISC.PICKLIST

DEFINE BAR 8 OF HOTKEYS PROMPT 'Clear Allocations from Current Order in Picking List' key F7,"F7" skip for alias()<>'ORDLINES' OR NOT DATAMISC.PICKLIST

define bar 9 of hotkeys prompt 'Clear Batch Total in Cashbook' key ALT+T,"ALT T" skip for alias()<>'BALANCE' OR NOT USERS.CASPAY or adding or copying

DEFINE BAR 10 OF HOTKEYS PROMPT 'Clear Current Field' key F8,"F8" skip for not editallow()

define bar 11 of hotkeys prompt 'Clear Current Filter' key ALT+C,"ALT C" skip for empty(filter())


and so on...

Cheers

Harry
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform