PDA

Click to See Complete Forum and Search --> : Backspace in RTF?


nick99
Nov 25th, 1999, 06:29 AM
I would like to know how to perform a backspace in my program using visual basic 6. For example, if the user keyed in a "~", I would perform a backspace to remove this particular character.

Please note that I had try to use LEFT, MID and some other function that can achieve this taskl, but however, previous characters will all change to only one colour.

Sincerely asking for help

Thank you.

Aaron Young
Nov 25th, 1999, 11:32 AM
When using a RichTextBox there are 2 copies of the Text, there is a straight Text Version and a Formated RTF copy, when performing operations on Characters within the Text, make sure you're using the .Text Property, otherwise it'll use the RichText Formatted Copy by Default and You'll be manipulating the Formatting characters along with the Text giving the Unexpected results you are experiencing.

------------------
Aaron Young
Analyst Programmer
aarony@redwingsoftware.com
adyoung@win.bright.net