How Do I Set a Minimal Size for a Window? (Magic xpa 4.x)
The Windows you create in Magic xpa will, be default, be resizable by the user. Depending on the placement settings, controls such as the tables will also resize as the screen resizes. However, it is then possible for the user to compact the form so much that it looks very odd.
To prevent this you can set a form Minimum size. The form will still expand to whatever size the user sets, but it will not become any smaller than the size you specify.
-
Go to the Forms tab of your task.
-
Type Alt+Enter to bring up the Form Properties.
-
Type in values for the Minimum width and Minimum height properties.
-
Alternatively, you can use Expressions to calculate these values at runtime, by zooming on the Expressions field to the right.
Now, in our example, the form will not contract below 55 dialog units wide and 16 tall.
Hint: An easy way to find the numbers for the minimal size settings is to manually size the window to the size you want, then copy the numbers from the Width and Height properties of the form.
The Online and Rich Client Samples projects (program WI04 and RWI04)