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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

[Solved] How to add items to a list in a dialog

JB_87049
15-Moonstone

[Solved] How to add items to a list in a dialog

Hi all,

I have created a list in a dialog window using the following code (Creo 5.0.5.0)

ProUIDialogListAdd(DIALOG_DIM_LIST, DIM_LIST_NAME, &grid_opts);
ProUIListListtypeSet(DIALOG_DIM_LIST, DIM_LIST_NAME, PROUILISTTYPE_TABULATED);
ProUIListColumnsSet(DIALOG_DIM_LIST, DIM_LIST_NAME, 10);
ProUIListNamesSet(DIALOG_DIM_LIST, DIM_LIST_NAME, 10, szListClmnNames);
ProUIListColumnlabelSet(DIALOG_DIM_LIST,
DIM_LIST_NAME,
ProStringToWstring(wcText, "Annotation elem\tSubtype\tDimension type\tUnit quantity\t"
"Nominal value\tUnits\tUpper limit\tLower limit\tVisible\t"
"Combination state"));

ProUITableAlignmentSet(DIALOG_DIM_LIST, DIM_LIST_NAME, PROUIALIGNMENT_CENTER);

This gives the following result

Capture.PNG

How can I now add items to this list?

I have tried to do this using ProUITable functions as that worked to set the alignment but this failed.

I have tried to do it with ProUIListLabelsSet but this failed also.

Can anyone point me into the right direction?

 

Best regards,

    John Bijnens

ACCEPTED SOLUTION

Accepted Solutions
JB_87049
15-Moonstone
(To:JB_87049)

I was able to solve my problem. Once I figured out the API needed was called ProUIListLabelsSet I found the following post

https://community.ptc.com/t5/Customization/How-to-add-and-remove-objects-from-the-list/m-p/592659#M8117%3F&art_lang=en&posno=2&q=ProUIListLabelsSet&source=search

This helped to accomplish what I wanted to do.

View solution in original post

1 REPLY 1
JB_87049
15-Moonstone
(To:JB_87049)

I was able to solve my problem. Once I figured out the API needed was called ProUIListLabelsSet I found the following post

https://community.ptc.com/t5/Customization/How-to-add-and-remove-objects-from-the-list/m-p/592659#M8117%3F&art_lang=en&posno=2&q=ProUIListLabelsSet&source=search

This helped to accomplish what I wanted to do.

Announcements


Top Tags