[Ir...] Posted October 2 Share Posted October 2 Hello, Is it possible to interact with the creation of a dialog from a script? For example, can you define the columns and rows of a dialog in a scripting environment before calling the dialog? To illustrate, I’ll use a simple example. Giving these values to these variables (left image) I want to create the dialog of the right image. If the values given were different, the dialog would also change. See the image below. Is there any way I could control the dialog in this manner? Thank you in advance, Irune Link to comment Share on other sites More sharing options...
[Ma...] Posted Friday at 06:30 AM Share Posted Friday at 06:30 AM Hello Irune, Yes, this is possible. When you insert a dialog into the script, you can select the option "Embedded into script". You will notice that the dialog definition is a Python dictionary, which is passed to gom.script.sys.create_user_defined_dialog (). Ususally, this dictionary is created with the Dialog editor and used as a constant, but it is possible to modify it before calling gom.script.sys.create_user_defined_dialog (). For each widget in the dialog, you will see a key/value pair for "rows" and "columns" which defines its position in the dialog window. The dialog window's total number of rows and columns is calculated internally. You can create widgets by adding entries in the dictionary by your script accordingly. Best regards, Matthias Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in