WEBRAD / TECHNICAL REFERENCE
Group
Transparent container for arranging components and layout.
WebGroupContainersVisual4 events
Quick start
Add Group1 in the Designer. Use the example in a page method.
Group1.margin = 16;
Group1.marginTop = 8;
Group1.alignSelf = 'stretch';
Group1.visible = true;
Group1.collapseWhenHidden = true;
Group1.show();- Group components that should share layout, dimensions, or visibility.
- Choose Fixed, Align to parent, Row, or Column to arrange children.
- collapseWhenHidden removes occupied space when visible = false.
Inspector properties
Component options and defaults. Fields without runtime access are configured in the Inspector.
| Property / source | Type and options | Default | Runtime access |
|---|---|---|---|
nameName · Identity | string | — | name |
xLeft · Size & position | number | 0 | x |
yTop · Size & position | number | 0 | y |
widthWidth · Size & position | number | 240 | width |
heightHeight · Size & positionA fixed aspect ratio derives height from width. Choose none to edit the saved height rules. | number | 160 | heightConditional availability in the Inspector |
itemWidthResponsive width · Responsive sizeFit content grows the item to its widest rendered child and preserves child intrinsic widths; minimum and maximum width remain limits. | enumfixed stretch fit-content | "fixed" | Inspector / configuration |
itemHeightResponsive height · Responsive sizeA fixed aspect ratio derives height from width. Choose none to edit the saved height rules. | enumfixed stretch fit-content | "fixed" | Inspector / configurationConditional availability in the Inspector |
itemMinWidthMinimum width · Responsive size | number | 0 | Inspector / configuration |
itemMaxWidthMaximum width · Responsive size | number | null | Inspector / configuration |
itemMinHeightMinimum height · Responsive sizeA fixed aspect ratio derives height from width. Choose none to edit the saved height rules. | number | 0 | Inspector / configurationConditional availability in the Inspector |
itemMaxHeightMaximum height · Responsive sizeA fixed aspect ratio derives height from width. Choose none to edit the saved height rules. | number | null | Inspector / configurationConditional availability in the Inspector |
itemGrowGrow · Responsive size | number | 0 | Inspector / configuration |
itemShrinkShrink · Responsive sizeAllows fixed and stretch flow items to yield space. Fit-content keeps its intrinsic size so its children are not compressed. | boolean | true | Inspector / configuration |
itemAlignSelfItem alignment · Responsive sizeCross-axis alignment for this item in a row or column. Auto inherits the parent alignment; responsive cross-axis stretch retains its sizing behavior. | enumauto start center end stretch | "auto" | Inspector / configuration |
itemHorizontalAnchorHorizontal anchor · Anchors & offsets | enumstart center end stretch | "start" | Inspector / configuration |
itemVerticalAnchorVertical anchor · Anchors & offsets | enumstart center end stretch | "start" | Inspector / configuration |
itemLeftLeft inset · Anchors & offsets | number | 0 | Inspector / configuration |
itemRightRight inset · Anchors & offsets | number | 0 | Inspector / configuration |
itemTopTop inset · Anchors & offsets | number | 0 | Inspector / configuration |
itemBottomBottom inset · Anchors & offsets | number | 0 | Inspector / configuration |
marginMargin · SpacingOuter spacing on all four sides, in pixels. Row and column layouts include this spacing between components. | number | 0 | margin |
marginTopMargin top · SpacingOuter spacing on this side, in pixels. Overrides the shared Margin value. | number | 0Derived from saved properties | marginTop |
marginRightMargin right · SpacingOuter spacing on this side, in pixels. Overrides the shared Margin value. | number | 0Derived from saved properties | marginRight |
marginBottomMargin bottom · SpacingOuter spacing on this side, in pixels. Overrides the shared Margin value. | number | 0Derived from saved properties | marginBottom |
marginLeftMargin left · SpacingOuter spacing on this side, in pixels. Overrides the shared Margin value. | number | 0Derived from saved properties | marginLeft |
visibleVisible · Behavior | boolean | true | visible |
enabledEnabled · Behavior | boolean | true | enabled |
aspectRatioAspect ratio · Size & positionnone allows free dimensions. A fixed ratio derives height from the responsive width. | enumnone 1:1 4:3 3:4 16:9 9:16 | "none" | aspectRatio |
containerModeContainer layout · Children layout | enumfixed align-to-parent row column | "fixed" | Inspector / configuration |
containerPaddingTopPadding top · Children layout | number | 0 | Inspector / configuration |
containerPaddingRightPadding right · Children layout | number | 0 | Inspector / configuration |
containerPaddingBottomPadding bottom · Children layout | number | 0 | Inspector / configuration |
containerPaddingLeftPadding left · Children layout | number | 0 | Inspector / configuration |
containerGapGap · Children layout | number | 0 | Inspector / configuration |
containerWrapWrap · Children layout | boolean | false | Inspector / configuration |
containerJustifyContentJustify content · Children layout | enumstart center end space-between space-around | "start" | Inspector / configuration |
containerAlignItemsDefault alignment · Children layoutDefault cross-axis alignment for children. Each child can override it with Item alignment. | enumstart center end stretch | "start" | Inspector / configuration |
currentRowBindingsCurrent row · DataBind writable visual values to fields of this repeated row. | current-row-bindingsEditor: current-row-bindings | [] | currentRowBindings |
API in code
Inherited members (41)
| Member | Signature | Access |
|---|---|---|
aspectRatio | aspectRatio: WebAspectRatio; | Read and write |
floatingAlignment | floatingAlignment: WebPanelFloatingAlignment; | Read and write |
placement | placement: 'in-flow' | 'floating'; | Read and write |
floatingHorizontalAnchor | floatingHorizontalAnchor: 'left' | 'center' | 'right'; | Read and write |
floatingVerticalAnchor | floatingVerticalAnchor: 'top' | 'center' | 'bottom'; | Read and write |
floatingZIndex | floatingZIndex: number; | Read and write |
caption | caption: string; | Read and write |
progressEnabled | progressEnabled: boolean; | Read and write |
progressValue | progressValue: number; | Read and write |
progressVisible | readonly progressVisible: boolean; | Read-only |
backgroundImage | backgroundImage: string; | Read and write |
backgroundSize | backgroundSize: WebPanelBackgroundSize; | Read and write |
backgroundPosition | backgroundPosition: WebPanelBackgroundPosition; | Read and write |
backgroundRepeat | backgroundRepeat: WebPanelBackgroundRepeat; | Read and write |
currentRowBindings | currentRowBindings: readonly WebCurrentRowBinding[]; | Read and write |
element | readonly element: TElement; | Read-only |
id | readonly id: string; | Read-only |
name | readonly name: string; | Read-only |
visible | visible: boolean; | Read and write |
enabled | enabled: boolean; | Read and write |
x | x: number; | Read and write |
y | y: number; | Read and write |
width | width: number; | Read and write |
height | height: number; | Read and write |
marginOuter spacing on all four sides, in pixels. | margin: number; | Read and write |
marginTop | marginTop: number; | Read and write |
marginRight | marginRight: number; | Read and write |
marginBottom | marginBottom: number; | Read and write |
marginLeft | marginLeft: number; | Read and write |
alignSelf | alignSelf: RuntimeLayoutAlignSelf; | Read and write |
tabIndex | tabIndex: number; | Read and write |
backgroundColor | backgroundColor: string; | Read and write |
color | color: string; | Read and write |
borderColor | borderColor: string; | Read and write |
focus
methodfocus(options?: FocusOptions): void;show
methodshow(): void;hide
methodhide(): void;bindEvent
methodbindEvent(eventName: string, handler: WebComponentEventHandler<this> | null): () => void;emit
methodemit(eventName: string, detail?: unknown): boolean;dispose
methoddispose(): void;Events
Link methods in Interaction. How to use events.
OnClick
Standard event (Event).
Signature and example
import type { WebGroup } from '@webrad/runtime';
// Copy this method into the page class and link it in Interaction.
class Example {
public async Group1Click(
sender: WebGroup,
event: Event,
): Promise<void> {
console.log(sender.name, event.type);
}
}OnDblClick
Standard event (Event).
Signature and example
import type { WebGroup } from '@webrad/runtime';
// Copy this method into the page class and link it in Interaction.
class Example {
public async Group1DblClick(
sender: WebGroup,
event: Event,
): Promise<void> {
console.log(sender.name, event.type);
}
}OnMouseEnter
Standard event (Event).
Signature and example
import type { WebGroup } from '@webrad/runtime';
// Copy this method into the page class and link it in Interaction.
class Example {
public async Group1MouseEnter(
sender: WebGroup,
event: Event,
): Promise<void> {
console.log(sender.name, event.type);
}
}OnMouseLeave
Standard event (Event).
Signature and example
import type { WebGroup } from '@webrad/runtime';
// Copy this method into the page class and link it in Interaction.
class Example {
public async Group1MouseLeave(
sender: WebGroup,
event: Event,
): Promise<void> {
console.log(sender.name, event.type);
}
}