 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Ralf Guest
|
Posted: Tue Nov 25, 2003 4:35 pm Post subject: Richedit - how to ignore font color at random insert positio |
|
|
I want to display a text with various colors in a RichEdit control, but make
sure that the user can only insert black text. By default, RichEdit takes
the attributes at the current cursor position. How can I prevent that? I
want absolut control over the inserted text.
Thanks for any ideas!
|
|
| Back to top |
|
 |
Peter Below (TeamB) Guest
|
Posted: Tue Nov 25, 2003 6:46 pm Post subject: Re: Richedit - how to ignore font color at random insert pos |
|
|
In article <3fc384d0 (AT) newsgroups (DOT) borland.com>, Ralf wrote:
| Quote: | I want to display a text with various colors in a RichEdit control, but make
sure that the user can only insert black text. By default, RichEdit takes
the attributes at the current cursor position. How can I prevent that? I
want absolut control over the inserted text.
|
In the controls OnKeyPress event do a
(sender as trichedit).SelAttributes.Color := clBlack;
--
Peter Below (TeamB)
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|