Height and width aspect ratio
- Last UpdatedJul 08, 2024
- 1 minute read
In order to maintain aspect ratio, you can specify either the height or width of a pop-up window using the CustomizedWidthHeight property. The system calculates the unspecified property based on the graphic's aspect ratio.
If a pop-up window has a title bar, the system adjusts the size of the pop-up window so that the graphic retains its aspect ratio.
Example 1: Graphic is 100 x 100. If you specify height = 200, then the height of the content = 200 - 26 (title bar height) = 174, and width of the content = 174. The same algorithm is applied to adjust the width, based on the adjusted height.
Example 2: Graphic is 100 x 100. If you specify width = 200, then the width of the content = 200, and height of the content = 200. The same algorithm is applied to adjust the width, based on the adjusted height. The height of the container = 200 (height of the content) + 26 (height of the title bar) = 226.
If the pop-up window has a title bar, then the graphic is 100 x 100. If height = 200, then the height of the content = 200, and width of the content = 200. The same algorithm is applied to adjust the width, based on the adjusted height.
If the script contains the StretchWindowToScreenHeight property, but does not contain the Width property, the system adjusts the width of the pop-up window.
If the script contains the StretchWindowToScreenWidth property, but does not contain the Height property, the system adjusts the height of the pop-up window.