I'm creating a little app that will read, parse, and format the contents of a lua script - specifically, a SavedVariables file from World of Warcraft created by the "Elephant" chat logging add-on. The prototype I have in mind will generate an array of ListViewItem
instances, showing a timestamp, player name, what channel the message was posted into, and the message that was posted.
I'd like to have the chat message rendered as it would be in the game: the game colors the names of those "talking" in the chat after their character's class (e.g. a rogue's name is yellow, mages' names are light blue), but when it comes to ListViewItem
and ListViewSubItem
, coloring text there seems to be an all-or-nothing deal.
Would it be possible to add functionality for the ListView
to apply formatting (or just color) to text in a ListViewItem
or ListViewSubItem
based on markup in the Text
property?
EDIT: I'm asking if it's possible to just add text formatting to a ListViewItem through the magic of inheritance/polymorphism in a derived class, and if so, what's the best way to do it (amount of effort, code security, etc)?