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

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

SOLVED
Highlighted
Garnet

[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

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to add items to a list in a dialog

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#M8...

This helped to accomplish what I wanted to do.

1 REPLY 1

Re: How to add items to a list in a dialog

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#M8...

This helped to accomplish what I wanted to do.