# Class TCEFTextfieldComponent

Description
Hierarchy
Fields
Methods
Properties

## Unit

uCEFTextfieldComponent

## Declaration

`type TCEFTextfieldComponent = class(TCEFViewComponent, ICefTextfieldDelegateEvents)`

## Description

This item has no description.

## Hierarchy

- TObject
- TPersistent
- TComponent
- TCEFViewComponent
- TCEFTextfieldComponent

## Overview

### Fields

Protected | `FTextfield: ICefTextfield;`
Protected | `FOnTextfieldKeyEvent: TOnTextfieldKeyEventEvent;`
Protected | `FOnAfterUserAction: TOnAfterUserActionEvent;`

### Methods

Protected | `procedure DestroyView; override;`
Protected | `procedure Initialize; override;`
Protected | `function GetInitialized: boolean; override;`
Protected | `function GetAsView: ICefView; override;`
Protected | `function GetAsTextfield: ICefTextfield; override;`
Protected | `function GetIsPasswordInput: boolean;`
Protected | `function GetIsReadOnly: boolean;`
Protected | `function GetText: ustring;`
Protected | `function GetHasSelection: boolean;`
Protected | `function GetSelectedText: ustring;`
Protected | `function GetSelectedRange: TCefRange;`
Protected | `function GetCursorPosition: NativeUInt;`
Protected | `function GetTextColor: TCefColor;`
Protected | `function GetSelectionTextColor: TCefColor;`
Protected | `function GetSelectionBackgroundColor: TCefColor;`
Protected | `function GetPlaceholderText: ustring;`
Protected | `procedure SetPasswordInput(password_input: boolean);`
Protected | `procedure SetReadOnly(read_only: boolean);`
Protected | `procedure SetText(const text_: ustring);`
Protected | `procedure SetTextColor(color: TCefColor);`
Protected | `procedure SetSelectionTextColor(color: TCefColor);`
Protected | `procedure SetSelectionBackgroundColor(color: TCefColor);`
Protected | `procedure SetPlaceholderText(const text_: ustring);`
Protected | `procedure SetSelectedRange(const range: TCefRange);`
Protected | `procedure doOnKeyEvent(const textfield: ICefTextfield; const event: TCefKeyEvent; var aResult : boolean);`
Protected | `procedure doOnAfterUserAction(const textfield: ICefTextfield);`
Protected | `procedure doCreateCustomView; override;`
Public | `procedure CreateTextField;`
Public | `procedure AppendText(const text_: ustring);`
Public | `procedure InsertOrReplaceText(const text_: ustring);`
Public | `procedure SelectAll(reversed: boolean);`
Public | `procedure ClearSelection;`
Public | `procedure SetFontList(const font_list: ustring);`
Public | `procedure ApplyTextColor(color: TCefColor; const range: TCefRange);`
Public | `procedure ApplyTextStyle(style: TCefTextStyle; add: boolean; const range: TCefRange);`
Public | `function IsCommandEnabled(command_id: TCefTextFieldCommands): boolean;`
Public | `procedure ExecuteCommand(command_id: TCefTextFieldCommands);`
Public | `procedure ClearEditHistory;`
Public | `procedure SetAccessibleName(const name_: ustring);`
Public | `procedure SetPlaceholderTextColor(color: TCefColor);`

### Properties

Public | `property PasswordInput : boolean read GetIsPasswordInput write SetPasswordInput;`
Public | `property ReadOnly : boolean read GetIsReadOnly write SetReadOnly;`
Public | `property Text : ustring read GetText write SetText;`
Public | `property SelectedText : ustring read GetSelectedText;`
Public | `property SelectedRange : TCefRange read GetSelectedRange write SetSelectedRange;`
Public | `property CursorPosition : NativeUInt read GetCursorPosition;`
Public | `property TextColor : TCefColor read GetTextColor write SetTextColor;`
Public | `property SelectionTextColor : TCefColor read GetSelectionTextColor write SetSelectionTextColor;`
Public | `property SelectionBackgroundColor : TCefColor read GetSelectionBackgroundColor write SetSelectionBackgroundColor;`
Public | `property PlaceholderText : ustring read GetPlaceholderText write SetPlaceholderText;`
Public | `property HasSelection : boolean read GetHasSelection;`
Published | `property OnTextfieldKeyEvent : TOnTextfieldKeyEventEvent read FOnTextfieldKeyEvent write FOnTextfieldKeyEvent;`
Published | `property OnAfterUserAction : TOnAfterUserActionEvent read FOnAfterUserAction write FOnAfterUserAction;`

## Description

### Fields

Protected | `FTextfield: ICefTextfield;`
This item has no description.

Protected | `FOnTextfieldKeyEvent: TOnTextfieldKeyEventEvent;`
ICefTextfieldDelegateEvents

Protected | `FOnAfterUserAction: TOnAfterUserActionEvent;`
This item has no description.

### Methods

Protected | `procedure DestroyView; override;`
This item has no description.

Protected | `procedure Initialize; override;`
This item has no description.

Protected | `function GetInitialized: boolean; override;`
This item has no description.

Protected | `function GetAsView: ICefView; override;`
This item has no description.

Protected | `function GetAsTextfield: ICefTextfield; override;`
This item has no description.

Protected | `function GetIsPasswordInput: boolean;`
This item has no description.

Protected | `function GetIsReadOnly: boolean;`
This item has no description.

Protected | `function GetText: ustring;`
This item has no description.

Protected | `function GetHasSelection: boolean;`
This item has no description.

Protected | `function GetSelectedText: ustring;`
This item has no description.

