## Class TPanel

Description

TPanel class

TPanel represents a component that acts as a container for other component. It is especially useful when you want to generate components programmatically or hide/show a group of components.

By default, TPanel displays a &lt;div&gt; element on a page. Children of TPanel are displayed as the body content of the element. The property Wrap can be used to set whether the body content should wrap or not. HorizontalAlign governs how the content is aligned horizontally, and Direction indicates the content direction (left to right or right to left). You can set BackImageUrl to give a background image to the panel, and you can ste GroupingText so that the panel is displayed as a field set with a legend text. Finally, you can specify a default button to be fired when users press 'return' key within the panel by setting the DefaultButton property.

- since: 3.0
- version: $Id: TPanel.php 2541 2008-10-21 15:05:13Z qiang.xue $
- author: Qiang Xue <qiang.xue@gmail.com>

Located in /Web/UI/WebControls/TPanel.php (line 42)

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

Direct descendents

Class | Description
--- | ---
TActivePanel | TActivePanel is the TPanel active control counterpart.
TDraggable | TDraggable is a control which can be dragged
TDropContainer | TDropContainer is a panel where TDraggable controls can be dropped.
TDataGridPager | TDataGridPager class.

Method Summary
void addAttributesToRender (THtmlWriter $writer)
TPanelStyle createStyle ()
string getBackImageUrl ()
string getDefaultButton ()
string getDirection ()
string getGroupingText ()
string getHorizontalAlign ()
string getScrollBars ()
string getTagName ()
boolean getWrap ()
void renderBeginTag (THtmlWriter $writer)
void renderEndTag (THtmlWriter $writer)
void setBackImageUrl (string $value)
void setDefaultButton (string $value)
void setDirection (string $value)
void setGroupingText (string $value)
void setHorizontalAlign (string $value)
void setScrollBars (string $value)
void setWrap (boolean $value)
Methods
addAttributesToRender (line 72)

Adds attributes to renderer.

- access: protected
- throws: TInvalidDataValueException if default button is not right.

void addAttributesToRender (THtmlWriter $writer)

- THtmlWriter $writer: the renderer

Redefinition of:

TWebControl::addAttributesToRender()
  Adds attribute name-value pairs to renderer.

Redefined in descendants as:

- TActivePanel::addAttributesToRender() : Adds attribute id to the renderer.
- TDraggable::addAttributesToRender() : Ensure that the ID attribute is rendered and registers the javascript code for initializing the active control.
- TDropContainer::addAttributesToRender() : Ensure that the ID attribute is rendered and registers the javascript code for initializing the active control.

createStyle (line 62)

Creates a style object to be used by the control.

This method overrides the parent impementation by creating a TPanelStyle object.

- return: the style used by TPanel.
- access: protected

TPanelStyle createStyle ()

Redefinition of:

TWebControl::createStyle()
  Creates a style object to be used by the control.

getBackImageUrl (line 125)

- return: the URL of the background image for the panel component.
- access: public

string getBackImageUrl ()
getDefaultButton (line 159)

- return: the ID path to the default button. Defaults to empty.
- access: public

string getDefaultButton ()
getDirection (line 142)

- return: alignment of the content in the panel. Defaults to 'NotSet'.
- access: public

string getDirection ()
getGroupingText (line 179)

- return: the legend text when the panel is used as a fieldset. Defaults to empty.
- access: public

string getGroupingText ()
getHorizontalAlign (line 107)

- return: the horizontal alignment of the contents within the panel, defaults to 'NotSet'.
- access: public

string getHorizontalAlign ()
getScrollBars (line 195)

- return: the visibility and position of scroll bars in a panel control, defaults to None.
- access: public

string getScrollBars ()
getTagName (line 52)

- return: tag name of the panel
- access: protected

string getTagName ()

Redefinition of:

TWebControl::getTagName()
  Returns the tag name used for this control.

getWrap (line 90)

- return: whether the content wraps within the panel. Defaults to true.
- access: public

boolean getWrap ()
renderBeginTag (line 213)

Renders the openning tag for the control (including attributes)

- access: public

void renderBeginTag (THtmlWriter $writer)

- THtmlWriter $writer: the writer used for the rendering purpose

Redefinition of:

TWebControl::renderBeginTag()
  Renders the openning tag for the control (including attributes)

renderEndTag (line 229)

Renders the closing tag for the control

- access: public

void renderEndTag (THtmlWriter $writer)

- THtmlWriter $writer: the writer used for the rendering purpose

Redefinition of:

TWebControl::renderEndTag()
  Renders the closing tag for the control

setBackImageUrl (line 134)

Sets the URL of the background image for the panel component.

- access: public

void setBackImageUrl (string $value)

- string $value: the URL

setDefaultButton (line 171)

Specifies the default button for the panel.

The default button will be fired (clicked) whenever a user enters 'return' key within the panel. The button must be locatable via the function call TControl::findControl.

- access: public

void setDefaultButton (string $value)

- string $value: the ID path to the default button.

setDirection (line 151)

- access: public

void setDirection (string $value)

- string $value: alignment of the content in the panel. Valid values include 'NotSet', 'LeftToRight', 'RightToLeft'.

setGroupingText (line 187)

- access: public

void setGroupingText (string $value)

- string $value: the legend text. If this value is not empty, the panel will be rendered as a fieldset.

setHorizontalAlign (line 117)

Sets the horizontal alignment of the contents within the panel.

Valid values include 'NotSet', 'Justify', 'Left', 'Right', 'Center'

- access: public

void setHorizontalAlign (string $value)

- string $value: the horizontal alignment

setScrollBars (line 204)

- access: public

void setScrollBars (string $value)

- string $value: the visibility and position of scroll bars in a panel control. Valid values include None, Auto, Both, Horizontal and Vertical.

setWrap (line 99)

Sets the value indicating whether the content wraps within the panel.

- access: public

void setWrap (boolean $value)

- boolean $value: whether the content wraps within the panel.

#### 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

#### Inherited Constants

Inherited from TControl

> TControl::AUTOMATIC_ID_PREFIX
> TControl::CLIENT_ID_SEPARATOR
> TControl::CS_CHILD_INITIALIZED
> TControl::CS_CONSTRUCTED
> TControl::CS_INITIALIZED
> TControl::CS_LOADED
> TControl::CS_PRERENDERED
> TControl::CS_STATE_LOADED
> TControl::ID_FORMAT
> TControl::ID_SEPARATOR
> TControl::IS_CHILD_CREATED
> TControl::IS_CREATING_CHILD
> TControl::IS_DISABLE_THEMING
> TControl::IS_DISABLE_VIEWSTATE
> TControl::IS_ID_SET
> TControl::IS_SKIN_APPLIED
> TControl::IS_STYLESHEET_APPLIED
> TControl::RF_ADAPTER
> TControl::RF_AUTO_BINDINGS
> TControl::RF_CHILD_STATE
> TControl::RF_CONTROLS
> TControl::RF_CONTROLSTATE
> TControl::RF_DATA_BINDINGS
> TControl::RF_EVENTS
> TControl::RF_NAMED_CONTROLS
> TControl::RF_NAMED_CONTROLS_ID
> TControl::RF_NAMED_OBJECTS
> TControl::RF_SKIN_ID

Documentation generated on Mon, 22 Feb 2010 12:18:22 +0000 by phpDocumentor 1.3.0RC4