Results 1 to 3 of 3

Thread: How to change the color of a word in a textbox

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2014
    Posts
    6

    How to change the color of a word in a textbox

    How i can change the color of a word in a textbox?
    example:
    i want when i write for example <html> then converts to <html> and after when i write i will write again black. but when program finding "<html>" the program will replace it to this <html>

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: How to change the color of a word in a textbox

    You can't do this in a textbox, as it only supports single font colors for the entire box. You should look at the richtextbox control, which using RTF, can support doing what you want.

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

    Re: How to change the color of a word in a textbox

    I have a syntax highlighter code in the codebank, but like kleinma mentions, it uses a Richtextbox, not a TextBox.
    "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