Skip to main content
15-Moonstone
August 13, 2019
Solved

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

  • August 13, 2019
  • 1 reply
  • 1255 views

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

Best answer by 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.

1 reply

JB_8704915-MoonstoneAuthorAnswer
15-Moonstone
August 15, 2019

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.