Packages:
default
System
System.Caching
System.Collections
System.Data
System.Data.ActiveRecord
System.Data.ActiveRecord.Relations
System.Data.ActiveRecord.Scaffold
System.Data.ActiveReecord.Scaffold.InputBuilder
System.Data.Commom.Sqlite
System.Data.Common
System.Data.Common.Mssql
System.Data.Common.Mysql
System.Data.Common.Oracle
System.Data.Common.Pgsql
System.Data.Common.Sqlite
System.Data.DataGateway
System.Data.SqlMap
System.Data.SqlMap.Configuration
System.Data.SqlMap.Statements
System.Exceptions
System.I18N
System.IO
System.Security
System.Util
System.Web
System.Web.Services
System.Web.UI
System.Web.UI.ActiveControls
System.Web.UI.WebControls
System.Web.UI.WebControls.assets
System.Xml


Classes:
IDataSource
IItemDataRenderer
IRepeatInfoUser
TActiveFileUpload
TBaseDataList
TBaseValidator
TBoundColumn
TBulletedList
TBulletedListDisplayMode
TBulletedListEventParameter
TBulletStyle
TButton
TButtonColumn
TButtonColumnType
TButtonType
TCaptcha
TCaptchaValidator
TCheckBox
TCheckBoxColumn
TCheckBoxList
TCircleHotSpot
TClientScript
TClientScriptLoader
TClientSideValidationSummaryOptions
TColorPicker
TColorPickerClientSide
TColorPickerMode
TCompareValidator
TCompleteWizardStep
TConditional
TContent
TContentDirection
TContentPlaceHolder
TCustomValidator
TDataBoundControl
TDataGrid
TDataGridColumn
TDataGridColumnCollection
TDataGridCommandEventParameter
TDataGridItem
TDataGridItemCollection
TDataGridItemEventParameter
TDataGridItemRenderer
TDataGridPageChangedEventParameter
TDataGridPager
TDataGridPagerButtonType
TDataGridPagerEventParameter
TDataGridPagerMode
TDataGridPagerPosition
TDataGridPagerStyle
TDataGridSortCommandEventParameter
TDataList
TDataListCommandEventParameter
TDataListItem
TDataListItemCollection
TDataListItemEventParameter
TDataListItemRenderer
TDataRenderer
TDataSourceControl
TDataSourceSelectParameters
TDataSourceView
TDataTypeValidator
TDatePicker
TDatePickerClientScript
TDatePickerInputMode
TDatePickerMode
TDatePickerPositionMode
TDisplayStyle
TDraggable
TDropContainer
TDropDownList
TDropDownListColumn
TEditCommandColumn
TEmailAddressValidator
TExpression
TFileUpload
TFont
THiddenField
THorizontalAlign
THotSpot
THotSpotCollection
THotSpotMode
THtmlArea
THtmlElement
THyperLink
THyperLinkColumn
TImage
TImageButton
TImageClickEventParameter
TImageMap
TImageMapEventParameter
TInlineFrame
TInlineFrameAlign
TInlineFrameScrollBars
TItemDataRenderer
TJavascriptLogger
TKeyboard
TLabel
TLinkButton
TListBox
TListControl
TListControlValidator
TListItem
TListItemCollection
TListItemType
TListSelectionMode
TLiteral
TLiteralColumn
TMarkdown
TMetaTag
TMetaTagCollection
TMultiView
TOutputCache
TOutputCacheCalculateKeyEventParameter
TOutputCacheCheckDependencyEventParameter
TPager
TPagerButtonType
TPagerMode
TPagerPageChangedEventParameter
TPanel
TPanelStyle
TPlaceHolder
TPolygonHotSpot
TRadioButton
TRadioButtonList
TRangeValidationDataType
TRangeValidator
TRatingList
TReadOnlyDataSource
TReadOnlyDataSourceView
TRectangleHotSpot
TRegularExpressionValidator
TRepeatDirection
TRepeater
TRepeaterCommandEventParameter
TRepeaterItem
TRepeaterItemCollection
TRepeaterItemEventParameter
TRepeaterItemRenderer
TRepeatInfo
TRepeatLayout
TRequiredFieldValidator
TSafeHtml
TScrollBars
TServerValidateEventParameter
TSlider
TSliderClientScript
TSliderDirection
TStatements
TStyle
TStyleSheet
TTable
TTableCaptionAlign
TTableCell
TTableCellCollection
TTableFooterRow
TTableGridLines
TTableHeaderCell
TTableHeaderRow
TTableHeaderScope
TTableItemStyle
TTableRow
TTableRowCollection
TTableRowSection
TTableStyle
TTabPanel
TTabView
TTabViewCollection
TTemplateColumn
TTemplatedWizardStep
TTextAlign
TTextBox
TTextBoxAutoCompleteType
TTextBoxMode
TTextHighlighter
TTextHighlighterLineNumberStyle
TValidationCompareOperator
TValidationDataType
TValidationSummary
TValidationSummaryDisplayMode
TValidationSummaryDisplayStyle
TValidatorClientSide
TValidatorDisplayStyle
TVerticalAlign
TView
TViewCollection
TWebControl
TWebControlAdapter
TWizard
TWizardFinishNavigationTemplate
TWizardNavigationButtonStyle
TWizardNavigationButtonType
TWizardNavigationContainer
TWizardNavigationEventParameter
TWizardNavigationTemplate
TWizardSideBarListItemTemplate
TWizardSideBarTemplate
TWizardStartNavigationTemplate
TWizardStep
TWizardStepCollection
TWizardStepNavigationTemplate
TWizardStepType
TXmlTransform
Keyword