Protected | `function GetSelectedRange: TCefRange;`
This item has no description.

Protected | `function GetCursorPosition: NativeUInt;`
This item has no description.

Protected | `function GetTextColor: TCefColor;`
This item has no description.

Protected | `function GetSelectionTextColor: TCefColor;`
This item has no description.

Protected | `function GetSelectionBackgroundColor: TCefColor;`
This item has no description.

Protected | `function GetPlaceholderText: ustring;`
This item has no description.

Protected | `procedure SetPasswordInput(password_input: boolean);`
This item has no description.

Protected | `procedure SetReadOnly(read_only: boolean);`
This item has no description.

Protected | `procedure SetText(const text_: ustring);`
This item has no description.

Protected | `procedure SetTextColor(color: TCefColor);`
This item has no description.

Protected | `procedure SetSelectionTextColor(color: TCefColor);`
This item has no description.

Protected | `procedure SetSelectionBackgroundColor(color: TCefColor);`
This item has no description.

Protected | `procedure SetPlaceholderText(const text_: ustring);`
This item has no description.

Protected | `procedure SetSelectedRange(const range: TCefRange);`
This item has no description.

Protected | `procedure doOnKeyEvent(const textfield: ICefTextfield; const event: TCefKeyEvent; var aResult : boolean);`
ICefTextfieldDelegateEvents

Protected | `procedure doOnAfterUserAction(const textfield: ICefTextfield);`
This item has no description.

Protected | `procedure doCreateCustomView; override;`
ICefViewDelegateEvents

Public | `procedure CreateTextField;`
Create a new Textfield.

Public | `procedure AppendText(const text_: ustring);`
Appends |text| to the previously-existing text.

Public | `procedure InsertOrReplaceText(const text_: ustring);`
Inserts |text| at the current cursor position replacing any selected text.

Public | `procedure SelectAll(reversed: boolean);`
Selects all text. If |reversed| is true (1) the range will end at the logical beginning of the text; this generally shows the leading portion of text that overflows its display area.

Public | `procedure ClearSelection;`
Clears the text selection and sets the caret to the end.

Public | `procedure SetFontList(const font_list: ustring);`
Sets the font list. The format is "<FONT_FAMILY_LIST>,[STYLES] <SIZE>", where:
    - FONT_FAMILY_LIST is a comma-separated list of font family names,
    - STYLES is an optional space-separated list of style names (case-sensitive
      "Bold" and "Italic" are supported), and
    - SIZE is an integer font size in pixels with the suffix "px".
Here are examples of valid font description strings:
    - "Arial, Helvetica, Bold Italic 14px"
    - "Arial, 14px"

Public | `procedure ApplyTextColor(color: TCefColor; const range: TCefRange);`
Applies |color| to the specified |range| without changing the default color. If |range| is NULL the color will be set on the complete text contents.

Public | `procedure ApplyTextStyle(style: TCefTextStyle; add: boolean; const range: TCefRange);`
Applies |style| to the specified |range| without changing the default style. If |add| is true (1) the style will be added, otherwise the style will be removed. If |range| is NULL the style will be set on the complete text contents.

Public | `function IsCommandEnabled(command_id: TCefTextFieldCommands): boolean;`
Returns true (1) if the action associated with the specified command id is enabled. See additional comments on execute_command().

Public | `procedure ExecuteCommand(command_id: TCefTextFieldCommands);`
Performs the action associated with the specified command id.

Public | `procedure ClearEditHistory;`
Clears Edit history.

Public | `procedure SetAccessibleName(const name_: ustring);`
Set the accessible name that will be exposed to assistive technology (AT).

Public | `procedure SetPlaceholderTextColor(color: TCefColor);`
Sets the placeholder text color.

### Properties

Public | `property PasswordInput : boolean read GetIsPasswordInput write SetPasswordInput;`
Returns true (1) if the text will be displayed as asterisks.

Public | `property ReadOnly : boolean read GetIsReadOnly write SetReadOnly;`
Returns true (1) if the text is read-only.

Public | `property Text : ustring read GetText write SetText;`
Returns the currently displayed text.

Public | `property SelectedText : ustring read GetSelectedText;`
Returns the currently selected text.

Public | `property SelectedRange : TCefRange read GetSelectedRange write SetSelectedRange;`
Returns the selected logical text range.

Public | `property CursorPosition : NativeUInt read GetCursorPosition;`
Returns the current cursor position.

Public | `property TextColor : TCefColor read GetTextColor write SetTextColor;`
Returns the text color.

Public | `property SelectionTextColor : TCefColor read GetSelectionTextColor write SetSelectionTextColor;`
Returns the selection text color.

Public | `property SelectionBackgroundColor : TCefColor read GetSelectionBackgroundColor write SetSelectionBackgroundColor;`
Returns the selection background color.

Public | `property PlaceholderText : ustring read GetPlaceholderText write SetPlaceholderText;`
Returns the placeholder text that will be displayed when the Textfield is NULL.

Public | `property HasSelection : boolean read GetHasSelection;`
Returns true (1) if there is any selected text.

Published | `property OnTextfieldKeyEvent : TOnTextfieldKeyEventEvent read FOnTextfieldKeyEvent write FOnTextfieldKeyEvent;`
Called when |textfield| recieves a keyboard event. |event| contains information about the keyboard event. Return true (1) if the keyboard event was handled or false (0) otherwise for default handling.

Published | `property OnAfterUserAction : TOnAfterUserActionEvent read FOnAfterUserAction write FOnAfterUserAction;`
Called after performing a user action that may change |textfield|.

Generated by PasDoc 1.0.4.