Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why shortcut menu items are always enabled?
Message
 
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01131421
Message ID:
01131476
Views:
11
>I have EDIT pad on the top application menu with items Copy, Cut, Paste. The Copy, Cut are enabled only when a certain text is selected. Which is how it is suppose to work. The Paste is enabled only when clipboard has something copied/cut.
>
>But when I bring up a shortcut menu (with right mouse click) that has the same items (Copy,Paste,Cut), all items are always enabled. That is, even if no text is selected, Cut and Copy are enabled. How can I make the shortcut menu work as the top application menu?
>

It works correctly for me in the following code
DEFINE POPUP medit SHORTCUT RELATIVE FROM MROW(),MCOL()
DEFINE BAR _med_sp100 OF medit PROMPT "\-" ;
	PICTRES _med_sp100
DEFINE BAR _med_cut OF medit PROMPT "Cu\<t" ;
	KEY CTRL+X, "Ctrl+X" ;
	PICTRES _med_cut ;
	MESSAGE "Removes the selection and places it onto the Clipboard"
DEFINE BAR _med_copy OF medit PROMPT "\<Copy" ;
	KEY CTRL+C, "Ctrl+C" ;
	PICTRES _med_copy ;
	MESSAGE "Copies the selection onto the Clipboard"
DEFINE BAR _med_paste OF medit PROMPT "\<Paste" ;
	KEY CTRL+V, "Ctrl+V" ;
	PICTRES _med_paste ;
	MESSAGE "Pastes the contents of the Clipboard"

ACTIVATE POPUP medit
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform