Board index » delphi » Adding strings before and after seltext

Adding strings before and after seltext

I would like to know how (when we click on a button) to add strings
before and after seltext in a richedit.

Example:

In a web editor, clicking on the bold button will add <B> before the
selected text and </B> after the selected text.

I hope you'll be able to help me. I really need some help. Please.

Thanks for your time.

Akhena

 

Re:Adding strings before and after seltext


OK, forget it, i found it.

TOO simple !

all I have to do is:  Richedit1.seltext := ' mystring' +
richedit1.seltext + 'my2ndstring';

It was a bit too simple. Sorry. If you want to help please read my
TColorDialog Problem. Thanks.

Akhena

Quote
Akhena wrote:
> I would like to know how (when we click on a button) to add strings
> before and after seltext in a richedit.

> Example:

> In a web editor, clicking on the bold button will add <B> before the
> selected text and </B> after the selected text.

> I hope you'll be able to help me. I really need some help. Please.

> Thanks for your time.

> Akhena

Other Threads