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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>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.selT ext;
memo1.selText := memo1.selText+#13#10+'Your StringAfte r';
meikl ;-)
just insert #10 or #13#10 (=lf or crlf -> lf = Linefeed, cr=CarriageReturn)
like
memo1.selText := 'YourStringBefore'+#13#10+
memo1.selText := memo1.selText+#13#10+'Your
meikl ;-)
ASKER
Thanks. I thought there was another way :-)
ASKER
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
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
ASKER
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 ;-)
well, all possible, but no time yet,
later i can give a possibilty, ok?
meikl ;-)
ASKER
Yeah :-)
I`ve placed another question so I can give u points. The title is 2 Simple Memo Questions :-)
Thanks !
I`ve placed another question so I can give u points. The title is 2 Simple Memo Questions :-)
Thanks !
ASKER