Rich Text Format
Recently I’ve been working on syntax coloring or some say syntax highlighting, to be integrated to my Final Year Project. Well, in case you have no idea what is syntax coloring, it is basically where some of the reserved keywords highlighted in different color (typically in blue) when doing programming, to aid detection of errors or misspelled keywords.

Imagine something that looks simple, and some of us computer science students take for granted, can actually be quite a pain to make. My initial approach was keep detecting the whole text area, checks for reserved words and changes color as the user types in, and boy it lags badly and flickers a lot. So, I ditch that idea and went for another one.
Apparently, to speed up the performance, I would need to go a much more lower level (which means closer to machine kind of language) approach. Turns out that I would have to manipulate the RTF(Rich Text Format) to get the colors going. RTF turns out to be an alien language to me when I looked at it for the first time. For starters, let’s see the screenshot below.

It seems that when you are using Microsoft Word, the simple sentences that you have typed in, turns out to be some kind of complex code like the shown above. Kinda hard for me to manipulate the text in this form at first, but it sure is fun to learn a new trick.
Related posts:
- My FYP Role My FYP (Final Year Project) consists of a group of four. All of our tasks are interconnected, yet we can work almost independently, thanks to Object Oriented Programming approach. The reason I bring up this post is that, many people misunderstand my role or task in my FYP, many thought...
- Final Year Project In ProDEx Been busy with the whole week, first is Drama presentation. Next stuff, is my college annual ProDEx (Project Design Exhibition). My teammates and I had to present our Final Year Project. Sure it was hectic, but it sure was rewarding. Our Exhibition Poster 1 (Click on image to enlarge) The...
- 3D Modeling Again Recently I am up to 3D stuff again, for good this time. I’m basically going to use what I’ve learn from my internship and put it in use for my college final year project. Well, although my skills are pretty limited, what I’m doing is to create low polygon 3D...
November 23rd, 2007 at 11:58 pm
all hail eu hua!