Skip to main content
14-Alexandrite
June 17, 2022
Solved

ProUILabel as a list displayer

  • June 17, 2022
  • 2 replies
  • 1201 views

Hi,

 

I need your help! I need to display a dialog with a list of message, but I have no many example with ProUILabel and what I did always fail.

 

I tried to put code below inside a loop with an incrementing DIALOG_LABEL and label_text as message:

ProUIDialogLabelAdd(DIALOG_NAME,DIALOG_LABEL,&grid_opts);
ProMessageToBuffer(label_txt, user_msg_new, "board_selection");
ProUILabelTextSet(DIALOG_NAME,DIALOG_LABEL,label_txt);

 

Is there a easier way to display the box with list of message? Is  ProUIDialogLabelAdd and ProUILabelTextSet fit for that?

 

Thank you!

 

 

 

Best answer by FabianWolf

Hello Steve,

sounds like a ProUILabel is not the right component for your purpose.

You better add a text area via ProUIDialogTextareaAdd.

Pre-assemble your messages inside a loop into a single wide string and apply it using function ProUITextareaValueSet.

In order to insert a line break use L'\n'.

2 replies

24-Ruby III
June 17, 2022

Hi,

I suggest you to ask PTC Support.

14-Alexandrite
June 17, 2022

Hello Steve,

sounds like a ProUILabel is not the right component for your purpose.

You better add a text area via ProUIDialogTextareaAdd.

Pre-assemble your messages inside a loop into a single wide string and apply it using function ProUITextareaValueSet.

In order to insert a line break use L'\n'.