Thread: how to make user text change color

  1. #1
    Emotionally Unstable DarkViper's Avatar
    Join Date
    Oct 2002
    Posts
    343

    how to make user text change color

    i am making a text editor and i want to know what code i need to put in, and where to insert it.

    while running, when the user types in something like
    Code:
    <html>
    i want that whole thing "<html>" to change to something like....blue! or something, and i want other keywords to appear the same color or a different one, how would i be able to do this, and where would i put it? im stumped and cant think of anything.
    ~DJ DarkViper signing out
    ----------------------------------------
    My Site:
    Black Jaguar Studios

    Languages:
    Fluent English, Starter German, HTML, Javascript, Actionscript, Intermediate PHP

    Verteran Despiser of: ASP, Java, BASIC, Pascal, Cobalt

  2. #2
    Registered User xds4lx's Avatar
    Join Date
    Nov 2001
    Posts
    630
    There are a few ways to go about it. Have your program keep a list of keywords, and have it check what the user has typed into the prog. If its one of they keywords change its color.

  3. #3
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    This looks more like a programming forum post then a tech forum post.

  4. #4
    Emotionally Unstable DarkViper's Avatar
    Join Date
    Oct 2002
    Posts
    343
    omg.... R-O-D, i posted this once in a the programming boards and salem...or someone moved it to the tech board and said it belongs here. so i posted another one becuase no one was of any help...

    anyways xds4lx, thats a good idea, but know where i should put it? or what the code would remotly look like at all????
    ~DJ DarkViper signing out
    ----------------------------------------
    My Site:
    Black Jaguar Studios

    Languages:
    Fluent English, Starter German, HTML, Javascript, Actionscript, Intermediate PHP

    Verteran Despiser of: ASP, Java, BASIC, Pascal, Cobalt

  5. #5
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    well if your making a text editor.....bleh whatever

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. DirectX | Drawing text
    By gavra in forum Game Programming
    Replies: 4
    Last Post: 06-08-2009, 12:23 AM
  2. So I want to make a bunch of text area things
    By Noobwaker in forum Windows Programming
    Replies: 4
    Last Post: 05-12-2006, 11:26 AM
  3. MFC: Change the color of static text with button press?
    By BrianK in forum Windows Programming
    Replies: 2
    Last Post: 06-16-2004, 11:03 PM
  4. Ok, Structs, I need help I am not familiar with them
    By incognito in forum C++ Programming
    Replies: 7
    Last Post: 06-29-2002, 09:45 PM
  5. Replies: 2
    Last Post: 09-04-2001, 02:12 PM