CustomEdit¶
Qualified name: delphifmx.CustomEdit
- class CustomEdit¶
Bases:
StyledControl
TCustomEdit is the base class from which all FireMonkey edit boxes and memo controls are derived. TCustomEdit encapsulates the behavior common to all components for editing text by introducing methods and properties that provide:
Basic text editing functions such as selecting text, modifying selected text, and case conversions. Ability to respond to changes in the contents of the text. Access control of the text for making it read-only or introducing a password character to hide the actual value. When not in focus, TCustomEdit does not draw a selection rectangle even though the user has selected the text. You can verify whether the text is selected by using the SelText property. Do not create instances of TCustomEdit. Use TCustomEdit as a base class when declaring control objects that permit the user to enter or modify text. Properties and methods of TCustomEdit provide basic behavior that descendant classes inherit, as well as behavior that components can override to customize their behavior.
Methods
Gets and applies the style of a TStyledControl.
Applies the specified mouse trigger effect to all the children of this FMX object that are of type TEffect.
Performs any necessary actions before the first destructor is called.
Copies the selected text in the edit control to the Clipboard, in plain text format.
Copies the selected text to the Clipboard, in plain text format, and then deletes the selection.
Removes the selected text from the edit control.
Finds the linked resource object for the style specified by name.
Moves the cursor to the beginning of the text in the edit control.
Moves the cursor to the end of the text in the edit control.
Returns true if any selection exists in the edit box, false otherwise.
Call this procedure to get and apply its style lookup.
Call this procedure to indicate that this control requires to get and apply its style lookup.
Pastes the plain text contents of the Clipboard text into the edit control.
Checks whether the point specified by local coordinates belongs to the control area.
Forces the current control to recalculate its enabled state.
Forces the current control to recalculate its Opacity property.
Embarcadero Technologies does not currently have any additional information.
Resets the selection from an edit box.
Selects all the characters of the displayed Text at once.
SelectWord assigns to the FMX.Edit.TCustomEdit.SelLength property the length of the first word found if this exists.
Embarcadero Technologies does not currently have any additional information.
Embarcadero Technologies does not currently have any additional information.
Attributes
AbsoluteClipRect
Specifies the absolute rectangle of the control after all its parent controls clip it.
AbsoluteEnabled
Specifies whether the control is absolutely enabled.
AbsoluteHeight
Specifies the absolute height of the control.
AbsoluteMatrix
Specifies the absolute transformation matrix of the control.
AbsoluteOpacity
Specifies the absolute opacity of the control.
AbsoluteRect
Specifies the absolute rectangle that bounds the control.
AbsoluteScale
Specifies the absolute scale of the control.
AbsoluteWidth
Specifies the absolute width of the control.
ActionClient
Specifies whether the component object has an associated action.
Updates the width and height of this control according to its current style
Determines if and how the width and height of this control should be modified to take the fixed space dictated by the style of this control
Specifies the alignment options (top, left, client, and so on) of this control.
Specifies how the control is anchored to its parent.
ApplyingEffect
A flag that signals when a control is in the process of applying an effect.
AutoCapture
Specifies whether the control captures mouse events.
bool:
Specifies whether the control's text should be translated
AxisAlignedRect
A TRectF defined by the width and height of the control.
BoundsRect
Specifies the bounding rectangle of the control.
Returns the control that contains the edit buttons associated with the edit control.
CanParentFocus
Specifies whether the parent of this control should be evaluated to receive focus.
Canvas
Provides the drawing surface of the control.
Represents the caret of the control.
Provides access to the caret position in this edit control.
It defines whether to implement the UPPER or lower case conversion to the memo's text.
Defines whether the spell-checking feature of the edit control is on or off.
Children
Stores an array of children attached to this parent component.
ChildrenCount
Read-only property that specifies the number of children in the children list.
ChildrenRect
Specifies the bigger rectangle area occupied by parent and children controls.
ClassName
Returns the TObject.ClassName
ClipChildren
Specifies if children of the control should be clipped to the control's on-screen region.
ClipParent
Specifies whether the current control has clipped its parent.
ClipRect
Specifies the bound rectangle to be clipped.
ComObject
Specifies the interface reference implemented by the component.
ComponentCount
Returns the owned component count
ComponentIndex
Indicates the position of the component in its owner's Components property array.
ComponentState
Describes the current state of the component, indicating when a component needs to avoid certain actions.
ComponentStyle
Governs the behavior of the component.
Components
Returns an iterator over the owned components
ControlType:
Controls
Returns an iterator over contained controls
ControlsCount
Returns the count of contained controls
Cursor
Image to use to represent the mouse pointer when it passes into the region covered by the control.
Data
Stores a Tvalue, which is a data structure that can store different kinds of data types.
DefaultSize
Embarcadero Technologies does not currently have any additional information.
Returns a string with the name of the default style of this control
Stores a TTextSettings type object keeping the default values of the text representation properties.
DesignInfo
Contains information used by the Form designer.
DisableDisappear
Embarcadero Technologies does not currently have any additional information.
DisableFocusEffect
Specifies whether the control has the focus effect disabled.
DragMode
Specifies how the control initiates drag-and-drop operations.
EnableDragHighlight
Specifies whether the control is highlighted when the dragged object is over it.
Enabled
Specifies whether the control responds to mouse, keyboard, and timer events.
Specifies which characters are allowed to be typed into this edit control.
FixedSize
Embarcadero Technologies does not currently have any additional information.
Specifies the font to use when rendering the text.
Specifies the color of the text in the edit control.
HasAfterPaintEffect
Specifies whether the control has an effect that is applied after the control is painted.
HasClipParent
Control that is a direct child of this control and has clipped this control.
HasDisablePaintEffect
Specifies whether the control's effect is painted.
HasEffect
Specifies whether the control has an applied effect.
Height
Height specifies the vertical size of the control (in dp).
HelpContext
Contains the numeric context ID that identifies the Help topic for the control.
HelpKeyword
Contains the keyword string that identifies the Help topic for the control.
HelpType
Specifies whether the control's context-sensitive Help topic is identified by a context ID or by keyword.
bool:
Hint
Specifies the text string that appears when the user moves the mouse over a control.
HitTest
Enables the control to capture mouse events.
For internal use only.
InPaintTo
Specifies whether the control is currently being painted.
Index
Specifies the index of the child object in the children array attached to this object.
InheritedCursor
Image used to represent the mouse pointer when it passes into the region covered by the control.
InvertAbsoluteMatrix
Specifies the inverse matrix of AbsoluteMatrix.
IsDragOver
Specifies whether a dragged object is over the area of the current control.
IsFocused
Determines whether the control has input focus.
IsInflated
Whether the current style of this control has been actually applied to the control.
IsMouseOver
Specifies whether the mouse cursor is over the control.
IsVisible
Specifies whether the control is visible.
Determines the type of the virtual keyboard.
Specifies whether to hide the virtual keyboard by clicking the Return key.
LocalRect
Specifies the local rectangle for painting the control.
Locked
Specifies whether the control is locked at design time.
Margins
Aligns the component to the margins points of other components.
Specifies the maximum length of the text entered in this edit control.
The data model representing the data used by the presentation of the current control.
Name
Specifies the name of the component as referenced in code.
Observers
Indicates the TObservers object added to the TComponent.
OnGesture
Callable[[Object, GestureEventInfo, bool], None]:
Opacity
Specifies the control opacity.
Owner
Returns the Component Owner
Padding
Aligns the component to the padding points of other components.
Parent
Returns/Sets the Control Visibility
ParentClassStyleLookupName
The name of the default style of the parent class of this control.
ParentControl
Specifies the parent control of this control.
ParentedRect
Specifies the bounding rectangle of the control within its parent.
ParentedVisible
Specifies whether all the control's parents are visible.
Specifies whether this edit control shows its characters or not.
PopupMenu
Specifies the context (pop-up) menu object.
Position
Returns an access to the position of the control inside its parent
Object:
PresentationProxy:
PresentationState:
Pressed
Indicates whether the control is currently pressed.
PressedPosition
A point that indicates where exactly on the control the click occured.
Determines whether you can change the text of this edit control.
Keeps final values of text representation properties.
Indicates the type of action that the edit control performs when you are editing the text of the control and you press the return key on the virtual keyboard.
Root
Specifies the root parent of this object.
Scene
Specifies the current scene in which the control is drawn.
Specifies the number of characters that are selected.
Specifies the position of the first selected character in the text.
Specifies the selected portion of the edit control's text.
Specifies the color and pattern used to fill the font of the selected text or to stroke the outline of it.
ShowHint
Specifies whether the Hint can be shown.
Size
Specifies the vertical and horizontal size (Size.Height and Size.Width) of the control (in pixels).
Stored
Specifies whether this object is stored in the .XFM file.
Specifies the name of the resource object to which the current TStyledControl is linked
StyleName
Specifies the style name for this FMX component.
This property allows you to define the current state of style
Defines the set of styled text representation properties whose values are loaded from the current style and cannot be changed manually.
StylesData
Value:
Indicates the position of the control in its parent's tab order.
Embarcadero Technologies does not currently have any additional information.
Tag
Stores a NativeInt integral value as a part of a component.
TagFloat
Custom property that stores any floating-point value.
TagObject
Custom property that stores any object value.
TagString
Custom property that stores any string value.
Contains the text displayed by this edit control.
Specifies how the text will be displayed in terms of horizontal alignment.
Embarcadero Technologies does not currently have any additional information.
A hint or message to be displayed when the Text property is empty.
Keeps the values of styled text representation properties that are set in the Object Inspector or programmatically.
Touch
Specifies the touch manager component associated with the control.
TouchTargetExpansion
Set of optional pixel values you can specify to expand the touch target of a FireMonkey styled control.
Specifies whether the user is typing something in this edit control.
UpdateRect
Specifies the rectangle area of the control that needs to be updated.
VCLComObject
Represents information used internally by components that support COM.
Specifies how the text will be displayed in terms of vertical alignment.
Visible
Returns/Sets the Control Visibility
Width
Specifies the horizontal size of the control (in pixels).
- AdjustSizeValue¶
Updates the width and height of this control according to its current style
- AdjustType¶
Determines if and how the width and height of this control should be modified to take the fixed space dictated by the style of this control
- AfterConstruction()¶
- Align¶
Specifies the alignment options (top, left, client, and so on) of this control. Use Align to automatically set the alignment of the current control. Setting Align to a value different than None can affect the position, size (height and width), and anchors of the control. By default, Align is set to None. Descendants of TControl typically set the visibility and value for the Align property. For example, for TToolBar, Align defaults to TAlignLayout.Top. To see the possible values for Align and their visible effects over the control, see FMX.Types.TAlignLayout. Controls that have the Align or Anchors properties set can use a Scale that is different from the default (1,1), so that controls align together even when they have a custom scale.
- Type:
AlignLayout
- Anchors¶
Specifies how the control is anchored to its parent. Use Anchors to ensure that a control maintains its current position relative to the edges of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. Anchors is enforced only when the parent control is resized. If a control is anchored to opposite edges at the same time, the control stretches horizontally or vertically to maintain constant the distance between the control edges and parent edges. If a control is anchored to all four edges of its parent, the control stretches in all directions. By default, a control is anchored to the top and left edges of its container (Anchors=[akTop,akLeft]). The automatic alignment may affect the anchors of a control. When Align is set to None, all the anchors are available. If Align is not None, the anchors affected by the automatic alignment are excluded. Changing the state of the anchors affected by the automatic alignment has no effect over the control. Controls that have the Align or Anchors properties set can use a Scale that is different from the default (1,1), so that controls align together even when they have a custom scale.
- Type:
Anchors
- ApplyStyleLookup()¶
Gets and applies the style of a TStyledControl.
- ApplyTriggerEffect(AInstance: FmxObject, ATrigger: str) None ¶
Applies the specified mouse trigger effect to all the children of this FMX object that are of type TEffect. ApplyTriggerEffect iterates through all the children of this FMX object and, if one of them is of type TEffect, applies the mouse trigger given through the ATrigger parameter (which can be ‘IsMouseOver’, ‘IsMouseOver’, ‘IsDragOver’, and so on). AInstance specifies the instance of the FMX object to which the trigger effect is applied.
- AutoSelect¶
bool:
- AutoTranslate¶
Specifies whether the control’s text should be translated
- BeforeDestruction()¶
Performs any necessary actions before the first destructor is called. FMX.Controls.TStyledControl.BeforeDestruction inherits from System.Classes.TComponent.BeforeDestruction. All content below this line refers to System.Classes.TComponent.BeforeDestruction. Performs any necessary actions before the first destructor is called. BeforeDestruction is called automatically immediately before the component’s first destructor executes. Do not call it explicitly in your applications. As implemented in TComponent, BeforeDestruction checks whether the Destroying method has been called, and if not, calls it. Descendants that override this method to perform other actions before a component is destroyed should call the inherited method first to ensure that this check takes place.
- ButtonsContent¶
Returns the control that contains the edit buttons associated with the edit control.
- Type:
ContentEdit
- Caret¶
Represents the caret of the control. Caret is of type TCaret.
- Type:
CustomCaret
- CaretPosition¶
Provides access to the caret position in this edit control. Use CaretPosition to determine the position of the cursor in the edit control. CaretPosition indicates the horizontal character coordinate of the cursor, indexed from zero. Modify the value of the CaretPosition property to change the position of the cursor within the edit control. For the cursor to be visible, the edit control must have focus. For example, if CaretPosition is set to 4, then the cursor is at the fifth character. If the length of text in the edit control is shorter than 5, the cursor moves to the end of the string.
- Type:
int
- CharCase¶
It defines whether to implement the UPPER or lower case conversion to the memo’s text.
- Type:
EditCharCase
- CheckSpelling¶
Defines whether the spell-checking feature of the edit control is on or off. This property enables spell checking on the TEdit component. When set to True a red squiggly line appears underlining the words misspelled. The spell checking is performed by an operating system service. It is only supported on iOS and OS X.
- Type:
bool
- ControlType¶
ControlType:
- CopyToClipboard()¶
Copies the selected text in the edit control to the Clipboard, in plain text format. Use CopyToClipboard to replace the contents of the Clipboard with the selected text. CopyToClipboard does not clear the Clipboard if no text is selected. If no text is selected, CopyToClipboard does nothing.
- CutToClipboard()¶
Copies the selected text to the Clipboard, in plain text format, and then deletes the selection. Use CutToClipboard to replace the contents of the Clipboard with the selected text while clearing the selected text. If no text is selected, CutToClipboard does nothing.
- DefaultStyleLookupName¶
Returns a string with the name of the default style of this control
- DefaultTextSettings¶
Stores a TTextSettings type object keeping the default values of the text representation properties. DefaultTextSettings is initialized in Create with the following values:
Font.Size := 11 ; // depends on the platform Font.Family = ‘Tahoma’; // depends on the platform Font.Style := [] ; FontColor := TAlphaColorRec.Black; TextAlign := TTextAlign.Leading; VertTextAlign := TTextAlign.Center;
The ApplyStyle method might load from a style the values of the following DefaultTextSettings properties: FontColor, Font, TextAlign, and VertTextAlign.
- Type:
TextSettings
- DeleteSelection()¶
Removes the selected text from the edit control. Use DeleteSelection to delete the selected text from the edit control. If no text is selected, DeleteSelection does nothing. If all the text is selected, DeleteSelection clears all the text.
- FilterChar¶
Specifies which characters are allowed to be typed into this edit control. The FilterChar property specifies a string containing individual characters that are allowed to be typed into this edit control. For instance, if you set FilterChar to ‘123abc’, then only the a, b, and c letters and the 1, 2, and 3 numerals are allowed to be typed into this edit control. All other characters are ignored. However, note that the uppercase version of a, b, and c are not allowed by this filter string. If you want to add uppercase variants, then FilterChar should be set to ‘123abcABC’. To allow for all characters, set FilterChar to an empty string (‘’).
- Type:
str
- FindStyleResource(AStyleLookup: str, AClone: bool) FmxObject ¶
Finds the linked resource object for the style specified by name. The AStyleLookup parameter specifies the name of the style. If AStyleLookup is empty, FindStyleResource returns nil. If no resource object is linked directly to the control, FindStyleResource looks to the styles of the control’s children. If no resource object is found, it returns nil. Clone determines whether the returned style resource object should be the original style object (False) or a copy of the original (True). Finds the linked resource object for the style specified by name. The AStyleLookup parameter specifies the name of the style. If AStyleLookup is empty, FindStyleResource returns nil. If no resource object is linked directly to the control, FindStyleResource looks to the styles of the control’s children. If no resource object is found, it returns nil. Clone determines whether the returned style resource object should be the original style object (False) or a copy of the original (True).
- Font¶
Specifies the font to use when rendering the text. Set Font to specify the font to use when rendering the text. To change to a new font, specify a new TFont object. To modify a font, change the value of the Family, Size, or Style of the TFont object.
- Type:
Font
- FontColor¶
Specifies the color of the text in the edit control.
- Type:
int
- GoToTextBegin()¶
Moves the cursor to the beginning of the text in the edit control.
- GoToTextEnd()¶
Moves the cursor to the end of the text in the edit control.
- HasPresentationProxy() Boolean ¶
- HasSelection()¶
Returns true if any selection exists in the edit box, false otherwise. Use HasSelection in order to check if any part of the text is selected.
- HideSelectionOnExit¶
bool:
- ImeMode¶
For internal use only. Do not use this member. It is for internal use only.
- Type:
ImeMode
- Inflate()¶
Call this procedure to get and apply its style lookup.
- KeyboardType¶
Determines the type of the virtual keyboard. Set KeyboardType to determine the type of virtual keyboard this edit is to use. Possible values for the KeyboardType property are Alphabet, Default, EmailAddress, NamePhonePad, and so on (values are selectable in the Object Inspector and are described in FMX.Types.TVirtualKeyboardType). Keyboard types are illustrated in the Mobile Tutorial: Using the Web Browser Component (iOS and Android).
Note: On Android, the Alphabet keyboard type has no word completion or word suggestions. The keyboard looks the same as the Default keyboard, but without suggestions.
- Type:
VirtualKeyboardType
- KillFocusByReturn¶
Specifies whether to hide the virtual keyboard by clicking the Return key. When KillFocusByReturn is True, clicking the Return key hides the virtual keyboard.
- Type:
bool
- LoadPresentation()¶
- MaxLength¶
Specifies the maximum length of the text entered in this edit control. Set the MaxLength property in order to limit the maximum length of the text held by this edit control. For instance, if you want to be able to input strings of maximum 5 characters, set MaxLength to 5. Note that setting MaxLength to a value lower than the length of the actual display text does not affect the display. It only limits the number of characters while typing.
- Type:
int
- Model¶
The data model representing the data used by the presentation of the current control. FMX.Edit.TCustomEdit.Model inherits from FMX.Controls.Presentation.TPresentedControl.Model. All content below this line refers to FMX.Controls.Presentation.TPresentedControl.Model. The data model representing the data used by the presentation of the current control. The constructor of your presented control creates a data model for your presented control. The class of the data model is the class that DefineModelClass returns.
See Also
FMX.Controls.Model.TDataModel FMX.Controls.Presentation.TPresentedControl.Presentation FMX.Controls.Presentation.TPresentedControl.Create FMX.Controls.Presentation.TPresentedControl.DefineModelClass
- Type:
CustomEditModel
- NeedStyleLookup()¶
Call this procedure to indicate that this control requires to get and apply its style lookup.
- Password¶
Specifies whether this edit control shows its characters or not. Set the Password property to True to make this edit control hide its characters for password-like input. Set Password to False to make this edit control show all its characters.
- Type:
bool
- PasteFromClipboard()¶
Pastes the plain text contents of the Clipboard text into the edit control. Use PasteFromClipboard to paste the plain text contents held by the Clipboard into the edit control. If the Clipboard does not have a plain text content, PasteFromClipboard does nothing. PasteFromClipboard does not clear the contents of this edit control.
- PointInObjectLocal(X: float, Y: float) bool ¶
Checks whether the point specified by local coordinates belongs to the control area. PointInObjectLocal returns True if the specified point belongs to the control area, and False otherwise. The X and Y are the local coordinates of the point to be checked (compare with PointInObject):
X is the X coordinate. Y is the Y coordinate. The local coordinates of the upper-left corner of the control rectangle are (0,0), and the local coordinates of the lower-right corner are (Width, Height). The points of the control boundary specified by BoundsRect belong to the control and PointInObjectLocal returns True for them. If a control supports the Touch property, the control area can be optionally inflated on the values specified by the TouchTargetExpansion property. TouchTargetExpansion keeps four optional parameters representing the expansion for the four sides of the control in pixels (Bottom, Left, Right, and Top). The dclasses can change the ‘control area’ definition. For example:
The FMX.Objects.TSelection class extends the ‘control area’ definition relative to BoundsRect. FMX.Objects.TSelection.PointInObjectLocal also returns True if the point belongs to any of small rectangles of the four grip controls used to manage the selection shape. The rectangles of the grip controls are rectangles surrounding the four corners of the TSelection rectangle. The Width and Height of these rectangles are equal to 2 * GripSize. For example, the grip control’s rectangle of the upper-right corner UR_Corner of TSelection is defined by the following corners: (UR_Corner.Top - GripSize, UR_Corner.Right - GripSize)–upper-left corner of the grip. (UR_Corner.Top + GripSize, UR_Corner.Right + GripSize)–lower-right corner of the grip. FMX.Objects.TSelectionPoint.PointInObjectLocal returns True if the specified point belongs to the rectangle of the grip control corresponding to the TSelectionPoint object, and False otherwise.
- Presentation¶
Object:
- PresentationProxy¶
PresentationProxy:
- PresentationState¶
PresentationState:
- ReadOnly¶
Determines whether you can change the text of this edit control. To prevent the contents of the edit control from being edited, set the ReadOnly property to True. Set ReadOnly to False to allow the contents of the edit control to be edited. Setting ReadOnly to True ensures that the text is not altered, while still allowing you to select text. The selected text can then be manipulated by the application, or copied to the Clipboard.
- Type:
bool
- RecalcEnabled()¶
Forces the current control to recalculate its enabled state. RecalcEnabled also forces the control’s children to recalculate their enabled state.
- RecalcOpacity()¶
Forces the current control to recalculate its Opacity property. RecalcOpacity also forces the control’s children to recalculate their Opacity property.
- ReloadPresentation()¶
- Replace(AStartPos: int, ALength: int, AStr: str) None ¶
Embarcadero Technologies does not currently have any additional information.
- ResetSelection()¶
Resets the selection from an edit box. ResetSelection sets the CaretPosition property with the start position of the selection and resets the value of the SelLength property to 0. If no text is selected, the ResetSelection property does nothing.
- ResultingTextSettings¶
Keeps final values of text representation properties. These values are really used to draw texts in a control. ResultingTextSettings keeps a TTextSettings object that manages the final values of the text representation properties. These values are really used to draw texts in a control. To obtain values stored in ResultingTextSettings, a control uses the StyledSettings property. For example, if StyledSettings contains the TStyledSetting.Family value, then the TFont.Family value is taken from the DefaultTextSettings. (That is the font family name defined in the loaded style is used. The font family name defined by the programmer in the Object Editor is ignored.) Oppositely, if StyledSettings does not contain TStyledSetting.Family, then the font family name defined by the programmer in the Object Editor is used and the font family name defined in the loaded style is ignored. The TTextSettings class define properties keeping values of the FontColor, TextAlign, VertTextAlign, Trimming, WordWrap, and Font (TFont.Family, TFont.Size, TFont.Style) elements defining visual parameters of a text representation. RecalculateTextSettings updates the ResultingTextSettings.
- Type:
TextSettings
- ReturnKeyType¶
Indicates the type of action that the edit control performs when you are editing the text of the control and you press the return key on the virtual keyboard. The run-time platform uses this value to determine the type of return button that it displays on the virtual keyboard for the edit control. The value of ReturnKeyType does not affect the actual action that the edit control performs when you press the return key. To define that action, use the OnKeyUp event.
Platform Support This property only has effect on Android and iOS.
- Type:
ReturnKeyType
- SelLength¶
Specifies the number of characters that are selected. Read SelLength to determine the length, in bytes, of the selected text. This is the same as the number of characters, unless you are using a multibyte character set. Set SelLength to change the selection to consist of the first SelLength bytes starting at SelStart.
Tip: Setting SelLength to a value greater than the number of characters from SelStart to the end of the text results in the selection of all characters from SelStart to the end of the text. Reading SelLength immediately after setting it to a value greater than the number of available characters returns the number of characters actually selected, not the value that was just set.
- Type:
int
- SelStart¶
Specifies the position of the first selected character in the text. Read SelStart to determine the position of the first selected character, where 0 indicates the first character. If there is no selected text, SelStart indicates the position of the cursor. Set SelStart to remove the current selection and to position the cursor just before the indicated character. To select a particular range of the text, first set SelStart to position the cursor, and then set SelLength to extend the selection.
- Type:
int
- SelText¶
Specifies the selected portion of the edit control’s text. Read SelText to determine the value of the selected text. Set SelText to replace the selected text with a new string. If there is no selection, but the edit control has focus, set SelText to insert a new string into the text, at the cursor.
- Type:
str
- SelectAll(AKeepCaretPosition: bool) None ¶
Selects all the characters of the displayed Text at once. Equivalent to the CTRL+A key combination on Windows, or Command+A on OS X. SelectAll does not change the current CaretPosition.
- SelectWord()¶
SelectWord assigns to the FMX.Edit.TCustomEdit.SelLength property the length of the first word found if this exists. If several words exist in the text, the procedure SelectWord checks if the cursor position is the start position of a word. If not, it searches for the closest word from the left of cursor position.
- SelectionFill¶
Specifies the color and pattern used to fill the font of the selected text or to stroke the outline of it. Read the SelectionFill property to get a TBrush object with the color and pattern used to fill the font of selected text displayed, or to stroke the outline of it.
- Type:
Brush
- StartTriggerAnimation(AInstance: FmxObject, ATrigger: str) None ¶
Embarcadero Technologies does not currently have any additional information.
- StartTriggerAnimationWait(AInstance: FmxObject, ATrigger: str) None ¶
Embarcadero Technologies does not currently have any additional information.
- StyleLookup¶
Specifies the name of the resource object to which the current TStyledControl is linked
- StyleState¶
This property allows you to define the current state of style
- StyledSettings¶
Defines the set of styled text representation properties whose values are loaded from the current style and cannot be changed manually. Text representation properties are used as parameters for drawing texts in controls. The StyledSettings property is used in FMX controls such as TButton, TSpeedButton, TCheckBox, and others. Styles, for example Metropolis UI styles, define the default values of the text representation properties like font name, font size, word-wrapping, and others. The TTextSettings class define properties keeping values of the FontColor, TextAlign, VertTextAlign, Trimming, WordWrap, and Font (TFont.Family, TFont.Size, TFont.Style) elements defining visual parameters of a text representation. StyledSettings can contain the Family, Size, Style, FontColor, and Other values defined in TStyledSetting. The “Relation between TStyledSetting constants and TTextSettings properties” table shows which of the TStyledSetting constants control the handling of these TTextSettings text representation properties. Keep in mind that the values of all styled text representation properties listed in the StyledSettings are taken from a style and cannot be changed manually. For example, if you set a new value of the FontColor property of a TTextControl control, then the real updating of the font color takes place only if the StyledSettings property of this control does not contain TStyledSetting.FontColor. For more details, see the example in Setting Text Parameters in FireMonkey. To switch OFF a font property for a control, select the control in the Form Designer. In the Object Inspector, expand the StyledSettings property. Clear the check mark before the property. For example, the following figure shows a TButton control with Size turned OFF (for Button1) and ON (for Button2):
With StyledSettings you can also use the DefaultStyledSettings constant that defines the values of the styled properties that are taken from a style by default. Remember that the HorzAlign and VertAlign text representation properties stored in the TextSettings property of a control correspond to the TextAlign and VertTextAlign properties of the control.
- Type:
StyledSettings
- TabOrder¶
Indicates the position of the control in its parent’s tab order. TabOrder is the order in which child controls are visited when the user presses the TAB key. The control with the TabOrder value of 0 is the control that has the focus when the form first appears. Initially, the tab order is always the order in which the controls were added to the form. The first control added to the form has a TabOrder value of 0, the second is 1, the third is 2, and so on. Change this by changing the TabOrder property. Each control has a unique tab-order value within its parent. Assigning TabOrder a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of TabOrder, but instead is given the number that ensures that the control is the last in the tab order.
- Type:
int
- TabStop¶
Embarcadero Technologies does not currently have any additional information.
- Type:
bool
- Text¶
Contains the text displayed by this edit control. Use the Text property to read the text of this edit control or to specify a new string to be displayed.
- Type:
str
- TextAlign¶
Specifies how the text will be displayed in terms of horizontal alignment. The TextAlign property specifies how this edit control displays the text in terms of horizontal alignment. TextAlign can have one of the following, defined in TTextAlign, values:
Center (default) aligns the text at the middle of the edit control. Leading aligns the text at the leftmost position inside the edit control. Trailing aligns the text at the rightmost position inside the edit control. When you use text representation properties stored in ITextSettings.TextSettings, remember that TextAlign corresponds to HorzAlign.
- Type:
TextAlign
- TextContentRect¶
Embarcadero Technologies does not currently have any additional information.
- Type:
- TextPrompt¶
A hint or message to be displayed when the Text property is empty. Use TextPrompt to cue the user about the kind of entry that is expected in the text field. The TextPrompt is grayed (like a watermark), cannot be scrolled at run time, and is cleared from the entry field as soon as the user begins to type into the edit field. The following image contains a design-time preview of setting the TextPrompt property:
- Type:
str
- TextSettings¶
Keeps the values of styled text representation properties that are set in the Object Inspector or programmatically. TextSettings references a TTextSettings type object that handles values of styled text representation properties that are set in the Object Inspector or programmatically. TextSettings references a TTextSettings type object, which handles styled text representation properties to be used for drawing texts in this control. TTextSettings type objects provide all styled text representation properties and methods to manage them. The styled text representation properties are FontColor, TextAlign, VertTextAlign, Trimming, WordWrap, and Font (TFont.Family, TFont.Size, and TFont.Style). TTextSettings objects provide both styled text representation properties, whose values are loaded from a style (specified in StyledSettings), so all other styled text representation properties, whose values can be set manually, and methods to manage these text representation properties. The text representation properties identified in StyledSettings are loaded from the style and cannot be set manually. Remember that the HorzAlign and VertAlign text representation properties stored in the TextSettings property of a control correspond to the TextAlign and VertTextAlign properties of the control.
- Type:
TextSettings
- Typing¶
Specifies whether the user is typing something in this edit control. The Typing property is True if the user is typing something into this edit control, False otherwise. When any printable character is typed, the Typing property is set to True. A printable character is any character that is not a control character. When the ENTER key is pressed, the Typing property is set to False.
- Type:
bool
- Undo()¶
- UnloadPresentation()¶
- VertTextAlign¶
Specifies how the text will be displayed in terms of vertical alignment. The VertTextAlign property specifies how the TCustomEdit control displays the text in terms of vertical alignment. VertTextAlign can have one of the following values (defined in TTextAlign):
Center (default)–aligns the text on a vertical axis, at the middle of the TCustomEdit object. Leading–aligns the text on a vertical axis, at the topmost position inside the TCustomEdit object. Trailing–aligns the text on a vertical axis, at the bottommost position inside the TCustomEdit object. When you use text representation properties stored in ITextSettings.TextSettings, remember that VertTextAlign corresponds to VertAlign.
- Type:
TextAlign