cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Doubleclick on ProUITreeNode

LarsZiegler
8-Gravel

Doubleclick on ProUITreeNode

Hello!

Does anyone have a working example of expanding and collapsing a ProUITreeNode on doubleclick?
I work with WF3.0-M180.
Is it right, that I have to read the selected names or is there a better way?
The attached function works fine, but is that the correct way?

Thanks,
Lars

{
...
err = ProUITreeActivateActionSet(DlgName, trTREE, OnActivate_trTree, NULL);
...
}


void OnActivate_trTree(char *Dialog, char *Control, ProAppData Daten)
{

ProErrorerr;

intnNodes;
char**Nodes = NULL;
ProBooleanIsExpanded;

err = ProUITreeSelectednamesGet(Dialog, Control, &nNodes, &Nodes);

for (int i = 0; i < nNodes; i++)
{
ProUITreeNodeIsExpanded(Dialog, Control, Nodes[i], &IsExpanded);
if (IsExpanded == PRO_B_TRUE)
ProUITreeNodeCollapse(Dialog, Control, Nodes[i]);
else
ProUITreeNodeExpand(Dialog, Control, Nodes[i], PRO_B_FALSE);
}
err = ProStringarrayFree(Nodes, nNodes);
}


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
0 REPLIES 0
Announcements


Top Tags