OnResizeWindow - cWebView

Sent when the browser window has been resized by the user

Type: Event

Parameters: Integer iWindowWidth Integer iWindowHeight

ParameterDescription
iWindowWidthWidth in pixels
iWindowHeightHeight in pixels


Syntax
Procedure OnResizeWindow Integer iWindowWidth Integer iWindowHeight

Description

This event is triggered every time the user changes the size of the browser window while this view is being displayed. It can be used to make the user interface responsive. Note that pbServerOnResizeWindow needs to be true for this event to fire.

Sample

The following example shows how it can be used to change the column count based on window width.

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