Class \Prado\Web\UI\WebControls\TKeyboard
TKeyboard displays a virtual keyboard that users can click on to enter input in an associated text box. It helps to reduce the keyboard recording hacking.
To use TKeyboard, write a template like following:
<com:TTextBox ID="PasswordInput" />
<com:TKeyboard ForControl="PasswordInput" />
A TKeyboard control is associated with a TTextBox control by specifying \Prado\Web\UI\WebControls\setForControl to be the ID of that control. When the textbox is in focus, a virtual keyboard will pop up; and when the text box is losing focus, the keyboard will hide automatically. Set \Prado\Web\UI\WebControls\setAutoHide to false to keep the keyboard showing all the time.
The appearance of the keyboard can also be changed by specifying a customized CSS file via \Prado\Web\UI\WebControls\setCssUrl. By default, the CSS class name for the keyboard is 'Keyboard'. This may also be changed by specifying \Prado\Web\UI\WebControls\setKeyboardCssClass.
Class hierarchy
- \Prado\Web\UI\WebControls\TKeyboard
- \Prado\Web\UI\WebControls\TWebControl implements IStyleable
- \Prado\Web\UI\TControl implements IRenderable, IBindable
- \Prado\TApplicationComponent
- \Prado\TComponent
Since: 3.1.1
public
|
|
public
|
|
public
|
|
public
|
|
public
|
onPreRender(mixed $param) : mixed
Registers CSS and JS.
This method is invoked right before the control rendering, if the control is visible. |
public
|
|
public
|
|
public
|
setForControl(string $value) : mixed
Sets the ID path of the {@see \Prado\Web\UI\WebControls\TTextBox} control.
The ID path is the dot-connected IDs of the controls reaching from the keyboard's naming container to the target control. |
public
|
setKeyboardCssClass(string $value) : mixed
Sets a value indicating the CSS class name for the keyboard <div> element.
Note, if you change this property, make sure you also supply a customized CSS file by specifying \Prado\Web\UI\WebControls\setCssUrl which uses the new CSS class name for styling. |
protected
|
addAttributesToRender(THtmlWriter $writer) : mixed
Adds attribute name-value pairs to renderer.
This method overrides the parent implementation with additional TKeyboard specific attributes. |
protected
|
|
protected
|
|
protected
|
|
protected
|
registerStyleSheet() : mixed
Registers the CSS relevant to the TKeyboard.
It will register the CSS file specified by \Prado\Web\UI\WebControls\getCssUrl. If that is not set, it will use the default CSS. |