Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Editing features in a form
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00324363
Message ID:
00333061
Views:
33
>>You don't need to have any ON SELECTION... thingies for this stuff to work.
>>
>>All you need is the DEFINE POPUP and the DEFINE BAR commands. The rest will handle itself. Try it!
>
>I tried do this. The commands are as follows:
>
>DEFINE POPUP edit MARGIN RELATIVE SHADOW COLOR SCHEME 4
>DEFINE BAR _MED_CUT OF edit PROMPT "Cut" ;
> KEY CTRL+X, "Ctrl+X"
>DEFINE BAR _MED_COPY OF edit PROMPT "Copy" ;
> KEY CTRL+C, "Ctrl+C"
>DEFINE BAR _MED_PASTE OF edit PROMPT "Paste" ;
> KEY CTRL+V, "Ctrl+V"
>
>In my MAIN.PRG, I do some stuff, then the above commands, then
>
>DO FORM mainmail
>
>which runs a top level form that resembles a toolbar...it just has some buttons that call other forms. The shortcut keys don't work in these forms. Do you know where I'm going wrong?
>
>Thanks,
>Joe

The only thing I could suggest is to rename the name of your POPUP from "edit" to something else. It may be getting turned off because it's the same name as the standard edit menu. Sorry I didn't notice that before. If that doesn't work, it may be related to Top Level forms or something.

This worked for me:

DEFINE POPUP myedit MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR _MED_CUT OF myedit PROMPT "Cut" ;
KEY CTRL+T, "Ctrl+T"
DEFINE BAR _MED_COPY OF myedit PROMPT "Copy" ;
KEY CTRL+Y, "Ctrl+Y"
DEFINE BAR _MED_PASTE OF myedit PROMPT "Paste" ;
KEY CTRL+E, "Ctrl+E"
x=createobject('form')
x.addobject('f1','textbox')
x.f1.visible=.t.
x.show(1)
RELEASE POPUP myedit


Note that I renamed the popup to "myedit" (and the define bars) and changed the hotkey to the last letter so you can see that it works.

If it doesn't, then maybe Top Level comes into play.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform