WxTextCtrl class

Creates a single-line or multi-line text field.

Events emitted

Text event gets sent when the user enters text.
void bindTextEvent( void function( WxCommandEvent event ) )
void unbindTextEvent()
TextEnter event gets sent when hits enter and the wxTE_PROCESS_ENTER style is used.
void bindTextEnterEvent( void function( WxCommandEvent event ) )
void unbindTextEnterEvent()

Window styles

constant value (meaning)
wxTE_READONLY 0x0010 (Contents cannot be editted)
wxTE_MULTILINE 0x0020 (Allow multiple lines)
wxTE_PROCESS_TAB 0x0040 (Catch and process TAB)
wxTE_PROCESS_ENTER 0x0400 (Catch and process ENTER)
wxTE_PASSWORD 0x0800 (Hide content visually)
Inheritance

Constructors

WxTextCtrl(WxWindow parent, int id, {String value = "", WxPoint pos = wxDefaultPosition, WxSize size = wxDefaultSize, int style = 0})
Creates the control

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

acceptsFocus() bool
Not implemented in wxDart yet
inherited
acceptsFocusFromKeyboard() bool
Not implemented in wxDart yet
inherited
addChild(WxWindow child) → void
Adds child to the list of child windows of this window
inherited
appendText(String text) → void
Append text to end of current text
inherited
canCopy() bool
Returns true if text can be copied to the clipboard.
inherited
canCut() bool
Returns true if text can be copied to the clipboard and the cut.
inherited
canPaste() bool
Returns true if text can be pasted from the clipboard.
inherited
canRedo() bool
Returns true if re-do operation is currently available
inherited
canUndo() bool
Returns true if undo operation is currently available
inherited
captureMouse() → void
Captures mouse
inherited
changeValue(String text) → void
Same as setValue
inherited
clear() → void
Clears the control
inherited
copy() → void
Copies the selection to the clipboard
inherited
cut() → void
Cuts the selection and copies it to the clipboard
inherited
destroy() bool
Delete this window and remove it from the parent's child window list
inherited
destroyChildren() bool
Delete all child windows
inherited
disable() → void
Disables the control (usually turn it grey)
inherited
dispose() → void
Destroys the C++ wxObject instance in wxDart Native
inherited
enable({bool enable = true}) → void
Enables the control (usually the default)
inherited
enableTouchEvents(int eventsMask) → void
Enable generation of gesture events
inherited
findWindow(int id) WxWindow?
Returns window with given id or null if not found
inherited
freeze() → void
Stops updates to this window if a batch of updates occur
inherited
fromDIP(int x) int
Apply the current DPI scale factor to x
inherited
getBackgroundColour() WxColour
Returns background colour
inherited
getBackgroundStyle() int
Returns background style
inherited
getChildren() List<WxWindow>
Returns the list of child window of this window
inherited
getClientAreaOrigin() WxPoint
Returns client area origin relative to window origin
inherited
getClientRect() WxRect
Returns rectangle of window's client area
inherited
getClientSize() WxSize
Returns window size minus border and scrollbar size, of present
inherited
getCursor() WxCursor?
Returns current cursor or null, if default one is used
inherited
getDeviceOffsetX() int
Returns the x device offset relevant for scrolling
inherited
getDeviceOffsetY() int
Returns the x device offset relevant for scrolling
inherited
getDPIScaleFactor() double
Returns the current DPI scale factor. This is 1.0 on normal screens and a value between 1.25 and 2.0 on larger screens (maybe more).
inherited
getForegroundColour() WxColour
Returns foreground colour
inherited
getHint() String
Returns current hint of the control
inherited
getId() int
Returns ID of the window
inherited
getInsertionPoint() int
Returns position of insertion point (cursor)
inherited
getLineLength(int lineNo) int
Returns the length of the line at position lineNo
getLineText(int lineNo) String
Returns the line at position lineNo
getMinSize() WxSize
Returns minimal size as determined by the system and/or the initial size
inherited
getNumberOfLines() int
Returns the number of lines of text
getParent() WxWindow?
Returns the parent of this window, or null, if this window does not have a parent window (only possible toplevel windows)
inherited
getPosition() WxPoint
Returns current position relative to parent window
inherited
getSize() WxSize
Returns the current actual size, if known aleady
inherited
getSizer() WxSizer?
Returns the WxSizer currently associated with this window, or null
inherited
getStringSelection() String
Returns current selection
inherited
getTextExtent(String text) WxSize
Returns the size if text when using the current font
inherited
getUpdateClientRect() WxRect
Returns the area of the window that needs to get updated during a paint event handler. This will often return the entire client area.
inherited
getValue() String
Returns value of the text field
inherited
getVirtualSize() WxSize
Returns the virtual size set by a scrolled window or the client size which ever is bigger
inherited
getWindowStyle() int
Returns window style/flag
inherited
getWindowStyleFlag() int
Returns window style/flag
inherited
hasCapture() bool
Returns true if mouse is being captured
inherited
hasFlag(int flag) bool
Returns true if the window style/flag was set
inherited
hasFocus() bool
Returns true if the window currently has the keyboard focus
inherited
hide() → void
Hide window
inherited
invalidateBestSize() → void
Instructs control to recalculate its best size
inherited
isEditable() bool
Returns true if control is currently editable
inherited
isEmpty() bool
Returns true if control is empty.
inherited
isEnabled() bool
Returns true if enabled
inherited
isFocusable() bool
Not implemented in wxDart yet
inherited
isFrozen() bool
Returns true if window doesn't update while in a batch of smaller updates
inherited
isModified() bool
Returns true if modified by the user after a call to setValue
isMultiLine() bool
Returns true if this is multi-lien text control
isRetained() bool
Returns true if window uses a backing store (double buffering against flicker)
inherited
isShown() bool
Returns true if not hidden.
inherited
layout() → void
If any WxSizer has been associated with this window, perform a layout.
inherited
lower() → void
Brings window to the back (among its window siblings)
inherited
markDirty() → void
Marks the content as modified
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onInternalIdle() → void
Used internally in parallel to WxIdleEvents.
inherited
paste() → void
Paste from clipboard and replaces the current selection with it
inherited
popupMenu(WxMenu menu, {WxPoint pos = wxDefaultPosition}) Future<bool>
Shows a popup menu at the given pos or next to the mouse cursor. The menu entries will be updated using a WxUpdateUIEvent event before showing the actual menu.
inherited
printChildren() → void
inherited
printName() → void
Prints the name of the Dart class in wxDart Flutter and the name of the C++ class in wxDart Native
inherited
processEvent(WxEvent event) bool
Central place for all event processing. Once an event has been created by the system or a user event from any new code, it needs to be processed by this function in the respective window (or other class deriving from WxEvtHandler.
inherited
raise() → void
Brings window to the front (among its window siblings)
inherited
redo() → void
inherited
refresh() → void
Refreshes window. If a batch of updates is happening, you may want to freeze and then thaw the window.
inherited
releaseMouse() → void
Releases mouse capture
inherited
remove(int from, int to) → void
Removes specified text
inherited
removeChild(WxWindow child) → void
Removes the child window from the list of child windows of this window
inherited
replace(int from, int to, String value) → void
Replaces specified text with value
inherited
scrollWindow(int dx, int dy) → void
inherited
selectAll() → void
Selects all text
inherited
selectNone() → void
Resets selection (stop selecting anything)
inherited
setBackgroundColour(WxColour col) → void
Set the background colour of the window or control. This can have different meaning in different controls.
inherited
setBackgroundStyle(int style) → void
Currently, wxDart sets these flags itself in the background so this is for information only. In wxDart the background is always drawn into the window buffer. You can paint over it, e.g. with a gradient or pure white.
inherited
setCursor(WxCursor? cursor) → void
Sets the window to have the cursor or fall back to the default one
inherited
setEditable(bool editable) → void
inherited
setFocus() → void
Tries to set the focus to this window/control
inherited
setFont(WxFont? font) → void
Sets the font of the window. This can have different effects in different controls. Be careful with different default font sizes on different platforms.
inherited
setForegroundColour(WxColour col) → void
Set the foreground colour of the window or control. This can have different meaning in different controls.
inherited
setHint(String hint) → void
Set hint of the text control, of supported
inherited
setId(int id) → void
Sets the ID of the window
inherited
setInsertionPoint(int pos) → void
Sets position of insertion point (cursor)
inherited
setInsertionPointEnd() → void
Moves position of insertion point (cursor) to the end of the text
inherited
setMaxLength(int len) → void
Set maximum length to len. Default is infinite.
inherited
setPosition(WxPoint pos) → void
Sets current position relative to parent window
inherited
setSelection(int from, int to) → void
Set selection as specified
inherited
setSize(WxSize size) → void
Set the size if the controls
inherited
setSizer(WxSizer sizer) → void
Associate sizer with this window
inherited
setSizerAndFit(WxSizer sizer) → void
Associate sizer with this window and resize it to make it fit the minimal constraints of it. Under wxDart Flutter, the fitting is automatically achieved by the Flutter layout mechanism.
inherited
setValue(String value) → void
Set the content of the control and marks it as not modified
override
setVirtualSize(WxSize size) → void
Sets the virtual size of the client area in a scrolled window
inherited
setWindowStyle(int style) → void
Same as setWindowStyleFlag
inherited
setWindowStyleFlag(int style) → void
Sets window style/flag. Many style can only be created in the constructor of a control and have no effect when set later.
inherited
show({bool show = true}) → void
Show or hide window (depending on show)
inherited
sizeFromDIP(WxSize size) WxSize
Apply the current DPI scale factor to size
inherited
thaw() → void
Updates window at the end of a batch of updates occur
inherited
toString() String
A string representation of this object.
inherited
undo() → void
inherited
useBackgroundColour() bool
Returns true if a specific, non-default, foreground colour has been specified.
inherited
useForegroundColour() bool
Returns true if a specific, non-default, foreground colour has been specified.
inherited
writeText(String text) → void
Add text at current insertion point
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited