-
Event fired whenever the text contents of this text field are updated.
This event is not raised if a client sets this text field’s
text
property directly.Declaration
Swift
@EventWithSender <TextField, TextFieldTextChangedEventArgs> public var textChanged: EventSource<SenderEventArgs<TextField, TextFieldTextChangedEventArgs>> { get }
-
Event fired whenever the caret for this text field changes position or selection range.
Declaration
Swift
@ValueChangedEventWithSender <TextField, Caret> public var caretChanged: EventSource<SenderEventArgs<TextField, ValueChangedEventArgs<Caret>>> { get }
-
Event fired whenever the user presses down the Enter key while
acceptsEnterKey
is true.Declaration
Swift
@EventWithSender <TextField, Void> public var enterKey: EventSource<SenderEventArgs<TextField, Void>> { get }
-
Undocumented
Declaration
Swift
open var textColor: Color { get set }
-
If true, when the enter key is pressed an
EnterKey
event is raised for this text field.Declaration
Swift
open var acceptsEnterKey: Bool
-
Whether to allow line breaks when pressing the enter key.
Declaration
Swift
open var allowLineBreaks: Bool
-
Gets or sets a value specifying whether the string contents of this
TextField
are editable.Declaration
Swift
open var editable: Bool { get set }
-
Gets or sets the text of this text field.
As keyboard input is received, this value is updated accordingly.
Declaration
Swift
open var text: String { get set }
-
An optional placeholder text which is printed when the text field’s contents are empty.
Declaration
Swift
open var placeholderText: String? { get set }
-
Gets or sets the horizontal text alignment for both the input text and placeholder labels
Declaration
Swift
open var horizontalTextAlignment: HorizontalTextAlignment { get set }
-
Gets or sets the caret position for this text field.
Declaration
Swift
open var caret: Caret { get set }
-
Undocumented
Declaration
Swift
open var contentInset: UIEdgeInsets { get set }
-
Gets the current active style for this text field.
Declaration
Swift
public private(set) var style: VisualStyle { get }
-
Declaration
Swift
open override var canBecomeFirstResponder: Bool { get }
-
Undocumented
Declaration
Swift
public override init()
-
Raises the
textChanged
eventDeclaration
Swift
open func onTextChanged()
-
Raises the
caretChanged
eventDeclaration
Swift
open func onCaretChanged(_ event: ValueChangedEventArgs<Caret>)
-
Declaration
Swift
open override func onResize(_ event: ValueChangedEventArgs<UISize>)
-
Declaration
Swift
open override func onStateChanged(_ event: ValueChangedEventArgs<ControlViewState>)
-
Sets the visual style of this text field when it’s under a given view state.
Declaration
Swift
open func setStyle(_ style: VisualStyle, forState state: ControlViewState)
-
Removes the special style for a given control view state.
Note that
ControlViewState.normal
styles are the default styles and cannot be removed.Declaration
Swift
open func removeStyle(forState state: ControlViewState)
-
Gets the visual style for a given state.
If no custom visual style is specified for the state, the normal state style is returned instead.
Declaration
Swift
open func getStyle(forState state: ControlViewState) -> VisualStyle
-
Declaration
Swift
open override func onMouseDown(_ event: MouseEventArgs)
-
Declaration
Swift
open override func onMouseEnter()
-
Declaration
Swift
open override func onMouseLeave()
-
Declaration
Swift
open override func onMouseMove(_ event: MouseEventArgs)
-
Declaration
Swift
open override func onMouseUp(_ event: MouseEventArgs)
-
Declaration
Swift
open override func onKeyDown(_ event: KeyEventArgs)
-
Declaration
Swift
open override func onKeyPress(_ event: KeyPressEventArgs)
-
Declaration
Swift
open override func renderBackground(in renderer: Renderer, screenRegion: ClipRegionType)
-
Declaration
Swift
open override func renderForeground(in renderer: Renderer, screenRegion: ClipRegionType)
-
Declaration
Swift
open override func canHandle(_ eventRequest: EventRequest) -> Bool
-
Declaration
Swift
open override func becomeFirstResponder() -> Bool
-
Declaration
Swift
open override func resignFirstResponder()
-
Declaration
Swift
open override func performLayout()
-
Selects the entire text available on this text field
Declaration
Swift
public func selectAll()
-
Clears all undo/redo history for this text field.
Declaration
Swift
public func clearUndo()
-
Updates the text buffer to a specified string while recording an undo for the action.
To the text engine, this is essentially the same as selecting all text and replacing with the given string.
Declaration
Swift
public func setTextWithUndo(_ empty: String)
-
Defines the keys and modifiers to listen, based on OS-settings.
See moreDeclaration
Swift
enum KeyMap
-
Specifies the presentation style for a text field.
Used to specify separate visual styles depending on the first-responding state of the text field.
See moreDeclaration
Swift
struct VisualStyle