Results 1 to 8 of 8

Thread: [2005] Syntax Highliting in TextBox

Threaded View

  1. #8
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,950

    Re: [2005] Syntax Highliting in TextBox

    You could create multiple arrays for different keywords which can be displayed in different colors. In order to do this you'll need to write some code, everything you need is present in that example, just extend it.

    The color used for each string is set here;
    Code:
          For Each strKW In arrKeyWords
             MyRow = Words.NewRow()
             MyRow("Word") = strKW
             MyRow("Color") = Color.LightCoral.Name
             Words.Rows.Add(MyRow)
          Next
    If you want more elaborate highlighting, like tags in HTML, then you will need to use regular expressions.
    Last edited by Bulldog; May 3rd, 2007 at 07:28 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width