FormLayout
A specialized column layout designed for forms in the Elements UI framework.
FormLayout extends ColumnLayout to provide form-specific styling and behavior:
- Automatic background rendering for form sections
- Integrated tab focus navigation
- Theme-aware styling with proper spacing and padding
- Support for custom item backgrounds and window backgrounds
The layout automatically divides the form into three background sections:
- Top background (above first item)
- Individual item backgrounds (optional, between items)
- Bottom background (below last item)
Instance Members
Default is false
, automatically set to true
when any of this instance's observable variables has changed.
Custom theme for this form. If null, uses the global context theme.
Tab focus component for keyboard navigation within the form.
Destroys the form layout and all its background components.
Cleans up:
- All item background quads
- Top background quad
- Bottom background quad
Creates a new FormLayout instance.
Initializes the form with:
- Non-transparent background
- Tab focus navigation
- Automatic style and background updates
Private Members
Empty array constant used for reflection method calls.
Background quad for the top section of the form.
Array of background quads for individual form items.
Background quad for the bottom section of the form.
Event when any observable value as changed on this instance.
Name | Type |
---|---|
instance |
FormLayout |
fromSerializedField |
Bool |
Event when theme field changes.
Name | Type |
---|---|
current |
Theme |
previous |
Theme |
Performs form layout, positioning all backgrounds and items.
The layout process:
- Calls parent layout to position items
- Updates background components
- Positions top background from top edge to first item
- Positions item backgrounds centered on each item
- Positions bottom background from last item to bottom edge
Computes and updates all background components based on current theme settings.
This method:
- Creates or updates background quads as needed
- Applies theme colors and alpha values
- Respects individual item theme overrides
- Handles items that render their own backgrounds
- Activates/deactivates backgrounds based on theme settings
Updates the form's visual style based on the current theme.
Applies:
- Background color from theme
- Item spacing for proper form layout
- Padding around form content
Metadata
Name | Parameters |
---|---|
:build |
tracker.macros.ObservableMacro.build() |
:autoBuild |
tracker.macros.ObservableMacro.build() |
:build |
ceramic.macros.EntityMacro.buildForCompletion() |
:autoBuild |
ceramic.macros.EntityMacro.buildForCompletion() |
:build |
tracker.macros.EventsMacro.build() |
:autoBuild |
tracker.macros.EventsMacro.build() |