Class TKeyboard
Class 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: A TKeyboard control is associated with a TTextBox control by specifying ForControl 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 AutoHide 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 CssUrl. By default, the CSS class name for the keyboard is 'Keyboard'. This may also be changed by specifying KeyboardCssClass.
| Constants Inherited From TControl |
|
AUTOMATIC_ID_PREFIX,
CLIENT_ID_SEPARATOR,
CS_CHILD_INITIALIZED,
CS_CONSTRUCTED,
CS_INITIALIZED,
CS_LOADED,
CS_PRERENDERED,
CS_STATE_LOADED,
ID_FORMAT,
ID_SEPARATOR,
IS_CHILD_CREATED,
IS_CREATING_CHILD,
IS_DISABLE_THEMING,
IS_DISABLE_VIEWSTATE,
IS_ID_SET,
IS_SKIN_APPLIED,
IS_STYLESHEET_APPLIED,
RF_ADAPTER,
RF_AUTO_BINDINGS,
RF_CHILD_STATE,
RF_CONTROLS,
RF_CONTROLSTATE,
RF_DATA_BINDINGS,
RF_EVENTS,
RF_NAMED_CONTROLS,
RF_NAMED_CONTROLS_ID,
RF_NAMED_OBJECTS,
RF_SKIN_ID,
|
| Method Summary |
|
protected
void
|
Adds attribute name-value pairs to renderer.
|
|
boolean
|
|
|
protected
string
|
|
|
protected
array
|
|
|
string
|
|
|
string
|
|
|
string
|
|
|
void
|
Registers CSS and JS.
|
|
protected
void
|
Registers the relevant JavaScript.
|
|
protected
void
|
Registers the CSS relevant to the TKeyboard.
|
|
void
|
|
|
void
|
|
|
void
|
Sets the ID path of the TTextBox control.
|
|
void
|
Sets a value indicating the CSS class name for the keyboard <div> element.
|
| Methods Inherited From TWebControl |
|
TWebControl::addAttributesToRender(), TWebControl::clearStyle(), TWebControl::copyBaseAttributes(), TWebControl::createStyle(), TWebControl::getAccessKey(), TWebControl::getBackColor(), TWebControl::getBorderColor(), TWebControl::getBorderStyle(), TWebControl::getBorderWidth(), TWebControl::getCssClass(), TWebControl::getDisplay(), TWebControl::getFont(), TWebControl::getForeColor(), TWebControl::getHasStyle(), TWebControl::getHeight(), TWebControl::getStyle(), TWebControl::getTabIndex(), TWebControl::getTagName(), TWebControl::getToolTip(), TWebControl::getWidth(), TWebControl::render(), TWebControl::renderBeginTag(), TWebControl::renderContents(), TWebControl::renderEndTag(), TWebControl::setAccessKey(), TWebControl::setBackColor(), TWebControl::setBorderColor(), TWebControl::setBorderStyle(), TWebControl::setBorderWidth(), TWebControl::setCssClass(), TWebControl::setDisplay(), TWebControl::setForeColor(), TWebControl::setHeight(), TWebControl::setStyle(), TWebControl::setTabIndex(), TWebControl::setToolTip(), TWebControl::setWidth()
|
| Methods Inherited From TControl |
|
TControl::addedControl(), TControl::addParsedObject(), TControl::addToPostDataLoader(), TControl::applyStyleSheetSkin(), TControl::autoBindProperty(), TControl::autoDataBindProperties(), TControl::bindProperty(), TControl::broadcastEvent(), TControl::bubbleEvent(), TControl::clearChildState(), TControl::clearControlState(), TControl::clearNamingContainer(), TControl::clearViewState(), TControl::convertUniqueIdToClientId(), TControl::createChildControls(), TControl::createControlCollection(), TControl::dataBind(), TControl::dataBindChildren(), TControl::dataBindProperties(), TControl::ensureChildControls(), TControl::findControl(), TControl::findControlsByID(), TControl::findControlsByType(), TControl::focus(), TControl::getAdapter(), TControl::getAllowChildControls(), TControl::getAttribute(), TControl::getAttributes(), TControl::getChildControlsCreated(), TControl::getClientID(), TControl::getControls(), TControl::getControlStage(), TControl::getControlState(), TControl::getCustomData(), TControl::getEnabled(), TControl::getEnableTheming(), TControl::getEnableViewState(), TControl::getHasAdapter(), TControl::getHasAttributes(), TControl::getHasChildInitialized(), TControl::getHasControls(), TControl::getHasInitialized(), TControl::getHasLoaded(), TControl::getHasLoadedPostData(), TControl::getHasPreRendered(), TControl::getID(), TControl::getNamingContainer(), TControl::getPage(), TControl::getParent(), TControl::getRegisteredObject(), TControl::getSkinID(), TControl::getSourceTemplateControl(), TControl::getTemplateControl(), TControl::getUniqueID(), TControl::getViewState(), TControl::getVisible(), TControl::hasAttribute(), TControl::initRecursive(), TControl::isDescendentOf(), TControl::isObjectRegistered(), TControl::loadRecursive(), TControl::loadState(), TControl::loadStateRecursive(), TControl::onDataBinding(), TControl::onInit(), TControl::onLoad(), TControl::onPreRender(), TControl::onUnload(), TControl::preRenderRecursive(), TControl::raiseBubbleEvent(), TControl::registerObject(), TControl::removeAttribute(), TControl::removedControl(), TControl::render(), TControl::renderChildren(), TControl::renderControl(), TControl::saveState(), TControl::saveStateRecursive(), TControl::setAdapter(), TControl::setAttribute(), TControl::setChildControlsCreated(), TControl::setControlStage(), TControl::setControlState(), TControl::setCustomData(), TControl::setEnabled(), TControl::setEnableTheming(), TControl::setEnableViewState(), TControl::setID(), TControl::setPage(), TControl::setSkinID(), TControl::setTemplateControl(), TControl::setViewState(), TControl::setVisible(), TControl::trackViewState(), TControl::traverseChildControls(), TControl::unbindProperty(), TControl::unloadRecursive(), TControl::unregisterObject(), TControl::__get()
|
| Methods Inherited From TComponent |
|
TComponent::addParsedObject(), TComponent::attachEventHandler(), TComponent::canGetProperty(), TComponent::canSetProperty(), TComponent::createdOnTemplate(), TComponent::detachEventHandler(), TComponent::evaluateExpression(), TComponent::evaluateStatements(), TComponent::getEventHandlers(), TComponent::getSubProperty(), TComponent::hasEvent(), TComponent::hasEventHandler(), TComponent::hasProperty(), TComponent::raiseEvent(), TComponent::setSubProperty(), TComponent::__get(), TComponent::__set()
|
| Method Details |
addAttributesToRender
| protected void addAttributesToRender |
(THtmlWriter $writer ) |
Adds attribute name-value pairs to renderer.
This method overrides the parent implementation with additional TKeyboard specific attributes.
| Input |
| THtmlWriter | $writer | the writer used for the rendering purpose |
| Output |
| Exception |
|
getAutoHide
| public boolean getAutoHide |
() |
| Output |
|
boolean
| whether the keyboard should be hidden when the textbox is not in focus. Defaults to true. |
| Exception |
|
getClientClassName
| protected string getClientClassName |
() |
| Output |
|
string
| the Javascript class name for this control |
| Exception |
|
getClientOptions
| protected array getClientOptions |
() |
| Output |
|
array
| the JavaScript options for this control |
| Exception |
|
getCssUrl
| public string getCssUrl |
() |
| Output |
|
string
| the URL for the CSS file to customize the appearance of the keyboard. |
| Exception |
|
getForControl
| public string getForControl |
() |
| Output |
|
string
| the ID path of the TTextBox control |
| Exception |
|
getKeyboardCssClass
| public string getKeyboardCssClass |
() |
| Output |
|
string
| the CSS class name for the keyboard <div> element. Defaults to 'Keyboard'. |
| Exception |
|
onPreRender
| public void onPreRender |
(mixed $param ) |
Registers CSS and JS.
This method is invoked right before the control rendering, if the control is visible.
| Input |
| mixed | $param | event parameter |
| Output |
| Exception |
|
registerClientScript
| protected void registerClientScript |
() |
Registers the relevant JavaScript.
|
registerStyleSheet
| protected void registerStyleSheet |
() |
Registers the CSS relevant to the TKeyboard.
It will register the CSS file specified by CssUrl. If that is not set, it will use the default CSS.
|
setAutoHide
| public void setAutoHide |
(boolean $value ) |
| Input |
| boolean | $value | whether the keyboard should be hidden when the textbox is not in focus. |
| Output |
| Exception |
|
setCssUrl
| public void setCssUrl |
(string $value ) |
| Input |
| string | $value | the URL for the CSS file to customize the appearance of the keyboard. |
| Output |
| Exception |
|
setForControl
| public void setForControl |
(string $value ) |
Sets the ID path of the TTextBox control.
The ID path is the dot-connected IDs of the controls reaching from the keyboard's naming container to the target control.
| Input |
| string | $value | the ID path |
| Output |
| Exception |
|
setKeyboardCssClass
| public void setKeyboardCssClass |
(string $value ) |
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 CssUrl which uses the new CSS class name for styling.
| Input |
| string | $value | the CSS class name for the keyboard <div> element. |
| Output |
| Exception |
|
|