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

Cursor movement problem with Inserting Text (Seltext;Selstart)

Status
Not open for further replies.

kazl

Programmer
Dec 9, 2002
68
GB
Last week I wanted help finding cursor position within editbox, for inserting text selected from a popup. You gave me some helpful replies but I have run into a bug/problem.

_CLIPTEXT works only if there are no cr returns in the memo text. After returns the cursor moves across by two characters or more before inserting text inside the next word.

Tried finding text position using keyboard {CTRL+SHIFT+HOME} followed by {CTRL+C}; the copy function doesn't work within the selected text (It uses the text from the command window or my last bit of work!). Tried using SYS(1500) too - no joy there either.

FINALLY moved on to using @ ... CLASS EditBox (this PRG works in a window, not a form). BUT the problem is still there, even just on inserting text by pressing a function key. This is not consistent, so it can’t be down to counting the number of line feeds in the edit box.

Has anyone got any ideas or suggestions to help me get past this?

Thanks. Kaz
 
Ok. SelText had the same problem so I've worked around it by removing line feeds before inserting text and resetting Selstart.

Why does something so simple have to become so complicated?!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top