Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

WebView.SetAutoResizingMask

Sets the auto resizing mask.

Component Version macOS Windows Linux Server iOS SDK
Webview 7.5 ✅ Yes ❌ No ❌ No ❌ No ✅ Yes
MBS( "WebView.SetAutoResizingMask"; WebViewerRef; Value )   More

Parameters

Parameter Description Example
WebViewerRef Either the Web Viewer Object Name or the Web Viewer ID as returned by "WebView.FindByName" function.
Value The new setting. 4+8

Result

Returns OK or error.

Description

Sets the auto resizing mask.
This defines whether web viewer changes its size based on the surrounding window.

NameValueDescription
NotSizable0The view cannot be resized.
MinXMargin1The left margin between the view and its superview is flexible.
WidthSizable2The view’s width is flexible.
MaxXMargin4The right margin between the view and its superview is flexible.
MinYMargin8The bottom margin between the view and its superview is flexible.
HeightSizable16The view’s height is flexible.
MaxYMargin32The top margin between the view and its superview is flexible.

e.g. the value 18 means the view can resize both horizontally and vertically with the parent view (window).

Added iOS support in version 10.3.

Examples

Make the WebViewer stay on position in window:

MBS( "WebView.SetAutoResizingMask"; "web"; 4+8 )

Resize with window growing:

MBS( "WebView.SetAutoResizingMask"; $$web; 4+2+8+16 )

See also

Release notes

Blog Entries

This function checks for a license.

Created 14th November 2017, last changed 4th November 2021


WebView.SetAllowsLinkPreview - WebView.SetCustomUserAgent