Auto-Complete Function And Syntax Highlighter?

Problems With - Auto-Complete Function And Syntax Highlighter?

Page 1 of 1

3 Replies - 2424 Views - Last Post: 04 May 2010 - 11:36 AM Rate Topic: -----

#1 Tanner.R   User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 33
  • Joined: 17-April 10

Auto-Complete Function And Syntax Highlighter?

Posted 04 May 2010 - 06:52 AM

Hello every one. :) Ive been making a HTML editor and its been giving sooooo much trouble with the syntax highlighter, so anyway I got it(the syntax highlighter) all working and every thing, so I decided to add a auto-complete function and it's some how messing up the syntax highlighter. Can some one help please? :helpsmilie:

My problem is if you type:
<html>
<p>


<html> will get highlighted blue then the <p> dark red, but if I type another <html> on the next line, it will turn every thing blue. It will be easier to understand if you download the project.

Anyway +rep for help :)

Attached File(s)



Is This A Good Question/Topic? 0
  • +

Replies To: Auto-Complete Function And Syntax Highlighter?

#2 MentalFloss   User is offline

  • .
  • member icon

Reputation: 619
  • View blog
  • Posts: 1,590
  • Joined: 02-September 09

Re: Auto-Complete Function And Syntax Highlighter?

Posted 04 May 2010 - 09:54 AM

I'm not seeing that happen.

I typed <html> and it turned blue (except the end marker). Then I typed <p> and it turned red (except the end marker). Then I typed <html> on the next line and it turned blue (except the end marker) and the <p> stayed red.
Was This Post Helpful? 1
  • +
  • -

#3 Tanner.R   User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 33
  • Joined: 17-April 10

Re: Auto-Complete Function And Syntax Highlighter?

Posted 04 May 2010 - 11:20 AM

Did you type <p> on a new line like this?
<html>
<p>
<html>

Because it changes for me.

Thanks for the reply BTW. :)

EDIT: You have to use the auto-complete thing when typing.

This post has been edited by Tanner.R: 04 May 2010 - 11:23 AM

Was This Post Helpful? 0
  • +
  • -

#4 Tanner.R   User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 33
  • Joined: 17-April 10

Re: Auto-Complete Function And Syntax Highlighter?

Posted 04 May 2010 - 11:36 AM

WOW I can't believe it, I change one line of code and it works! Instead of
richTextBox1.SelectedText = "";
ricTextBox1.Text += autoText;

I changed it to:
richTextBox1.SelectedText = autoText;
and it seems to work just fine.

I tell ya computers try and make you fail. :P +rep for your time though. ;)

This post has been edited by Tanner.R: 04 May 2010 - 11:39 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1