Re: FXTreeList
"John Selverian" <[email protected]> Fri, 10 Nov 2023 15:44:52 -0500
| Newsgroups | gmane.comp.lib.fox-toolkit.user |
|---|---|
| Organization | JAHM Software |
| Message-ID | <[email protected]> |
It works...I have no idea why...
Thanks,
Js
> I've been driving myself crazy with this. I have a 2 level
FXTreeList.
> I can expand and collapse the entire tree with this code. I
want to
> add a 3rd level to it. When I do I can't figure out how to
expand and
> collapse all of the levels. Can you have a
> 3 level tree list?
Sure, no real limit of #levels or #items.
A non-recursive way to travel through all the items:
item=startitem;
while(1){
expandTree(item,true);
if(item->first){ item=item->first; continue; }
nxt: if(item==startitem) break;
if(item->next){ item=item->next; continue; }
item=item->parent;
goto nxt;
}
This convoluted bit of code should visit all nodes from startitem
and its children, in non-recursive way that avoid potentially
disastrous recursion into deep tree hierarchies...
hope this helps,
-- JVZ