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

Using memoedit to view memo field 1

Status
Not open for further replies.

fbizzell

Programmer
Jul 3, 2000
217
I am trying to use memoedit() function in clipper to view the contents of a memo field. I have been able to do this with edit function enabled and it recognizes the page up and page down keys when browsing inside the memo field window, however I have not been able to do this just viewing the field. I con't want the user to be able to make any edits.
 
Hi, fbizzell

Memoedit doesn't directly replace the memo field anyway.
Even if you memoedit the memo field in the database, memoedit returns the edited buffer, and won't affect the memo field unless you replace it.

So let 'em edit merrily away, just don't do a replace.

Or, store the memo field to a memvar & memoedit that.

Jock
 
Thanks for your help on Memoedit(). I took out the replace and it works great. But after doing that I noticed that if I change the .t. to .f. in this code it will not allow the user to change anything.

memoedit(MCOMMENTS,7,12,20,70,.f.,"memoudf2")
 
Hi, again

Yeah, AFAIK that is what that switch is supposed to do - if .f. then the user can display but not change. Hwvr I thought the control keys PGUP/PGDN &c were all still valid, but that may not be the case if you have included a UDF to handle unknown keystrokes (your memoudf2), which memoedit is then expecting to handle those keystrokes.

If you put the right paren after the .f., then you should have the best of both worlds - user cannot edit text but PGUP/PGDN will still work.

Jock
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top