I have spend 45 minutes trying to figure out how to make the WinTree look like Microsoft's stock tree control:
I want the +/- to expand, all root notes, no lines, no headers, only one column that is the full width of the control.
It is not right that it took me 45 minutes of searching and the only thing I could figure out is how to turn off all but one column. What am I missing?
Sam
Hi Sam,
The WinTree looks just like the Inbox tree by default.
If you have columns in your tree it's either because you created them or because you are binding the tree to a data source and it's defaulting to grid view.
I assume it's the latter, since you probably wouldn't be creating columns if you didn't want them. :)
If that's the case, all you have to do is set the ViewStyle property to Standard.
You will probably also want to handle the ColumnSetGenerated event of the tree and set the NodeTextColumn on the ColumnSet so you can determine which field of the data is used as the Text of the node. It will default to the first field.