System.Web.UI.WebControls
[ class tree: System.Web.UI.WebControls ] [ index: System.Web.UI.WebControls ] [ all elements ]

Class: TWebControl

Source Location: /Web/UI/WebControls/TWebControl.php

Class Overview

TComponent
   |
   --TControl
      |
      --TWebControl

TWebControl class

Class Details

[line 67]
TWebControl class

TWebControl is the base class for HTML controls that share a set of common properties defining their outlook. These properties are kept in viewstate and can be restored upon a postback request.

Namespace: System.Web.UI.WebControls

Properties

  • Enabled, string, default=true, kept in viewstate
    Gets or sets a value indicating whether the control is enabled. Use the Enabled property to specify or determine whether a control is functional. When set to false, the control may appear dimmed, preventing any input from being entered.
  • CssClass, string, kept in viewstate
    Gets or sets the Cascading Style Sheet (CSS) class rendered by the control on the client.
  • AccessKey, string, kept in viewstate
    Gets or sets the access key (underlined letter) that allows you to quickly navigate to the control at the client side. AccessKey must only be assigned a one-character string.
  • TabIndex, integer, default=0, kept in viewstate
    Gets or sets the tab index of the control. When you press the Tab key, the order in which the controls receive focus is determined by the TabIndex property of each control. The value 0 means the tab index is not set.
  • ToolTip, string, kept in viewstate
    Gets or sets the text displayed when the mouse pointer hovers over the control.
  • Style, ArrayObject, kept in viewstate
    Gets the Cascading Style Sheet (CSS) rendered by the control on the client. You can modify a single style in code by treating Style as an array and modifying a key and value.
  • Width, string, default='', kept in viewstate
    Gets or sets the width of the control
  • Height, string, default='', kept in viewstate
    Gets or sets the height of the control
  • ForeColor, string, kept in viewstate
    Gets or sets the foreground color of the control
  • BackColor, string, kept in viewstate
    Gets or sets the background color of the control
  • BorderWidth, string, default='', kept in viewstate
    Gets or sets the border width of the control
  • BorderColor, string, kept in viewstate
    Gets or sets the border color of the control
  • BorderStyle, string, kept in viewstate
    Gets or sets the border style of the control




version:  v1.0, last update on 2004/08/13 21:44:52
author:  Qiang Xue <qiang.xue@gmail.com>


[ Top ]

Methods


Child classes:

TBaseDataList
TBaseDataList class
TButton
TButton class
TCheckBox
TCheckBox class
TDataListItem
TDataListItem class
TFileUpload
TFileUpload class
TFormLabel
TFormLabel class
THyperLink
THyperLink class
TImage
TImage class
TLabel
TLabel class
TLinkButton
TLinkButton class
TListControl
TListControl class
TPanel
TPanel class
TTable
TTable class
TTableCell
TTableCell class
TTableRow
TTableRow class
TTextBox
TTextBox class
TValidationSummary
TValidationSummary class
TValidator
TValidator class

Inherited Variables

Inherited Methods

Class: TControl

TControl::__construct()
Constructor.
TControl::addBody()
Appends an object into the body collection of this control.
TControl::addParsedObject()
Adds the object parsed in template as a body of the component.
TControl::allowBody()
Determines whether the control can add the object as a body.
TControl::clearViewState()
Clears viewstate
TControl::findBodyControl()
TControl::getAttribute()
TControl::getAttributes()
Returns the attribute list object.
TControl::getAttributesToRender()
Returns attributes to be rendered.
TControl::getBodies()
TControl::getClientID()
Returns the client ID of the component.
TControl::getContainer()
Returns the container of this component.
TControl::getSkinName()
TControl::getTagName()
TControl::getViewState()
Returns a viewstate value.
TControl::initSkin()
Initializes a skin for the control. If a skin name is provided then that skin will be loaded.
TControl::isViewStateEnabled()
TControl::isVisible()
This method checks whether a control is visible.
TControl::loadViewState()
Loads viewstate into this component and its children.
TControl::onBubbleEvent()
This method responds to a bubbled event.
TControl::onInit()
This method is invoked when the control enters 'Init' stage.
TControl::onInitRecursive()
Calls onInit of this control and its children recursively.
TControl::onLoad()
This method is invoked when the control enters 'Load' stage.
TControl::onLoadRecursive()
Calls onLoad of this control and its children recursively.
TControl::onPreRender()
This method is invoked when the control enters 'PreRender' stage.
TControl::onPreRenderRecursive()
Calls onPreRender of this control and its children recursively.
TControl::onUnload()
This method is invoked when the control enters 'Unload' stage.
TControl::onUnloadRecursive()
Calls onUnload of this control and its children recursively.
TControl::raiseBubbleEvent()
Invokes the parent's onBubbleEvent method.
TControl::removeBodies()
Removes all body content.
TControl::render()
Renders this control.
TControl::renderAttributes()
Renders the attributes.
TControl::renderBody()
Renders the body content.
TControl::saveViewState()
Returns the viewstate of this component and its children.
TControl::setAttribute()
Sets an attribute.
TControl::setContainer()
Sets the container of this component
TControl::setEnableViewState()
TControl::setSkinName()
Sets the skin to use for this control
TControl::setTagName()
Sets the tag name.
TControl::setViewState()
Sets a viewstate value.
TControl::setVisible()
TControl::synchronizeControl()
This method should only be used by framework developer.

