txt_parse

Function txt_parse 

Source
pub fn txt_parse<T>(child: impl IntoUiNode, value: impl IntoVar<T>) -> UiNode
where T: TxtParseValue,
Expand description

P Value that is parsed from the text and displayed as the text.

This is an alternative to txt that converts to and from T if it can be formatted to display text and can parse, with parse error that can display.

If the parse operation fails the value variable is not updated and the error display text is set in DATA.invalidate, you can use has_data_error and get_data_error_txt to display the error.

See also txt_parse_live for manually controlling when parse happens.

See also txt_parse_on_stop for only parsing when the user stops typing.