Parameter | Description |
---|---|
iWindowWidth | Width of the browser window in pixels |
iWindowHeight | Height of the browser window in pixels |
Procedure OnResizeWindow Integer iWindowWidth Integer iWindowHeight
This event is fired when the window size of the browser changes at runtime and during initialization.
This event can be used to make the WebApp responsive to the screen size by changing properties like pbShowLabel, piColumnCount and piColumnSpan using WebSet. The event gets the browser window size in pixels as parameter.
The example below shows how this event can be used to change the layout of the view by reducing the piColumnCount, which will push controls to the next line if they don't fit any more.
Set pbServerOnResizeWindow to True Procedure OnResizeWindow Integer iWindowWidth Integer iWindowHeight If (iWindowWidth < 600) Begin WebSet piColumnCount to 6 End Else Begin WebSet piColumnCount to 12 End End_Procedure