Class: TComponent

TComponent::__construct()
Constructor.
TComponent::addChild()
Adds a child component.
TComponent::addParsedObject()
Handles a component or string met in template.
TComponent::attachEventHandler()
Attaches a handler function to an event.
TComponent::bindProperty()
Sets up the binding between a property and an expression.
TComponent::canGetProperty()
Determines whether a property can be read.
TComponent::canSetProperty()
Determines whether a property can be written.
TComponent::createComponent()
Creates a child component.
TComponent::dataBind()
Performs the databinding for this component.
TComponent::evaluateExpression()
Evaluates a PHP expression.
TComponent::evaluateStatements()
Evaluates a list of PHP statements.
TComponent::findObject()
Finds an object by its ID path.
TComponent::getApplication()
TComponent::getChild()
TComponent::getChildren()
TComponent::getDefinition()
Returns or builds a component definition.
TComponent::getGlobalization()
Returns the Globalization instance for the application.
TComponent::getID()
TComponent::getModule()
Returns the module object that contains the component or the page containing the component.
TComponent::getPage()
TComponent::getParent()
TComponent::getPropertyInitValue()
Gets the initial value of a property.
TComponent::getPropertyType()
Returns the type of a property
TComponent::getRequest()
Returns the request object associated with application.
TComponent::getServiceManager()
Returns the service manager for this application.
TComponent::getSession()
Returns the session object associated with the application.
TComponent::getSessionState()
Returns a session variable.
TComponent::getUniqueID()
Returns the unique ID of the component.
TComponent::getUser()
Returns the user object associated with the application.
TComponent::hasChildren()
TComponent::hasEvent()
Determines whether an event is defined.
TComponent::hasProperty()
Determines whether a property is defined.
TComponent::initProperties()
Initializes the property values.
TComponent::instantiateTemplate()
Parses a template string and instantiates the content.
TComponent::onDataBinding()
This method is invoked when dataBind is invoked for the component.
TComponent::raiseEvent()
Invokes all attached event handler functions for a particular event.
TComponent::removeChild()
Removes a child component.
TComponent::removeChildren()
Removes all child components.
TComponent::setAttribute()
Sets an attribute.
TComponent::setDefinition()
Sets a component definition.
TComponent::setID()
Sets a component ID.
TComponent::setParent()
Sets the parent of this component.
TComponent::setPropertyInitValue()
Sets the initial value of a property.
TComponent::setRoot()
Sets the root component in the component hierarchy.
TComponent::setSessionState()
Sets a session variable.
TComponent::unbindProperty()
Breaks the binding between a property and an expression.
TComponent::__get()
Returns a property value by name or a child component by ID.
TComponent::__set()
Sets value of a component property.

Class Methods


method appendJavascriptEvent [line 352]

void appendJavascriptEvent( string $event, string $js)

Append a javascript statement to a particular attribute, e.g. "onclick".



access:  public


Parameters:

string   $event   the event attribute name, e.g. "onclick"
string   $js   the javascript statement, e.g. alert('hello')

[ Top ]

method getAccessKey [line 106]

string getAccessKey( )



return:  the access key of the control
access:  public


[ Top ]

method getAttributesToRender [line 392]

ArrayObject getAttributesToRender( )

This overrides the parent implementation by rendering more TWebControl-specific attributes.



return:  the attributes to be rendered
access:  protected


Overridden in child classes as:

TDataGrid::getAttributesToRender()
Returns the attributes to be rendered.
TDataList::getAttributesToRender()
Returns the attributes to be rendered.
TButton::getAttributesToRender()
This overrides the parent implementation by rendering more TButton-specific attributes.
TCheckBox::getAttributesToRender()
Returns the attributes to be rendered.
TRadioButton::getAttributesToRender()
Returns the attributes to be rendered.
TDataListItem::getAttributesToRender()
Returns the attributes to be rendered.
TFileUpload::getAttributesToRender()
This overrides the parent implementation by rendering more TButton-specific attributes.
TFormLabel::getAttributesToRender()
This overrides the parent implementation by rendering the FOR attributes.
THyperLink::getAttributesToRender()
This overrides the parent implementation by rendering more THyperLink-specific attributes.
TImage::getAttributesToRender()
This overrides the parent implementation by rendering more TImage-specific attributes.
TImageButton::getAttributesToRender()
This overrides the parent implementation by rendering more TImageButton-specific attributes.
TLinkButton::getAttributesToRender()
This overrides the parent implementation by rendering more TLinkButton-specific attributes.
TCheckBoxList::getAttributesToRender()
Returns the attributes to be rendered.
TDropDownList::getAttributesToRender()
Returns the attributes to be rendered.
TListBox::getAttributesToRender()
Returns the attributes to be rendered.
TPanel::getAttributesToRender()
This overrides the parent implementation by rendering more TPanel-specific attributes.
TWizardStep::getAttributesToRender()
Override the parent implementation. If the Title property is define, add the "title" attribute using the Title property.
TTable::getAttributesToRender()
Returns the attributes to be rendered.
TTableCell::getAttributesToRender()
Returns the attributes to be rendered.
TTableRow::getAttributesToRender()
Returns the attributes to be rendered.
TTextBox::getAttributesToRender()
Returns the attributes to be rendered.

