Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

conflict with _finddialog class

Status
Not open for further replies.

USMA99

Programmer
Oct 12, 2000
85
US
I have a menu pad that calls the stock Find function of VFP with a call to "_med_find." For some reason when using Find within my app you cannot copy/paste into the edit box (shows undisplayable character). (CTRL+V & CTRL+C are not defined anywhere within the app so I would think they would go with the windows default behavior.)

Can someone point me to what's within my app that that's causing this?

 
>> (CTRL+V & CTRL+C are not defined anywhere within the app so I would think they would go with the windows default behavior.)

They have to be defined. The easiest way is to create a quick menu, that includes the copy and paste functions, takes a look how the quick menu does it, and do the same for your menu.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 
Usma99,

Given that you have a menu with a standard Find command, why not extend it slightly by adding the standard cut, copy and paste commands as well. Not only will that solve your immediate problem, but it will also make your application behave more like other Windows apps, which is something users generally appreciate.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
I'm not quite connecting on this one, I'm sure it's me.

Here are the steps:
Someone hits CTRL-C, comes to my app, hits CTRL-F (which opens the find dialog (which I call with a "_med_find") and hits CTRL-V in the Find edit box.

At that point the text that they copied doesn't show up but rather a little black box (undisplayable character). Likeways the user can type into that box but when they hit CTRL-C it puts that same black box into the edit box rather than copying to the clipboard.

Were I just to browse a plain old table from the command window, I could copy/paste from the Find dialog's text box just fine which puzzles me. I'm just not sure why the windows shortcuts for copy/paste would stop working.

I went to see how Foxpro does it, and in the menu they do a _med_find and then a _med_copy for copy and a _med_paste for paste. Are you saying that I need to add copy/paste to my custom menu and define the shortcuts CTRL-V & CTRL-C to access my menu which then call _med_paste & _med_copy?

 
Yep, defining them works (to my surprise).

Thanks

 
Usma99,

Basically, the issue is this. A VFP program will only respond to the standard clipboard control keys if you have defined menu bars for the clipboard functions, and those menu bars are assigned CTRL+C etc. as shortcut keys.

The fact that you weren't planning to actually use those menu bars doesn't change that -- you still need to define them.

I know it's a bit confusing, but anyway you seem to have got it working now.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top