• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 209
  • Last Modified:

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
0
crystyan
Asked:
crystyan
  • 5
  • 3
1 Solution
 
kretzschmarCommented:
before:

memo1.selText := 'YourStringBefore'+memo1.selText;

after:

memo1.selText := memo1.selText+'YourStringAfter';


meikl ;-)
0
 
crystyanAuthor Commented:
Could u tell me how could I add Break Lines in the selected text ?
0
 
kretzschmarCommented:
>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 ;-)

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
crystyanAuthor Commented:
Thanks. I thought there was another way :-)
0
 
crystyanAuthor Commented:
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
0
 
crystyanAuthor Commented:
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 ...
0
 
kretzschmarCommented:
seems you build an html-editor :-))

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

meikl ;-)
0
 
crystyanAuthor Commented:
Yeah :-)

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

Thanks !
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now