PRADO Component Framework for PHP 5
  • Home
  • About
  • Testimonials
  • Demos
  • Download
  • Documentation
  • Forum
  • Development
  • Tutorials
  • Class Docs
  • API Manual
  • Wiki

Packages

  • None
  • System
    • Caching
    • Collections
    • Data
      • ActiveRecord
        • Relations
        • Scaffold
          • InputBuilder
      • Commom
        • Sqlite
      • Common
        • Mssql
        • Mysql
        • Oracle
        • Pgsql
        • Sqlite
      • DataGateway
      • SqlMap
        • Configuration
        • Statements
    • Exceptions
    • I18N
    • IO
    • Security
    • Util
    • Web
      • Javascripts
      • Services
      • UI
        • ActiveControls
        • WebControls
    • Xml
  • Wsat
    • pages
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class TPanel

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 <div> element on a page. Children of TPanel are displayed as the body content of the element. The property setWrap Wrap can be used to set whether the body content should wrap or not. setHorizontalAlign HorizontalAlign governs how the content is aligned horizontally, and getDirection Direction indicates the content direction (left to right or right to left). You can set setBackImageUrl BackImageUrl to give a background image to the panel, and you can ste setGroupingText 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 setDefaultButton DefaultButton property.

TComponent
Extended by TApplicationComponent
Extended by TControl implements IRenderable, IBindable
Extended by TWebControl implements IStyleable
Extended by TPanel

Direct known subclasses

TActivePanel, TDataGridPager, TDraggable, TDropContainer

Indirect known subclasses

TActiveDataGridPager
Package: System\Web\UI\WebControls
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 3.0
Located at Web/UI/WebControls/TPanel.php
Methods summary
protected string
# getTagName( )

Returns

string
tag name of the panel

Overrides

TWebControl::getTagName()
protected TPanelStyle
# createStyle( )

Creates a style object to be used by the control. This method overrides the parent impementation by creating a TPanelStyle object.

Creates a style object to be used by the control. This method overrides the parent impementation by creating a TPanelStyle object.

Returns

TPanelStyle
the style used by TPanel.

Overrides

TWebControl::createStyle()
protected
# addAttributesToRender( THtmlWriter $writer )

Adds attributes to renderer.

Adds attributes to renderer.

Parameters

$writer
THtmlWriter
the renderer

Throws

TInvalidDataValueException
if default button is not right.

Overrides

TWebControl::addAttributesToRender()
public boolean
# getWrap( )

Returns

boolean
whether the content wraps within the panel. Defaults to true.
public
# setWrap( boolean $value )

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

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

Parameters

$value
boolean
whether the content wraps within the panel.
public string
# getHorizontalAlign( )

Returns

string
the horizontal alignment of the contents within the panel, defaults to 'NotSet'.
public
# setHorizontalAlign( string $value )

Sets the horizontal alignment of the contents within the panel. Valid values include 'NotSet', 'Justify', 'Left', 'Right', 'Center'

Sets the horizontal alignment of the contents within the panel. Valid values include 'NotSet', 'Justify', 'Left', 'Right', 'Center'

Parameters

$value
string
the horizontal alignment
public string
# getBackImageUrl( )

Returns

string
the URL of the background image for the panel component.
public
# setBackImageUrl( string $value )

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

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

Parameters

$value
string
the URL
public string
# getDirection( )

Returns

string
alignment of the content in the panel. Defaults to 'NotSet'.
public
# setDirection( string $value )

Parameters

$value
string
alignment of the content in the panel. Valid values include 'NotSet', 'LeftToRight', 'RightToLeft'.
public string
# getDefaultButton( )

Returns

string
the ID path to the default button. Defaults to empty.
public
# setDefaultButton( string $value )

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 findControl.

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 findControl.

Parameters

$value
string
the ID path to the default button.
public string
# getGroupingText( )

Returns

string
the legend text when the panel is used as a fieldset. Defaults to empty.
public
# setGroupingText( string $value )

Parameters

$value
string
the legend text. If this value is not empty, the panel will be rendered as a fieldset.
public string
# getScrollBars( )

Returns

string
the visibility and position of scroll bars in a panel control, defaults to None.
public
# setScrollBars( string $value )

Parameters

$value
string
the visibility and position of scroll bars in a panel control. Valid values include None, Auto, Both, Horizontal and Vertical.
public
# renderBeginTag( THtmlWriter $writer )

Renders the openning tag for the control (including attributes)

Renders the openning tag for the control (including attributes)

Parameters

$writer
THtmlWriter
the writer used for the rendering purpose

Overrides

