WapLookupBox class

A lookup drop-down (WML <input lookup> / <item lookup>).

The list comes from dataSet + keyField + displayFields, or from fixed lookupItems / lookupColumns. Typing filters the list; picking an item calls onPicked (WML oncloseup).

Inheritance

Constructors

WapLookupBox({Key? key, required String value, double width = 130, double height = 28, bool readOnly = false, Map<String, String>? lookupItems, Map<String, List<String>>? lookupColumns, TSQLQuery? dataSet, String? keyField, List<String>? displayFields, List<double> colWidths = const [], ValueChanged<String>? onChanged, bool forGrid = false, VoidCallback? onTab, VoidCallback? onTabPrev, TextStyle? textStyle, String? tapRegionGroupId, bool autofocus = false, ValueChanged<String>? onPicked})
Creates a lookup box showing value.
const

Properties

autofocus → bool
Auto-focus when opened (used when a DBGrid Tab enters this cell)
final
colWidths → List<double>
Per-column width (px) for the multi-column case
final
dataSet → TSQLQuery?
Dataset-driven (alternative to lookupColumns): pass the dataset + key field + display fields directly, and WapLookupBox calls dataSet.lookupMap(keyField, displayFields) itself to compute the list. Corresponds to Delphi's TDBLookupComboBox.ListSource/KeyField/ListField.
final
displayFields → List<String>?
Fields of dataSet shown as the list's columns.
final
forGrid → bool
true → DBGrid cell mode: no border, Enter/Tab keyboard handling enabled
final
hashCode → int
The hash code for this object.
no setterinherited
height → double
Height (defaults to 28 for standalone fields; fills the cell when forGrid)
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyField → String?
Field of dataSet that holds the code written back to value.
final
lookupColumns → Map<String, List<String>>?
Multi-column lookup: key → col1, col2, ...
final
lookupItems → Map<String, String>?
Single-column lookup: key → display string
final
onChanged → ValueChanged<String>?
Callback on selection or fill-back on blur (passes the key)
final
onPicked → ValueChanged<String>?
Callback when a dropdown item is picked (distinct from onChanged: onChanged = typing, onPicked = picking from the list)
final
onTab → VoidCallback?
DBGrid cell: Tab → next cell
final
onTabPrev → VoidCallback?
DBGrid cell: Shift+Tab → previous cell
final
readOnly → bool
Read-only (locked while a standalone field is not in edit state)
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tapRegionGroupId → String?
TextFieldTapRegion group id (standalone fields can share one, to avoid taps on one blurring another)
final
textStyle → TextStyle?
Text style (a DBGrid cell can pass a style matching the rest of the table)
final
value → String
Current value (key)
final
width → double
Field width (for standalone fields; ignored and filled to the cell when forGrid=true)
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<WapLookupBox>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited