LabeledFieldGroupView
A container that groups multiple labeled field views in a horizontal layout.
This view is designed to organize related fields together, managing their layout and providing consistent label widths across the group. It's particularly useful for creating forms with multiple related inputs on the same line.
Type Parameters
T: The type of labeled field views (must extend LabeledFieldView)U: The underlying field view type
Features
- Automatic layout management for grouped fields
- Consistent label width distribution
- Disabled state synchronization
- Responsive width allocation
Usage Example
// Create a group of coordinate fields
var xField = new LabeledFieldView(new TextFieldView(), "X:");
var yField = new LabeledFieldView(new TextFieldView(), "Y:");
var zField = new LabeledFieldView(new TextFieldView(), "Z:");
var coordGroup = new LabeledFieldGroupView([xField, yField, zField]);
coordGroup.label = "Position";
Instance Members
Default is false, automatically set to true when any of this instance's observable variables has changed.
The label text for the entire field group. Can be used to describe the purpose of the grouped fields.
Whether all fields in the group are disabled. Automatically computed based on individual field states.
The array of labeled field views in this group. Setting this property triggers layout recalculation.
Creates a new labeled field group view.
| Name | Type | Description |
|---|---|---|
fields |
Array<elements.LabeledFieldGroupView.T> | Array of labeled field views to group together |
Private Members
emitObservedDirty(instance: LabeledFieldGroupView<elements.LabeledFieldGroupView.T, elements.LabeledFieldGroupView.U>, fromSerializedField: Bool): VoidEvent when any observable value as changed on this instance.
| Name | Type |
|---|---|
instance |
LabeledFieldGroupView<elements.LabeledFieldGroupView.T, elements.LabeledFieldGroupView.U> |
fromSerializedField |
Bool |
Event when label field changes.
| Name | Type |
|---|---|
current |
String |
previous |
String |
Event when disabled field changes.
| Name | Type |
|---|---|
current |
Bool |
previous |
Bool |
Performs custom layout to ensure consistent label widths across fields. The first field gets a different label width than subsequent fields to maintain visual alignment.
Updates the disabled state by checking all child fields. The group is considered disabled only if all fields are disabled.
Updates the visual style of the group. Currently commented out but can be used to apply themed styling.
Metadata
| Name | Parameters |
|---|---|
:hxGen |
- |
:build |
tracker.macros.ObservableMacro.build() |
:autoBuild |
tracker.macros.ObservableMacro.build() |
:build |
tracker.macros.EventsMacro.build() |
:autoBuild |
tracker.macros.EventsMacro.build() |
:build |
ceramic.macros.EntityMacro.buildForCompletion() |
:autoBuild |
ceramic.macros.EntityMacro.buildForCompletion() |