Class TextField
Assembly: Ritchie.Toolbox.dll
Syntax
public sealed class TextField : Widget, IFontFamilyProvider, IInspectable, IUpdateThemeProperties, IGainFocusHandler, ILoseFocusHandler, IMouseClickHandler, IMouseHandler, IKeyCharHandler, IKeyDownHandler, IVisual<TextField.VisualState>
Constructors
TextField()
Declaration
Properties
HasSelection
Declaration
public bool HasSelection { get; }
Property Value
Placeholder
Declaration
public string Placeholder { get; set; }
Property Value
SelectAllOnFocus
Declaration
public bool SelectAllOnFocus { get; set; }
Property Value
UsePasswordMask
Declaration
public bool UsePasswordMask { get; set; }
Property Value
Value
Declaration
public string Value { get; }
Property Value
VisualProperties
Gets a read-only reference to the visual properties associated with the widget.
Declaration
public ref readonly TextField.VisualState VisualProperties { get; }
Property Value
Methods
ArrangeChildren(IGuiContext, LayoutRect)
Declaration
protected override void ArrangeChildren(IGuiContext context, LayoutRect availableSpace)
Parameters
Overrides
BeforeRender()
Declaration
protected override void BeforeRender()
Overrides
DeleteSelectionIfAny()
Declaration
public bool DeleteSelectionIfAny()
Returns
DeselectAll()
Declaration
public void DeselectAll()
GetContentSize(Point)
Declaration
protected override Point GetContentSize(Point availableSize)
Parameters
Type |
Name |
Description |
Point |
availableSize |
|
Returns
Overrides
GetSelectionText()
Declaration
public string GetSelectionText()
Returns
OnFocusGained(FocusEvent)
Declaration
public void OnFocusGained(FocusEvent e)
Parameters
OnFocusLost(FocusEvent)
Declaration
public void OnFocusLost(FocusEvent e)
Parameters
OnKeyChar(KeyCharEvent)
Declaration
public void OnKeyChar(KeyCharEvent e)
Parameters
OnKeyDown(KeyEvent)
Declaration
public void OnKeyDown(KeyEvent e)
Parameters
OnMouseClick(MouseButtonEvent)
Declaration
public void OnMouseClick(MouseButtonEvent e)
Parameters
RebuildClippingZone(GeometryHelper)
Declaration
protected override void RebuildClippingZone(GeometryHelper geometry)
Parameters
Overrides
RebuildGeometry(GeometryHelper)
Declaration
protected override void RebuildGeometry(GeometryHelper geometry)
Parameters
Overrides
SelectAll()
Declaration
SetValue(string)
Declaration
public void SetValue(string newValue)
Parameters
Type |
Name |
Description |
string |
newValue |
|
UpdateThemeProperties()
Retrieves layout properties from the visual style. Called by the UI system on every
frame before layout updates occur. If layout properties change during this method call,
the widget will automatically invalidate its own layout.
Declaration
public void UpdateThemeProperties()
Events
OnSubmit
Declaration
public event Action<string>? OnSubmit
Event Type
OnValueChanged
Declaration
public event Action<string>? OnValueChanged
Event Type
Implements
Extension Methods