TWebControl::renderBeginTag()
public
# renderEndTag( THtmlWriter $writer )

Renders the closing tag for the control

Renders the closing tag for the control

Parameters

$writer
THtmlWriter
the writer used for the rendering purpose

Overrides

TWebControl::renderEndTag()
public
# render( THtmlWriter $writer )

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

  • TPanel::renderBeginTag()
  • TWebControl::renderContents()
  • TPanel::renderEndTag()

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

  • TPanel::renderBeginTag()
  • TWebControl::renderContents()
  • TPanel::renderEndTag()

Parameters

$writer
THtmlWriter
the writer used for the rendering purpose

Overrides

TWebControl::render()
Methods inherited from TWebControl
clearStyle(), copyBaseAttributes(), getAccessKey(), getBackColor(), getBorderColor(), getBorderStyle(), getBorderWidth(), getCssClass(), getDecorator(), getDisplay(), getEnsureId(), getFont(), getForeColor(), getHasStyle(), getHeight(), getStyle(), getTabIndex(), getToolTip(), getWidth(), onPreRender(), renderContents(), setAccessKey(), setBackColor(), setBorderColor(), setBorderStyle(), setBorderWidth(), setCssClass(), setDisplay(), setEnsureId(), setForeColor(), setHeight(), setStyle(), setTabIndex(), setToolTip(), setWidth()
Methods inherited from TControl
__construct(), __get(), addParsedObject(), addToPostDataLoader(), addedControl(), applyStyleSheetSkin(), autoBindProperty(), autoDataBindProperties(), bindProperty(), broadcastEvent(), bubbleEvent(), clearChildState(), clearControlState(), clearNamingContainer(), clearViewState(), convertUniqueIdToClientId(), createChildControls(), createControlCollection(), dataBind(), dataBindChildren(), dataBindProperties(), ensureChildControls(), findControl(), findControlsByID(), findControlsByType(), focus(), getAdapter(), getAllowChildControls(), getAttribute(), getAttributes(), getChildControlsCreated(), getClientID(), getControlStage(), getControlState(), getControls(), getCustomData(), getEnableTheming(), getEnableViewState(), getEnabled(), getHasAdapter(), getHasAttributes(), getHasChildInitialized(), getHasControls(), getHasInitialized(), getHasLoaded(), getHasLoadedPostData(), getHasPreRendered(), getID(), getIsSkinApplied(), getNamingContainer(), getPage(), getParent(), getRegisteredObject(), getSkinID(), getSourceTemplateControl(), getTemplateControl(), getUniqueID(), getViewState(), getVisible(), hasAttribute(), initRecursive(), isDescendentOf(), isObjectRegistered(), loadRecursive(), loadState(), loadStateRecursive(), onDataBinding(), onInit(), onLoad(), onUnload(), preRenderRecursive(), raiseBubbleEvent(), registerObject(), removeAttribute(), removedControl(), renderChildren(), renderControl(), saveState(), saveStateRecursive(), setAdapter(), setAttribute(), setChildControlsCreated(), setControlStage(), setControlState(), setCustomData(), setEnableTheming(), setEnableViewState(), setEnabled(), setID(), setPage(), setSkinID(), setTemplateControl(), setViewState(), setVisible(), trackViewState(), traverseChildControls(), unbindProperty(), unloadRecursive(), unregisterObject()
Methods inherited from TApplicationComponent
getApplication(), getRequest(), getResponse(), getService(), getSession(), getUser(), publishAsset(), publishFilePath()
Methods inherited from TComponent
__call(), __destruct(), __isset(), __set(), __sleep(), __unset(), __wakeup(), asa(), attachBehavior(), attachBehaviors(), attachClassBehavior(), attachEventHandler(), canGetProperty(), canSetProperty(), clearBehaviors(), createdOnTemplate(), detachBehavior(), detachBehaviors(), detachClassBehavior(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), evaluateStatements(), fxAttachClassBehavior(), fxDetachClassBehavior(), getAutoGlobalListen(), getBehaviorsEnabled(), getClassHierarchy(), getEventHandlers(), getListeningToGlobalEvents(), getSubProperty(), hasEvent(), hasEventHandler(), hasProperty(), isa(), listen(), raiseEvent(), setSubProperty(), unlisten()
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
Constants inherited from TComponent
GLOBAL_RAISE_EVENT_LISTENER
Properties inherited from TWebControl
$_decorator
Terms of Service | Contact Us
PRADO v3.2.4 API Manual API documentation generated by ApiGen 2.8.0
Copyright © 2006-2014 by the PRADO Group.
Powered by PRADO