WEBRAD / TECHNICAL REFERENCE
Progress Bar
Linear or circular progress with a range, value, and calculated percentage.
WebProgressBarStandardVisual2 events
Quick start
Add ProgressBar1 in the Designer. Use the example in a page method.
ProgressBar1.setRange(0, 200);
ProgressBar1.value = 50;
ProgressBar1.showValue = true;
ProgressBar1.increment(10);
Message(ProgressBar1.percentage);
// ProgressBar1.reset();- format accepts bars (bar), dunnet (ring), and circus (circle).
- setRange(min, max) sets the range; value sets progress. percentage is calculated.
- showValue displays the percentage; increment() advances and reset() returns to the minimum.
More examples
All formats
import type { WebProgressBarFormat } from '@webrad/runtime';
const formats: readonly WebProgressBarFormat[] = ['bars', 'dunnet', 'circus'];
ProgressBar1.format = formats[1] ?? 'dunnet'; // Ring; bars = bar, circus = circle.
ProgressBar1.setRange(0, 100);
ProgressBar1.value = 65;
ProgressBar1.showValue = true;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 & position | number | 28 | height |
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 sizeFit content grows the item to its lowest rendered child and preserves child intrinsic heights; minimum and maximum height remain limits. | enumfixed stretch fit-content | "fixed" | Inspector / configuration |
itemMinWidthMinimum width · Responsive size | number | 0 | Inspector / configuration |
itemMaxWidthMaximum width · Responsive size | number | null | Inspector / configuration |
itemMinHeightMinimum height · Responsive size | number | 0 | Inspector / configuration |
itemMaxHeightMaximum height · Responsive size | number | null | Inspector / configuration |
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 |
formatFormat · Appearancebars: horizontal bar; dunnet: donut ring; circus: filled circle. | enumbars dunnet circus | "bars" | format |
minMinimum · ProgressFinite progress value. Maximum must exceed minimum; the displayed value is clamped to the range. | number | 0 | min |
maxMaximum · ProgressFinite progress value. Maximum must exceed minimum; the displayed value is clamped to the range. | number | 100 | max |
valueValue · ProgressFinite progress value. Maximum must exceed minimum; the displayed value is clamped to the range. | number | 50 | value |
showValueShow percentage · Appearance | boolean | true | showValue |
currentRowBindingsCurrent row · DataBind writable visual values to fields of this repeated row. | current-row-bindingsEditor: current-row-bindings | [] | currentRowBindings |
API in code
| Member | Signature | Access |
|---|---|---|
value | value: number; | Read and write |
min | min: number; | Read and write |
max | max: number; | Read and write |
format | format: WebProgressBarFormat; | Read and write |
showValue | showValue: boolean; | Read and write |
percentage | readonly percentage: number; | Read-only |
onChange | set onChange(handler: WebComponentEventHandler<this> | null); | Read and write |
setRange
methodsetRange(min: number, max: number): void;Example
ProgressBar1.setRange(0, 100);increment
methodincrement(amount?: number): void;Example
ProgressBar1.increment(5);reset
methodreset(): void;Example
ProgressBar1.reset();Inherited members (27)
| Member | Signature | Access |
|---|---|---|
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.
OnChange
Standard event (Event).
Signature and example
import type { WebProgressBar } from '@webrad/runtime';
// Copy this method into the page class and link it in Interaction.
class Example {
public async ProgressBar1Change(
sender: WebProgressBar,
event: Event,
): Promise<void> {
console.log(sender.name, event.type);
}
}OnClick
Standard event (Event).
Signature and example
import type { WebProgressBar } from '@webrad/runtime';
// Copy this method into the page class and link it in Interaction.
class Example {
public async ProgressBar1Click(
sender: WebProgressBar,
event: Event,
): Promise<void> {
console.log(sender.name, event.type);
}
}