TextField

public class TextField : View

Single-line text entry View

This view provides line-editing and mouse support

  • Indicates whether the user has used this control since it was created

    Declaration

    Swift

    public var used: Bool
  • If set to true its not allow any changes in the text.

    Declaration

    Swift

    public var readOnly: Bool
  • The contents of the text field Changed event, raised when the text has changed as a Combine Subject The parameter contains the source that is raising the event, along with the old value that was on the TextField, for a simple event, use textChanged

    Declaration

    Swift

    public var textChangedSubject: PassthroughSubject<(source: TextField, oldText: String), Never>
  • Changed event that is triggered when the text changes, and provides the old text, for a Combine version of this event, use textChangedSubject

    Declaration

    Swift

    public var textChanged: ((_ source: TextField, _ oldText: String) -> ())?
  • Sets or gets the text held by the view.

    Declaration

    Swift

    public var text: String { get set }
  • If set, the contents of the entry are masked, used for passwords for example.

    Declaration

    Swift

    public var secret: Bool { get set }
  • Sets or gets the current cursor position.

    Declaration

    Swift

    public var cursorPosition: Int { get set }
  • Initializes the TextField, with the optional initial text

    Declaration

    Swift

    public init(_ initial: String = "")
  • Undocumented

    Declaration

    Swift

    public override func resignFirstResponder() -> Bool
  • Declaration

    Swift

    public override var frame: Rect { get set }
  • Declaration

    Swift

    public override func redraw(region: Rect, painter p: Painter)
  • Declaration

    Swift

    public override func processKey(event: KeyEvent) -> Bool
  • Declaration

    Swift

    public override func positionCursor()
  • Declaration

    Swift

    public override func mouseEvent(event: MouseEvent) -> Bool
  • Undocumented

    Declaration

    Swift

    public override var debugDescription: String { get }