You are viewing our Forum Archives. To view or take place in current topics click here.
{[(VisualStudio)]}Help me out with custom notepad++
Posted:

{[(VisualStudio)]}Help me out with custom notepad++Posted:

Majesticfalcon
  • Resident Elite
Status: Offline
Joined: Jan 02, 201213Year Member
Posts: 232
Reputation Power: 8
Status: Offline
Joined: Jan 02, 201213Year Member
Posts: 232
Reputation Power: 8
Hello, im trying to make a notepad++ kinda. what im stuck on is getting the notepad to make certain words turn colors. ({[Example]}) Visual Studio color changes things like if, then, else, select case. if anybody could help me out thats be great. This is what ive tried but it doesnt work.
 Private Sub RichTextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RichTextBox1.TextChanged
        If RichTextBox1.Text.Contains(" If ") = True Then
            RichTextBox1.Text.Insert(1, "If then")

        End If
    End Sub
#2. Posted:
Imp
  • Blind Luck
Status: Offline
Joined: Jan 01, 201114Year Member
Posts: 1,957
Reputation Power: 401
Status: Offline
Joined: Jan 01, 201114Year Member
Posts: 1,957
Reputation Power: 401
Majesticfalcon wrote Hello, im trying to make a notepad++ kinda. what im stuck on is getting the notepad to make certain words turn colors. ({[Example]}) Visual Studio color changes things like if, then, else, select case. if anybody could help me out thats be great. This is what ive tried but it doesnt work.
 Private Sub RichTextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RichTextBox1.TextChanged
        If RichTextBox1.Text.Contains(" If ") = True Then
            RichTextBox1.Text.Insert(1, "If then")

        End If
    End Sub


Rather than spending a long time perfecting that, there is an open source Text Editor that SharpDevelop uses called "AvalonEdit" [ Register or Signin to view external links. ]

That does the coloured formatting, and even has the source is you want to find out how they did it ;)
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.