On 11/10/2017 at 13:40, xxxxxxxx wrote:
Cinema 4D Version: R17
Platform: Windows ;
Language(s) : C++ ;
I add a tree view custom gui in a dialog.
Is there any option to initialize the tree as unfolded ?
On 12/10/2017 at 01:19, xxxxxxxx wrote:
The folded state is define by the IsOpen function.
Simply make return to false for the first time, then after get the obj.GetBit(c4d.BIT_OFOLD)
And in your Open function which is trigger when something is open/closed
make something like
Of course this method work for any BaseList2D but for any customDataType simply make a Bool member variable who gonna store the state of the folding.
On 12/10/2017 at 02:04, xxxxxxxx wrote:
basically you define yourself the fold state of every node in the tree view by the return value of TreeViewFunctions::IsOpened(). Its counterpart is TreeViewFunctions::Open(), which requests to fold or unfold a certain node. It's on you to work with these. For example always returning true from IsOpened() will result in an unfolded and unfoldable tree.
Edit: Ooopsy, gr4ph0s was faster...