Hi,
I am currently working on the interactive automation script using the Interactive Automation Script Toolkit, in which the section contains several labels to display the message.
However, I notice that the window will resize based on the longest length of the text in one of the labels, which means the longer the text is the bigger the window is, and vice versa until it meets the minimum width requirement. (Please refer to the screenshot below)
May I know if there is any way to disable the automatic resize of the interactive automation script window (or dialog)?
Thanks!
Hi Jason,
Building interactive script UIs is done using a grid. The columns of the grid are defined on the UIBuilder object using the ColumnDefs property.
This property contains a semi-colon separated list of values where:
- Auto: Means the column will indefinitely scale until all the content fits inside the column.
- *: Means the remaining space of the grid is calculated and is divided amongst all columns that containg an asterisk. Note that you can use 2*, 3*, etc as well.
- 100: Means the column will be a 100px.
So your column definitions could look something like this: *;*;auto;200
Your issue can be resolved by either:
- setting the column span property of the label so it spans multiple columns
- changing the way the column behaves
- setting the dimensions of the label directly using the Width or MaxWidth property
Thank you Sebastiaan and Ive. I resolve the issue by using both SetColumnWidth and setting the column span of the label.
When working with the IASToolkit, the width for your columns can be set in using the SetColumnWidth(col, width) method in your Dialog definition.