If deriving a class from
TreeNode[
^] isn't possible for some reason - and I've not tried it but I'd have thought it was fairly easy but I could be missing something - then the simplest way to do it is to use the
Tag
property that every Control derived class has.
Tag
is a Object that is free for your use, and which can contain an instance of any class - so create a class which contains the properties you need as a stand-alone class, create an instance of it, fill out the details, and assign a fresh instance to each
TreeNode.Tag
.
Then when you want to paint it, cast current
TreeNode.Tag
back to your properties class, and you have access to the info you need without having to derive a new class from TreeNode.
But derivation is normally a better approach - what problems did it give you?