Class \Prado\Web\UI\WebControls\TPanel
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 \Prado\Web\UI\WebControls\setWrap can be used to set whether the body content should wrap or not. \Prado\Web\UI\WebControls\setHorizontalAlign governs how the content is aligned horizontally, and \Prado\Web\UI\WebControls\getDirection indicates the content direction (left to right or right to left). You can set \Prado\Web\UI\WebControls\setBackImageUrl to give a background image to the panel, and you can ste \Prado\Web\UI\WebControls\setGroupingText 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 \Prado\Web\UI\WebControls\setDefaultButton property.
Class hierarchy
- \Prado\Web\UI\WebControls\TPanel
- \Prado\Web\UI\WebControls\TWebControl implements IStyleable
- \Prado\Web\UI\TControl implements IRenderable, IBindable
- \Prado\TApplicationComponent
- \Prado\TComponent
Since: 3.0
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
render(mixed $writer) : mixed
Renders the control.
This method overrides the parent implementation by replacing it with the following sequence:
|
public
|
renderBeginTag(THtmlWriter $writer) : mixed
Renders the openning tag for the control (including attributes)
|
public
|
|
public
|
setBackImageUrl(string $value) : mixed
Sets the URL of the background image for the panel component.
|
public
|
setDefaultButton(string $value) : mixed
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 \Prado\Web\UI\TControl::findControl. |
public
|
|
public
|
|
public
|
setHorizontalAlign(string $value) : mixed
Sets the horizontal alignment of the contents within the panel.
Valid values include 'NotSet', 'Justify', 'Left', 'Right', 'Center' |
public
|
|
public
|
|
protected
|
|
protected
|
createStyle() : TPanelStyle
Creates a style object to be used by the control.
This method overrides the parent impementation by creating a TPanelStyle object. |
protected
|