Overrides TControl::getAttributesToRender() (Returns attributes to be rendered.)

[ Top ]

method getBackColor [line 282]

string getBackColor( )



return:  the background color of the control
access:  public


[ Top ]

method getBorderColor [line 299]

string getBorderColor( )



return:  the border color of the control
access:  public


[ Top ]

method getBorderStyle [line 316]

string getBorderStyle( )



return:  the border style of the control
access:  public


[ Top ]

method getBorderWidth [line 333]

string getBorderWidth( )



return:  the border width of the control
access:  public


[ Top ]

method getCssClass [line 89]

string getCssClass( )



return:  the CSS class of the control
access:  public


[ Top ]

method getForeColor [line 265]

string getForeColor( )



return:  the foreground color of the control
access:  public


[ Top ]

method getHeight [line 248]

string getHeight( )



return:  the height of the control
access:  public


[ Top ]

method getJavascriptEvents [line 383]

array getJavascriptEvents( )

Get the list of all the javascript statements.



return:  list of javascript events and their statements.
access:  public


[ Top ]

method getStyle [line 223]

ArrayObject getStyle( )



return:  the CSS style of the control
access:  public


[ Top ]

method getTabIndex [line 127]

integer getTabIndex( )



return:  the tab index of the control
access:  public


[ Top ]

method getToolTip [line 145]

string getToolTip( )



return:  the tooltip of the control
access:  public


[ Top ]

method getWidth [line 231]

string getWidth( )



return:  the width of the control
access:  public


[ Top ]

method isEnabled [line 72]

boolean isEnabled( )



return:  whether the control is enabled.
access:  public


[ Top ]

method parseStyle [line 164]

void parseStyle( string $str)

Parses a CSS style string into an array representation.



access:  public


Parameters:

string   $str   the CSS style string to be parsed

[ Top ]

method removeJavascriptEvent [line 364]

void removeJavascriptEvent( string $event, [string|null $js = null])

Remove all or a particular javascript statements.



access:  public


Parameters:

string   $event   the javascript event attribute name
string|null   $js   the javascript statement to remove, null will remove all.

[ Top ]

method setAccessKey [line 117]

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 empty string if you want to disable access key.




access:  public


Parameters:

string   $value   the access key to be set

[ Top ]

method setBackColor [line 291]

void setBackColor( string $value)

Sets the background color of the control



access:  public


Parameters:

string   $value   the background color of the control

[ Top ]

method setBorderColor [line 308]

void setBorderColor( string $value)

Sets the border color of the control



access:  public


Parameters:

string   $value   the border color of the control

[ Top ]

method setBorderStyle [line 325]

void setBorderStyle( string $value)

Sets the border style of the control



access:  public


Parameters:

string   $value   the border style of the control

[ Top ]

method setBorderWidth [line 342]

void setBorderWidth( string $value)

Sets the border width of the control



access:  public


Parameters:

string   $value   the border width of the control

[ Top ]

method setCssClass [line 98]

void setCssClass( string $value)

Sets the CSS class name of the control



access:  public


Parameters:

string   $value   the CSS class name to be set

[ Top ]

method setEnabled [line 81]

void setEnabled( boolean $value)

Enables or disables a control.



access:  public


Overridden in child classes as:

TValidator::setEnabled()
This method overrides parent's implementation by setting isValid to true if disabled.

Parameters:

boolean   $value   whether the control is to be enabled.

[ Top ]

method setForeColor [line 274]

void setForeColor( string $value)

Sets the foreground color of the control



access:  public


Parameters:

string   $value   the foreground color of the control

[ Top ]

method setHeight [line 257]

void setHeight( string $value)

Sets the height of the control



access:  public


Parameters:

string   $value   the height of the control

[ Top ]

method setStyle [line 194]

void setStyle( string|array $value)

Sets the CSS style of the control.

Note, the change is incremental and will overwrite existing style settings. To clear all the styles, pass a null value.




access:  public


Parameters:

string|array   $value   the CSS style to be set

[ Top ]

method setTabIndex [line 137]

void setTabIndex( integer $value)

Sets the tab index of the control.

Pass 0 if you want to disable tab index.




access:  public


Parameters:

integer   $value   the tab index to be set

[ Top ]

method setToolTip [line 155]

void setToolTip( string $value)

Sets the tooltip of the control.

Pass empty string if you want to disable tooltip.




access:  public


Parameters:

string   $value   the tooltip to be set

[ Top ]

method setWidth [line 240]

void setWidth( string $value)

Sets the width of the control



access:  public


Parameters:

string   $value   the width of the control

[ Top ]


© 2004-2005 PRADO Software Group. All Rights Reserved.