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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Creo toolkit implement tree in UI

AS_10362470
4-Participant

Creo toolkit implement tree in UI

I am working with Creo 8. I would like to implement a dialog with tree view in it. The tree has 3 columns. I have spent few of hours trying to understand API to create and populate tree. But not able to figure how to do it. With C++ I wasn't even able to add node to tree. With C I could add node but not able to figure how to add column. If anyone has tried this already I would appreciate the help in from of sample code.

 

FWIW -

 

For C I have following working code to add node -

 

    auto status = ProUITreeColumnCreate("dialog_material_assign_assembly",
                                        "MatAssignTree", nullptr, L"Test", 10,
                                        PROUITREECOL_LEFT);
    status = ProUITreeNodeInsert("dialog_material_assign_assembly",
                                 "MatAssignTree", "root", L"Root Node", nullptr,
                                 "node_type", nullptr);
 
With C++ I tried I this but its not working -
 
    uifcTree_ptr ptrMatAssignTree =
            uifcTreeFind("dialog_material_assign_assembly", "MatAssignTree");
    auto ptrItem = uifcTreeItemDefine("root_item");
    ptrItem->SetText("Root Item");

    auto ptrPos = uifcItemPositionData::Create();
    ptrPos->SetIndex(0);
    ptrPos->SetIsBefore(false);
    ptrMatAssignTree->InsertItem(ptrItem, ptrPos);

   

 

 

 

ACCEPTED SOLUTION

Accepted Solutions

If you want add column in tree ui component.Set attribute [.TreeAttributeWindow] for [True]。

edit .res file with notepad,add attribute (.TreeAttributeWindow  True) in (TreeAttributeWindow testTree)

 

View solution in original post

1 REPLY 1

If you want add column in tree ui component.Set attribute [.TreeAttributeWindow] for [True]。

edit .res file with notepad,add attribute (.TreeAttributeWindow  True) in (TreeAttributeWindow testTree)

 

Announcements


Top Tags