Results 1 to 2 of 2

Thread: RichTextBox Pretty Printer

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2018
    Location
    Rome, Italy
    Posts
    4

    RichTextBox Pretty Printer

    Hi this is very helpful, but how can it be modified to colorize tags also when they have parameters?
    I mean... usually one will type, i.e.:
    <img src=.....>
    while using this code if i put <img> in the redlist to colorize it red, it will only work if i write the <img> tag, and then go back to add the src= part.... the same goes for all parametric tags, like table, div, input, form, etc...
    on the other side, if i put 'open tags' in the list, i.e.: BlueWords.Add("<img") it will not colorize the final >.
    I have tried to customize it adding a 3rd word list, (olive list):

    Dim OliveWords As New List(Of String)
    OliveWords.Add("<")
    OliveWords.Add(">")

    but it looks like the program cannot understand it because they are not colorized in any color, they appear black... probably because < and > are already present in the other two lists...

  2. #2
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,711

    Re: RichTextBox Pretty Printer

    Moderator Actions: Post spun off of https://www.vbforums.com/showthread....ng-RichTextBox
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

Tags for this Thread

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