Quote:>> Is there any way to know what line number a chunk of
>> highlighted text or the cursor is on within a scrolling memo
>> (edit) field?
>> I've thought of using AT(_cliptext,memo), however, if there is
>> more than one occurance of the data, this won't work.
>> I'm able to do this quite nicely in MAC and WINDOWS, but I've
>> had no luck yet in DOS.
If you highlight a section of memo field and copy it to the clipboard
the Atline(_cliptext,<memo field name> will return the line number of
the first occurrence of the highlighted text.
The snippet below is a short demo - just replaces notes with the name of
your memo field.
SET SYSMENU AUTO
mmess= 'Line no = '+STR(ATLINE(_CLIPTEXT,notes))
WAIT WINDOW mmess
Remember the line number in a memo field is based on the width of the
memo field as determined by SET MEMO WIDTH TO xx. The default is 50.
If you want the line number in the edit region make sure the width of
the edit area matches the memo width setting.
I hope this helps