Dataentries Widgets
NumberEntry
viewable NumberEntry
A entry for entering floating point numbers.
Fields
value: floatcurrent: floatonlyStatetext: stringonlyStateconsistent: bool = trueonlyStateeps: float = 0.000001placeholder: stringwidth: int = -1maxWidth: int = -1xAlign: float = 0.0tooltip: string = ""sizeRequest: tuple[x, y: int] = (-1, -1)sensitive: bool = true
Events
- changed:
proc (value: float)
Example
NumberEntry:
value = app.value
proc changed(value: float) =
app.value = value
FormulaEntry
viewable FormulaEntry of NumberEntry
A entry for entering floating point numbers.
The FormulaEntry can evaluate mathematical expressions like 1 + 2 * 3.
Fields
- All fields from NumberEntry
vars: Table[string, float]Variables that may be used in the expression
Example
FormulaEntry:
value = app.value
vars = toTable({"pi": PI})
proc changed(value: float) =
app.value = value