Class TWebControl

TComponent
   |
   --TApplicationComponent
      |
      --TControl
         |
         --TWebControl

TWebControl class

TWebControl is the base class for controls that share a common set of UI-related properties and methods. TWebControl-derived controls are usually associated with HTML tags. They thus have tag name, attributes and body contents. You can override getTagName to specify the tag name, addAttributesToRender to specify the attributes to be rendered, and renderContents to customize the body content rendering. TWebControl encapsulates a set of properties related with CSS style fields, such as BackColor, BorderWidth, etc.

Subclasses of TWebControl typically needs to override addAttributesToRender and renderContents. The former is used to render the attributes of the HTML tag associated with the control, while the latter is to render the body contents enclosed within the HTML tag.

Since: 3.0
Author: Qiang Xue <qiang.xue@gmail.com>
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.
void
Removes all style data.
void
copyBaseAttributes ( TWebControl $control)
Copies basic control attributes from another control.
protected  TStyle
Creates a style object to be used by the control.
string
string
string
string
string
string
TDisplayStyle
TFont
getFont ()
string
boolean
string
TStyle
integer
protected  string
Returns the tag name used for this control.
string
string
void
render ( THtmlWriter $writer)
Renders the control.
void
Renders the openning tag for the control (including attributes)
void
Renders the body content enclosed between the control tag.
void
Renders the closing tag for the control
void
setAccessKey ( string $value)
Sets the access key of the control.
void
setBackColor ( string $value)
void
setBorderColor ( string $value)
void
setBorderStyle ( string $value)
void
setBorderWidth ( string $value)
void
setCssClass ( string $value)
void
void
setForeColor ( string $value)
void
setHeight ( string $value)
void
setStyle ( string $value)
Sets the css style string of the control.
void
setTabIndex ( integer $value)
Sets the tab index of the control.
void
setToolTip ( string $value)
Sets the tooltip of the control.
void
setWidth ( string $value)
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 TApplicationComponent
TApplicationComponent::getApplication(), TApplicationComponent::getRequest(), TApplicationComponent::getResponse(), TApplicationComponent::getService(), TApplicationComponent::getSession(), TApplicationComponent::getUser(), TApplicationComponent::publishAsset(), TApplicationComponent::publishFilePath()
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()

Constant Summary

Method Details

addAttributesToRender

protected void addAttributesToRender (THtmlWriter $writer )

Adds attribute name-value pairs to renderer.

By default, the method will render 'id', 'accesskey', 'disabled', 'tabindex', 'title' and all custom attributes. The method can be overriden to provide customized attribute rendering.

Input
THtmlWriter$writerthe writer used for the rendering purpose
Output
Exception

clearStyle

public void clearStyle ()

Removes all style data.

Output
Exception

copyBaseAttributes

public void copyBaseAttributes (TWebControl $control )

Copies basic control attributes from another control.

Properties including AccessKey, ToolTip, TabIndex, Enabled and Attributes are copied.

Input
TWebControl$controlsource control
Output
Exception

createStyle

protected TStyle createStyle ()

Creates a style object to be used by the control.

This method may be overriden by controls to provide customized style.

