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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP 7.0 cut and paste 3

Status
Not open for further replies.

bettyfurr

Technical User
Mar 12, 2002
371
US
I have a memo field that I want to create a menu with edit and paste capabilities. Can someone steer me in the right direction? I know how to do a right click menu. What is the build in function to do the edit and paste?

Thank you,

Betty

 
Hi Betty,

I've tried your code, and got the same result as Mike. Your code works perfectly. So, is there any code in your keypress or interactive or click events? Maybe it has something that changes the behaviour

-- AirCon --
 
The edit box is on a pageframe.

In the right click event of the edit box, a refresh occurs after the code to use the shortcut menu.

The editbox controlsource field is the field in table. The Table update has not occurred when the refresh happens.
This should not matter? :)

Betty
 
Betty,

The Table update has not occurred when the refresh happens.

Yes, it does matter. Remark the refresh() and try again

-- AirCon --
 
Will do. Let you know tomorrow if this fixed my problem. I sure hope it does. I will apply the update prior to the refresh.

Betty :)

 
One more thing,

You can refresh() before update, but don't put it in right click events. Put it in Valid events.

Good luck :)

-- AirCon --
 
Betty,

Are you saying you have (in the RightClick):

DO BETTY.MPR && or whever your MPR is called
THISFORM.Refresh

I just tried that code myself, and it still works as expected. On the other hand, this was with a very simple form, with no other controls or tables.

Then again, even with the Refresh, I can't see why the insertion point should actually move to another location. If you positivley click on the point where you want the pasted-in text to go, there is nothing in the code you have mentioned which would move the insertion point back to where it was.

Look forward to hearing the result of your next test.

Mike


Mike Lewis
Edinburgh, Scotland
 
Are you saying you have (in the RightClick):

DO BETTY.MPR && or whever your MPR is called
THISFORM.Refresh

**********
Yes.

betty :)
 
Mike,

I just tried that code myself, and it still works as expected. On the other hand, this was with a very simple form, with no other controls or tables

Try with table fields for controlsource, and use buffering. You will see different behaviour :)

-- AirCon --
 
AirCon,
I am using the table field for the controlsource and using buffering.

I will move the refresh out of the right click event and see what happens tonight.

Results tomorrow.

Betty :)
 
AirCon,

You've got it. I added a buffered table, and bound the edit box (that's the control with the right-click menu) to a memo field.

Now, when I do anything with the right-click menu, I get all kinds of weirdnesses -- not just the behaviour Betty described. When I removed the Refresh, everything was fine.

Betty,

When you get to your desk in the morning, I think you'll find AirCon's suggestion will solve the problem.

Mike


Mike Lewis
Edinburgh, Scotland
 
It worked. It worked. It worked.

Thank you guys for hanging in there. I knew I had to be doing something stupid. Just didn't know about the refresh.

Again Thank you.

Betty :)
 
Hi Betty,

Glad you can worked it out.
Thanks for the star :)

Regards

-- AirCon --
 
Thanks again for everyone help. I believe in giving the stars for good help. I really am gratiful for this site. Sometimes I can not see the forest for the trees.

The users will be delighted for their cut and paste that WORKS!

Betty :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top