When trying to make a complex GUI using the tree control, it is often desired to set specific colors and fonts to individual rows, columns and cells within the tree.
A good example of this is a test result dataset where you want to have a tree that has items for each test and sub items for each measurement within each test, then have an additional column that displays the result for each measurement with a colored background, like this:
Unfortunately the method 'Add Multiple Items to End' has a limited number of attributes you can set when adding a set of data:
The only solution is to add all your items and then loop through each item and set the required cell attributes individually:
Even with setting 'defer updates' on while doing this, the process is painstakingly slow for large datasets.
The solution would be to add an array of clusters element to the cluster in the 'add items' method that would allow the setting of these extended attributes of the tree. This way, the data could be processed in the assembly code much faster than setting each element in a for loop, as is required now.
This would make the tree control much more useful. This should not be hard to implement and should be easy to make backward compatible. It would just require expanding the datatype that stores the tree contents to include this extended data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.