g-on-get-width
event¶
Description: Called so you can provide dynamic width logic to the control.
Allows breakdown by screen size: Yes
Arguments:
Argument |
Description |
---|---|
|
The screen size for which the interface is being aligned.
Learn more about screen size breakdowns here |
|
The default width that the grid system will use if the event does not return a new value. |
To inform the grid system that you want to use a new width, you must return a number inside the event.
Example:
<form>
<button text="Button 2" g="block" g-on-get-width="return 10 + 32 + 77;"/>
</form>
In this example, the button's width will be equal to the sum calculated in Lua.