Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Preview.SetAutoResizingMask
Sets the auto resizing mask.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Preview | 13.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |
MBS( "Preview.SetAutoResizingMask"; PreviewRef; Value ) More
Parameters
Parameter | Description | Example |
---|---|---|
PreviewRef | The reference ID for this preview control. | $ref |
Value | The new setting. | 4+8 |
Result
Returns OK or error.
Description
Sets the auto resizing mask.This defines whether view changes its size based on the surrounding window.
Name | Value | Description |
NotSizable | 0 | The view cannot be resized. |
MinXMargin | 1 | The left margin between the view and its superview is flexible. |
WidthSizable | 2 | The view’s width is flexible. |
MaxXMargin | 4 | The right margin between the view and its superview is flexible. |
MinYMargin | 8 | The bottom margin between the view and its superview is flexible. |
HeightSizable | 16 | The view’s height is flexible. |
MaxYMargin | 32 | The 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).
Examples
Set autoresize, so the control stays where it is:
Set Variable [ $r ; Value: MBS( "Preview.SetAutoResizingMask"; $$Player; 4+8 ) ]
See also
- AVPlayer.SetAutoResizingMask
- DragDrop.GetAutoResizingMask
- DragDrop.SetAutoResizingMask
- MapView.GetAutoResizingMask
- MapView.SetAutoResizingMask
- Preview.GetAutoResizingMask
- TextView.GetAutoResizingMask
- TextView.SetAutoResizingMask
- WebView.GetAutoResizingMask
- WebView.SetAutoResizingMask
Blog Entries
This function is free to use.
Created 28th June 2023, last changed 27th August 2023