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

Memo Field to Table

Status
Not open for further replies.

Scott24x7

Programmer
Jul 12, 2001
2,826
JP
Hi All,
I am dabbling around with an idea at the moment, and I have some text in a memo field, but I want to be albe to look at each line of the memo one at a time, as it appears in the memo field.

How can I load the text of the memo into either an array or a cursor where each line in the memo just becomes a line in the array or cursor?

I thought APPEND FROM, but that turned out to just read from a file.


Best Regards,
Scott
ATS, CDCE, CTIA, CTDC

"Everything should be made as simple as possible, and no simpler."[hammer]
 
Yeah looking at that now...

Best Regards,
Scott
ATS, CDCE, CTIA, CTDC

"Everything should be made as simple as possible, and no simpler."[hammer]
 
ALINES() - but this breaks only at CRLF (or maybe also only CR and only LF), not the automatic wordwrap an editbox does due to it's pixel width.

SET MEMOWIDTH enables you to set a virtual memo width and then MLINES will give a line, MLINE alone can also be used, if you pass in the width as parameter 3 (number of characters). All that is based on number of characters, not pixels.

_screen.textwdith() can tell you the pixel width of a text (shown with _screen.font and _screen.fontsize), so based on that and substrings of a memo you could do pixel width based wordwrap when adding letter by letter and checking when the TextWidth exceeds a certain pixel size, then do a line brreak at the last word begin, and continue with the next line, etc.

Bye, Olaf.
 
Thanks Olaf, actually I found just what I wanted with FILETOSTR()...
I've almost licked my OCR issue. When I've got it done, I'll post up the solution... I just learned a lot about PDF files. :)

Best Regards,
Scott
ATS, CDCE, CTIA, CTDC

"Everything should be made as simple as possible, and no simpler."[hammer]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top