AX1260
Defining the canvas size of an Axiom form
The canvas size of an Axiom form defines the minimum width and height of the form web page when it is rendered. By default, the canvas size is 400 x 400 pixels. However, the effective canvas size will adjust automatically based on the fixed contents of your form.
The minimum width and height apply when the form contains any components with dynamic position or size settings. For example, you may have a component that is sized at 50% of the page width. In this case, the canvas width determines the smallest size the component can be. If the canvas width is 800px, then the minimum width of the component is 400px. The component will not get smaller than that, even if the browser window is smaller than the canvas width (in this case, a scroll bar will result). For more information on using dynamic size and position settings for components, see Controlling component position and size.
The canvas size only affects the minimum width and height of the form. It does not define a maximum size. If the browser window is larger than the canvas size, then dynamic components will adjust to the larger size.
In the majority of cases, you should not need to adjust the canvas size. The built-in sizing behavior is intended to meet the needs of most forms without requiring manual intervention by the form designer.
NOTES:
-
For Axiom forms that are being used as custom dialogs in the Desktop ClientGeneral term for using either the Excel Client or the Windows Client, both of which are installed to the user's desktop., the canvas size defines the size of the dialog. For more information on this use case, see Using Axiom forms as custom dialogs and task panes in the Desktop Client.
-
The default canvas size behavior described in this topic does not apply if Scale to Fit is enabled for the form. See Using scale to fit (legacy form sizing).
Defining the default canvas size
The default canvas size of 400 x 400 is determined by the form-level skin. Currently, all skins delivered with the Axiom Software platform set a canvas size of 400 x 400.
If desired, you can set a different default canvas size on a per form basis. To do this:
- From the top of the Form Assistant task pane or the Form Designer dialog, click Edit form properties.
- In the Form Properties dialog, edit the Canvas size by entering new values for width and/or height. The width is the first value and height is the second value.
TIP: You can also change the canvas size by editing the Width and Height fields at the top of the Form Control Sheet.
The default canvas size will be overridden automatically by any fixed components that exceed the default canvas size. In that case, the default canvas size is ignored and the canvas size defined by the form contents is used instead to determine the minimum width and height of the rendered form.
How form contents affect canvas size
The canvas size is not a static property; it will automatically adjust based on the fixed contents of your form. "Fixed contents" refers to any components with the following properties:
- Reference Location: UpperLeft
- X and Y Position: Pixels
- Width and Height: Pixels
If a fixed component exceeds the default canvas width or canvas height, then the effective canvas width or height automatically adjusts to include the fixed component. Essentially, by placing a fixed component outside of the boundaries of the default canvas size, you are implicitly overriding that canvas size.
For example, imagine that the default canvas width is 400px. Then, you add a component that is 200px wide and position it 300px from the left edge. This component exceeds the default canvas width by 100px. As a result, the canvas width is now effectively 500px. When the form is rendered, any components with dynamic position or size will use 500px as the minimum width of the form.
In most cases, you do not need to be aware that you are placing components outside of the default canvas size. The goal of the canvas size behavior is to eliminate the need to think about and manually adjust the canvas size.
However, in some cases you may have a specific "target size" for the form, and you need to be able to see and account for these dimensions while designing the form canvas. In that case, you can toggle the canvas size to be visible in the Form Designer. To do this, click Options > Show form canvas area. When this option is enabled, the canvas size is shaded on the canvas, so that you can tell if you have components that exceed the canvas size.
Scale to Fit and canvas size
As of version 2016.1, the Scale to Fit option is considered a legacy option that should not be used for new forms going forward. Many new features, such as the dynamic size and position options for components, are not intended to be used with scale-to-fit.
The only reason to use scale-to-fit is if you are an upgrading client who is not yet ready to migrate your forms to the new features. In this case, you may still need to create new forms that fit your existing environment. For more information, see Using scale to fit (legacy form sizing).