Jump to content

Dialog Window with Dynamic Messages


---
 Share

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
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

Link to comment
Share on other sites

Hi Sergio,

Thanks for the quick response. Is it also possible to do this for continuous text ? I have a specific format and color for the text and i want to keep it when changing the parameter on dialog.

Many thanks,

Canset

Link to comment
Share on other sites

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>"

 

Link to comment
Share on other sites

 Share

×
×
  • Create New...