FXTreeList

"John Selverian" <[email protected]> Thu, 9 Nov 2023 21:00:51 -0500
Newsgroups gmane.comp.lib.fox-toolkit.user
Organization JAHM Software
Message-ID <[email protected]>
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?

 

 

 

 

 

/****************************************************************
*****************************************/

void MultiPlotWindow::expandCollapse(bool expand, FXTreeList
*treeList)

{

                FXTreeItem* head;

 

                head = treeList->getFirstItem();

 

                for (int i = 0; i < treeList->getNumItems(); i++)

                {

                                if (head != nullptr)

                                {

                                                if (expand)

                                                {

 
_expandAllInTreeView = true;

 
treeList->expandTree(head);

                                                }

                                                else

                                                {

 
_expandAllInTreeView = false;

 
treeList->collapseTree(head);

                                                }

                                }

 

                                head = head->getNext();

                }

}

/****************************************************************
*****************************************/

 

/****************************************************************
*****************************************/

void MultiPlotWindow::expandCollapseAll(bool expand)

{

                expandCollapse(expand, _treeList_TL);

                expandCollapse(expand, _treeList_hidden_TL);

                return;

}

/****************************************************************
*****************************************/

 

 

 

 

Kind regards,

 

Js

_______________________________________________
Foxgui-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/foxgui-users