# 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

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

### Methods

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

### Properties

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

## Description

### Fields

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

| `FOnTextfieldKeyEvent: TOnTextfieldKeyEventEvent;`
ICefTextfieldDelegateEvents

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

### Methods

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

| `procedure doCreateCustomView; override;`
ICefViewDelegateEvents

| `procedure CreateTextField;`
Create a new Textfield.

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

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

| `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.

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

| `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"

| `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.

| `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.

| `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().

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

| `procedure ClearEditHistory;`
Clears Edit history.

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

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

### Properties

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

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

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

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

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

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

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

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

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

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

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

| `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.

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

Generated by PasDoc 0.16.0-snapshot.