Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CShortCutMenu Class
Message
 
To
30/06/1999 14:35:44
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00236067
Message ID:
00236164
Views:
12
Oscar,

>Am I getting too complicated here. And probably missing a place in the documentatio that says how to disable a menu bar into the Shortcut?

Here's the information on dimming menu items in CShortCutMenu from the Mere Mortals Developer's Guide:

3. In the ShortCutDefine( ) method, add calls to the AddMenuItem() method for each menu item in the shortcut menu. Set parameter 1 to the menu text and set parameter 2 to the command that is run when the menu item is selected. For example:

This.AddMenuItem('New', 'ThisForm.New()')
This.AddMenuItem('Delete', 'ThisForm.Delete()')

You can specify a particular menu item to be dimmed by prefixing the menu text with a backslash "\" character. Here’s an example:

lcPrefix = IIF(ThisForm.nSelected = 0, '\', '')
This.AddMenuItem(lcPrefix + 'Delete', 'ThisForm.Delete()')

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform