monomer-1.0.0.0: A GUI library for writing native Haskell applications.
Copyright(c) 2018 Francisco Vallarino
LicenseBSD-3-Clause (see the LICENSE file)
Maintainerfjvallarino@gmail.com
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Monomer.Widgets.Singles.TextField

Description

Input field for single line Text.

Configs:

  • validInput: field indicating if the current input is valid. Useful to show warnings in the UI, or disable buttons if needed.
  • resizeOnChange: Whether input causes ResizeWidgets requests.
  • selectOnFocus: Whether all input should be selected when focus is received.
  • maxLength: the maximum length of input text.
  • textFieldDisplayChar: the character that will be displayed as replacement of the real text. Useful for password fields.
  • onFocus: event to raise when focus is received.
  • onFocusReq: WidgetRequest to generate when focus is received.
  • onBlur: event to raise when focus is lost.
  • onBlurReq: WidgetRequest to generate when focus is lost.
  • onChange: event to raise when the value changes.
  • onChangeReq: WidgetRequest to generate when the value changes.
Synopsis

Documentation

textFieldDisplayChar :: Char -> TextFieldCfg s e Source #

Replacement character to show instead of real text. Useful for passwords.

textField :: WidgetEvent e => ALens' s Text -> WidgetNode s e Source #

Creates a text field using the given lens.

textField_ :: WidgetEvent e => ALens' s Text -> [TextFieldCfg s e] -> WidgetNode s e Source #

Creates a text field using the given lens. Accepts config.

textFieldV :: WidgetEvent e => Text -> (Text -> e) -> WidgetNode s e Source #

Creates a text field using the given value and onChange event handler.

textFieldV_ :: WidgetEvent e => Text -> (Text -> e) -> [TextFieldCfg s e] -> WidgetNode s e Source #

Creates a text field using the given value and onChange event handler. Accepts config.

textFieldD_ :: WidgetEvent e => WidgetData s Text -> [TextFieldCfg s e] -> WidgetNode s e Source #

Creates a text field providing a WidgetData instance and config.