Link to home
Start Free TrialLog in
Avatar of crystyan
crystyan

asked on

Simple Memo question

Hi,

I need a function to insert a text before and after the selected text in a memo.
Shouldn`t be very hard but I need it ASAP.

Thanks,
Cristian
ASKER CERTIFIED SOLUTION
Avatar of kretzschmar
kretzschmar
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of crystyan
crystyan

ASKER

Could u tell me how could I add Break Lines in the selected text ?
>Could u tell me how could I add Break Lines in the selected text ?

just insert #10 or #13#10 (=lf or crlf -> lf = Linefeed, cr=CarriageReturn)

like

memo1.selText := 'YourStringBefore'+#13#10+memo1.selText;

memo1.selText := memo1.selText+#13#10+'YourStringAfter';


meikl ;-)

Thanks. I thought there was another way :-)
Hi again,

And how could I place the cursor in the middle after I insert the text ? Let`s say I insert <a></a> and I want the cursor between the tags.

THANKS a lot !
Cristian
Also if u can tell me how should I do when I press enter in the memo to replace add <br> before the new line ... if it`s not too much ...
seems you build an html-editor :-))

well, all possible, but no time yet,
later i can give a possibilty, ok?

meikl ;-)
Yeah :-)

I`ve placed another question so I can give u points. The title is 2 Simple Memo Questions :-)

Thanks !