Posted by Dmitry Uvarov on 1999-05-17
> I already can move the caret by clicking the LMB, but i am stumped on how > to edit that text at that position. > > eg. The qick brown fox.| <- caret > The q|ick brown fox. > The qu|ick brown fox. > If you store all data as list of strings (each row = string) then you must find wich string you must edit and perform some operations. You must also have current string position (you have it, because you know where caret is). then just wait for keypress and if a key was pressed you must call something like InsertChar or DeleteChar etc... It will be more difficult if you want to carry of to the next line long strings. Regards, Dmitry. ICQ# 20079823 homepage: http://pascal.bizhosting.com ----------------------------------------------------------------------- He laughs at every joke three times... once when it's told, once when it's explained, and once when he understands it.
Previous post | Next post | Timeline | Home