Jump to content

Changing Size of the dialog windows


Recommended Posts

Hello everyone,

I am currently working on a script in which there are buttons  not visible first. It can be made visible according to user input which is a number. However, there is too much space left since there are many buttons visible. So, i want to change the dialog window size according to user input. Is there a way to do that through scripting?

Many thanks,


Link to comment
Share on other sites

  • 2 weeks later...

No, you don't have access to the dialog's size after initialization. Use

print (DIALOG.__doc__)

to get all available attributes of the dialog you can manipulate.

Handle for a dialog titled 'Dialogtitel'

This object can be used to access and manipulate the dialog and its widgets.


handler (unspecified/various)           - Registered event handler function     
control (unspecified/various)           - Dialog control widgets                
title   (string)                        - Dialog title                          
result  (Tom::MSysScript::DialogResult) - Current widget values as result object
widgets (list)                          - List of dialog widget                 
enabled (boolean)                       - Dialog enabled state                  
hidden  (boolean)                       - Dialog hidden state                   
timer   (unspecified/various)           - Handler function interval timer       
visible (boolean)                       - Dialog visibility state               


button   - Button
button2  - Button
button_1 - Button

Unfortunately "size" isn't there.

You can set the "Size" to "Automatic",
image.png.f790ecb84445514897673c8bd6d8052f.png -> image.png.666bdd5083a198ddeb469fb9349faee4.png
but as you already noticed, this only increases the dialog's size when you switch a button visible but doesn't decrease the dialog's size when you switch a button invisible.

So you can try to implement a kind of wizard dialog which

  • stores current set widget's data in an external variable
  • closes
  • configures a new similar dialog with needed buttons and a preset fixed size (just manipulate the XML-code of the dialog)
  • reopens the similar new dialog

But this might result in a flickering dialog and is clumsy to implement.

Link to comment
Share on other sites


  • Create New...