Output
TStyle the default style created for TWebControl
Exception

getAccessKey

public string getAccessKey ()

Output
string the access key of the control
Exception

getBackColor

public string getBackColor ()

Output
string the background color of the control
Exception

getBorderColor

public string getBorderColor ()

Output
string the border color of the control
Exception

getBorderStyle

public string getBorderStyle ()

Output
string the border style of the control
Exception

getBorderWidth

public string getBorderWidth ()

Output
string the border width of the control
Exception

getCssClass

public string getCssClass ()

Output
string the css class of the control
Exception

getDisplay

public TDisplayStyle getDisplay ()

Output
TDisplayStyle display style of the control, default is TDisplayStyle::Fixed
Exception

getFont

public TFont getFont ()

Output
TFont the font of the control
Exception

getForeColor

public string getForeColor ()

Output
string the foreground color of the control
Exception

getHasStyle

public boolean getHasStyle ()

Output
boolean whether the control has defined any style information
Exception

getHeight

public string getHeight ()

Output
string the height of the control
Exception

getStyle

public TStyle getStyle ()

Output
TStyle the object representing the css style of the control
Exception

getTabIndex

public integer getTabIndex ()

Output
integer the tab index of the control
Exception

getTagName

protected string getTagName ()

Returns the tag name used for this control.

By default, the tag name is 'span'. You can override this method to provide customized tag names.

Output
string tag name of the control to be rendered
Exception

getToolTip

public string getToolTip ()

Output
string the tooltip of the control
Exception

getWidth

public string getWidth ()

Output
string the width of the control
Exception

render

public void render (THtmlWriter $writer )

Renders the control.

This method overrides the parent implementation by replacing it with the following sequence:

Input
THtmlWriter$writerthe writer used for the rendering purpose
Output
Exception

renderBeginTag

public void renderBeginTag (THtmlWriter $writer )

Renders the openning tag for the control (including attributes)

Input
THtmlWriter$writerthe writer used for the rendering purpose
Output
Exception

renderContents

public void renderContents (THtmlWriter $writer )

Renders the body content enclosed between the control tag.

By default, child controls and text strings will be rendered. You can override this method to provide customized content rendering.

Input
THtmlWriter$writerthe writer used for the rendering purpose
Output
Exception

renderEndTag

public void renderEndTag (THtmlWriter $writer )

Renders the closing tag for the control

Input
THtmlWriter$writerthe writer used for the rendering purpose
Output
Exception

setAccessKey

public void setAccessKey (string $value )

Sets the access key of the control.

Only one-character string can be set, or an exception will be raised. Pass in an empty string if you want to disable access key.

Input
string$valuethe access key to be set
Output
Exception
throwsTInvalidDataValueException if the access key is specified with more than one character

setBackColor

public void setBackColor (string $value )

Input
string$valuethe background color of the control
Output
Exception

setBorderColor

public void setBorderColor (string $value )

Input
string$valuethe border color of the control
Output
Exception

setBorderStyle

public void setBorderStyle (string $value )

Input
string$valuethe border style of the control
Output
Exception

setBorderWidth

public void setBorderWidth (string $value )

Input
string$valuethe border width of the control
Output
Exception

setCssClass

public void setCssClass (string $value )

Input
string$valuethe css class of the control
Output
Exception

setDisplay

public void setDisplay (TDisplayStyle $value )

Input
TDisplayStyle$valuedisplay style of the control, default is TDisplayStyle::Fixed
Output
Exception

setForeColor

public void setForeColor (string $value )

Input
string$valuethe foreground color of the control
Output
Exception

setHeight

public void setHeight (string $value )

Input
string$valuethe height of the control
Output
Exception

setStyle

public void setStyle (string $value )

Sets the css style string of the control.

The style string will be prefixed to the styles set via other control properties (e.g. Height, Width).

Input
string$valuethe css style string
Output
Exception
throwsTInvalidDataValueException if the parameter is not a string

setTabIndex

public void setTabIndex (integer $value )

Sets the tab index of the control.

Pass 0 if you want to disable tab index.

Input
integer$valuethe tab index to be set
Output
Exception

setToolTip

public void setToolTip (string $value )

Sets the tooltip of the control.

Pass an empty string if you want to disable tooltip.

Input
string$valuethe tooltip to be set
Output
Exception

setWidth

public void setWidth (string $value )

Input
string$valuethe width of the control
Output
Exception