Class TKeyboard

Description

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:

  1. <com:TTextBox ID="PasswordInput" />
  2. <com:TKeyboard ForControl="PasswordInput" />

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.

  • since: 3.1.1
  • version: $Id: TKeyboard.php 2197 2007-09-03 19:02:11Z xue $
  • author: Sergey Morkovkin <sergeymorkovkin@mail.ru> and Qiang Xue <qiang.xue@gmail.com>

Located in /Web/UI/WebControls/TKeyboard.php (line 39)

TComponent
   |
   --TApplicationComponent
      |
      --TControl
         |
         --TWebControl
            |
            --TKeyboard
Method Summary
boolean getAutoHide ()
string getClientClassName ()
array getClientOptions ()
string getCssUrl ()
string getForControl ()
void onPreRender (mixed $param)
void setAutoHide (boolean $value)
void setCssUrl (string $value)
void setForControl (string $value)
void setKeyboardCssClass (string $value)
Methods
addAttributesToRender (line 131)

Adds attribute name-value pairs to renderer.

This method overrides the parent implementation with additional TKeyboard specific attributes.

  • access: protected
void addAttributesToRender (THtmlWriter $writer)
  • THtmlWriter $writer: the writer used for the rendering purpose

Redefinition of:
TWebControl::addAttributesToRender()
Adds attribute name-value pairs to renderer.
getAutoHide (line 63)
  • return: whether the keyboard should be hidden when the textbox is not in focus. Defaults to true.
  • access: public
boolean getAutoHide ()
getClientClassName (line 165)
  • return: the Javascript class name for this control
  • access: protected
string getClientClassName ()
getClientOptions (line 173)
  • return: the JavaScript options for this control
  • access: protected
array getClientOptions ()
getCssUrl (line 98)
  • return: the URL for the CSS file to customize the appearance of the keyboard.
  • access: public
string getCssUrl ()
getForControl (line 44)
  • return: the ID path of the TTextBox control
  • access: public
string getForControl ()
getKeyboardCssClass (line 79)
  • return: the CSS class name for the keyboard <div> element. Defaults to 'Keyboard'.
  • access: public
string getKeyboardCssClass ()
onPreRender (line 116)

Registers CSS and JS.

This method is invoked right before the control rendering, if the control is visible.

  • access: public
void onPreRender (mixed $param)
  • mixed $param: event parameter

Redefinition of:
TControl::onPreRender()
This method is invoked when the control enters 'OnPreRender' stage.
registerClientScript (line 153)

Registers the relevant JavaScript.

  • access: protected
void registerClientScript ()
registerStyleSheet (line 143)

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.

  • access: protected
void registerStyleSheet ()
setAutoHide (line 71)
  • access: public
void setAutoHide (boolean $value)
  • boolean $value: whether the keyboard should be hidden when the textbox is not in focus.
setCssUrl (line 106)
  • access: public
void setCssUrl (string $value)
  • string $value: the URL for the CSS file to customize the appearance of the keyboard.
setForControl (line 55)

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.

  • access: public
void setForControl (string $value)
  • string $value: the ID path
setKeyboardCssClass (line 90)

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.

  • access: public
void setKeyboardCssClass (string $value)
  • string $value: the CSS class name for the keyboard <div> element.

Inherited 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()

Inherited From TControl

TControl::__construct()
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()

Inherited From TApplicationComponent

TApplicationComponent::getApplication()
TApplicationComponent::getRequest()
TApplicationComponent::getResponse()
TApplicationComponent::getService()
TApplicationComponent::getSession()
TApplicationComponent::getUser()
TApplicationComponent::publishAsset()
TApplicationComponent::publishFilePath()

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()
Class Constants

Documentation generated on Mon, 21 Apr 2008 11:35:22 -0400 by phpDocumentor 1.3.0RC4