WklStatusLabel
WklStatusLabel shows a status in one line - a text with a kind (neutral, ok, warn, bad, info)
that sets its colors, as a pill, a dot or a symbol before the text, with an optional caption. It
is bound like a text box and draws the same pills as the status column of WklGrid.
Get started
Common tasks
- How to: Format cells conditionally for colors in lists
Visual aid
+- frmServices: Form view ---------------------------------------------+ | Service ( > Running ) 1 | | Stock * Stopped 2 | | Sync (!) Down ... 3 | +----------------------------------------------------------------------+
| Region | Meaning |
|---|---|
| 1 | Pill display (wsdPill) with the caption „Service“, a symbol and the kind „ok“ (green) |
| 2 | Dot display (wsdDot), kind „neutral“ (gray) |
| 3 | Symbol display (wsdSymbol), kind „bad“ (red), pulsing with „ …“ while Busy is True |
Key features
- Bound through the Control Source: Access writes the field or expression of the current record into
Value; entries (AddStatusItem) turn values into text, kind and symbol,KindFieldreads the kind from another field,FormatandNullTextformat the rest. - Unbound:
Text,KindandGlyphset in the property sheet or by code. - Designer (row Custom
[...]): status with preview, entries as a table, format, appearance and behavior. - Three displays (
Display) and a busy pulse (Busy) that stays still when Windows animations are off. - Text always, color never alone; high contrast respected.
- Screen readers hear caption, text and kind, and every change (
Announce); withClickablethe label is a link and raisesClick.
Core concepts
A meaning, not a color. A value names a kind, and the kind decides the colors, from the
palette shared with WklGrid, WklButton, WklNavBar and WklBadge. The designed Kind and
Glyph are the fallback for values without an entry, so a record never keeps the colors of the
record before it.
Read-only. A bound label never writes back and never makes the record dirty; an expression as Control Source works.
Where it can stand. Single forms, form headers and footers, UserForms; not the detail section
of a continuous form (one instance only, and a bound one kept Access from opening the form). A
status per record belongs into a status column of WklGrid.
Administration
Troubleshooting
For developers
Related topics
- WklGrid overview: status columns (
wedStatus)