i'm also suupose to make auto indentation, but this causes me huge coloring problems, when writing: richTextBox1.Text+=" "; it effects on the text color and i was not able to over come this issue, check this code:
Expand|Select|Wrap|Line Numbers
- private void checkAndIndent()
- {
- console.richTextBox1.Text+="\nNotice: (before indent) Active color is:"+richTextBox1.SelectionColor;
- richTextBox1.Text+=" ";<<TAB INSERTION TO THE TEXT
- richTextBox1.Select(richTextBox1.Text.Length+6,0);
- console.richTextBox1.Text+="\nNotice: (after indent) Active color is:"+richTextBox1.SelectionColor;
- richTextBox1.SelectionColor=textColor;
- }
Notice: (before indent) Active color is:Color [Black]
TextChanged: Event Fiering: :0:0
Event Arrived: wordColoring:False::0:0
Preforming last word black coloring
Notice: Active color is:Color [Black]
Notice: (after indent) Active color is:Color [Blue]
i have done nothing that changes the color in this section but still the color changes to blue
this happans only after at least one of the word was colored as the code recognized it as a reserved word
Sorry for broken english
IF YOU HAVE OTHER IDEA ON HOW TO IMPLEMENT AUTO INDENTATION INSTEAD OF ADDING THE TEXT A TAB IT WILL BE GREAT
PLEASE HELP it's a collage project i must finish it as soon as i can :(