Resetting RichTextBox after loading RTF
Posted on 1998-09-28
Dear Guys (and Gals),
I have one question which might sound simple to you but I still can't find the solution to it.
I have got a rich text box which will load a RTF file from local drive. After which the user can also choose to clear it and type in their own message. However, I realised that even if I do a
richtextbox1.text = ""
The previous settings for the fonts and the colors still stay in the box. This is really annoying as if the previous document contains underline and say green color for example, I won't be able to clear that for the user. Can I do a select everything in the richtextbox1 and then set the selcolor, selbold, selfontname etc to something I like?
I find that as richtextbix do not have a Forecolor property I cannot change its color unless I select all the text in the rich text box.
If it is not too much to ask, can you please kindly shed some light on this matter?
Thanks a million.