[ca...] Posted May 10, 2022 Share Posted May 10, 2022 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, Canset Link to comment Share on other sites More sharing options...
[Th...] Posted May 19, 2022 Share Posted May 19, 2022 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. Attributes: 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 Widgets: button - Button button2 - Button button_1 - Button Unfortunately "size" isn't there. You can set the "Size" to "Automatic", -> 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 More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in