Using the RTFStyle with TList OCX

25 views
Skip to first unread message

Heidi

unread,
Feb 24, 2010, 3:52:26 PM2/24/10
to TList-DevelopersGroup
Hello!

I have been using the TList OCX/ActiveX control for aobut a year now
in a MS Access development environment.

I would like to use the RTF formatting but am running into some
problems.

I have the column of my tree that I want to do this with set with the
RTFStyle = 1.
The user enters a search term in a text box and presses "search", my
code finds the related rows and their parents and displays them just
fine.
Now, I want to change the text in the first column so that the search
term within the text is in a different color, lets say red.
Then of course, I need to reset the text back to the original text
when the user does a new search or does an "undo" on the search to
rebuild the tree.

So lets say my original text is:
Attitude Control SCSI

And my search term is "control", so my text that displays in the tree
is:
{\rtf1\ansi\deff0{\colortbl;\red0\green0\blue0;\red255\green0\blue0;}
Attitude \cf2 Control\cf1 SCSI}


As opposed to simply the original text with the word "Control" in red.

So, any ideas?!?!?

Thanks in advance for ANY help at all!

Heidi

Reply all
Reply to author
Forward
0 new messages