Jump to content

Dialog Window with Dynamic Messages


Recommended Posts

Hello everyone,

I would like to create a dialog window in which text messages shown dynamically changing with respect to a parameter defined in a script(by adding corresponding integer to the text message).

Is it possible to change and control the dialog  window messages or header dynamically?

Many thanks,

Canset

Link to comment
https://qualityforum.zeiss.com/topic/1410-dialog-window-with-dynamic-messages/
Share on other sites

Hi Canset,

You can create the dialog, adapt the label text and then show the dialog. Something like:

DIALOG=gom.script.sys.create_user_defined_dialog (...)
DIALOG.label_1.text = "desired text"
DIALOG.title = "my title"
RESULT=gom.script.sys.show_user_defined_dialog (dialog=DIALOG)

label_1 is the object name:
image.png.417d8afe1ebf69e3073992ae0da9dee0.png

Hope this helps,

Sergio

Hi Canset, 

Maybe using a "Continuous text" widget?
image.png.4d4cb425879db811b6a89d25ade75fd1.png

"text" field has html format, and can be also adapted:

DIALOG.custom_text.text = "<html><p><span style=\"font-weight:600;\">Bold </span><span style=\"font-style:italic;\">cursive </span><span style=\"color:#ff0000;\">red</span></p></html>"

 

×
×
  • Create New...