User Tag List

Results 1 to 6 of 6

Thread: Syntax highlighting

  1. #1
    Clicker Fusion 2.5 DeveloperSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,739
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Syntax highlighting

    Is there any way to highlight syntax (e.g. html) in a edit box (real time)? It's possible with the regular expression object, but not real time. If not, how about an extension for it? A friend is indicating with his delphi syntax highlighting edit box component.. if it's possible in delphi, it MUST be possible in C :P

  2. #2
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, ┼rhus
    Posts
    3,455
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Syntax highlighting

    I made a html highlighting system for my html editor with the Rich Edit Object.
    Since the String Manipulator object isn't available for MMF2 you have to loop through the html code manually.

    What I did was to find the first occurence of '<' and then color the text from there to the next '>'. Then I move back to the first '<' and find the next " character if it's inside the <> marks and then color from there to the next " again. I continue that untill it gets to the '>'. It worked fairly well I think. To make it faster I only made it colorize the visible html you could see on the screen (if you scrolled) and while you were writing the html, it would only colour 100 chars back and 100 chars forward or something like that. It was instant and not noticeable.

  3. #3
    Forum Moderator Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    Sphax's Avatar
    Join Date
    Jun 2006
    Location
    Paris, France
    Posts
    4,454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Syntax highlighting

    I've made an example to do that in realtime with regex object and richedit : HERE

    Original post : HERE

    But an extension like richedit object with the possibilities to select text without a visible selection and without register changes in the undo history could be great...

  4. #4
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, ┼rhus
    Posts
    3,455
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Syntax highlighting

    If your turn on Rich Edit 2.0 features and (maybe not required) disable and enable the window while coloring, it will not flicker selections while coloring. It will be faster too for some reason.

  5. #5
    Forum Moderator Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    Sphax's Avatar
    Join Date
    Jun 2006
    Location
    Paris, France
    Posts
    4,454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Syntax highlighting

    I don't know that, I'll test it.
    But the problem with undo history is still here...

  6. #6
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)

    Join Date
    Feb 2015
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The download link doesn't work

Similar Threads

  1. Highlighting text example
    By SEELE in forum File Archive
    Replies: 3
    Last Post: 2nd August 2008, 02:12 PM
  2. HTML Syntax Highlighting
    By workshop2 in forum File Archive
    Replies: 2
    Last Post: 3rd March 2008, 10:11 PM
  3. highlighting an object
    By Jason in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 5th September 2006, 04:04 AM
  4. RTF Highlighting.
    By Conno in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 11th August 2006, 01:16 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
  •