If you have a Tree control on your form and want to expand the whole tree with all items and subitems at once, you can use the following static method:
SysFormTreeControl::expandTree(FormTreeControl _formTreeControl, TreeItemIdx _treeItemIdx, int _toLevel = 0, int _level = 0)
For example to expand the whole tree from