|
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
-
TApplicationComponent
-
TControl
implements
IRenderable,
IBindable
-
TWebControl
implements
IStyleable
-
TPanel
Methods summary
protected
string
|
#
getTagName( )
Returns
string tag name of the panel
Overrides
|
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
Overrides
|
protected
|
#
addAttributesToRender( THtmlWriter $writer )
Adds attributes to renderer.
Adds attributes to renderer.
Parameters
Throws
Overrides
|
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
|
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
|
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
|
public
|
#
render( THtmlWriter $writer )
Renders the control. This method overrides the parent implementation by
replacing it with the following sequence:
Renders the control. This method overrides the parent implementation by
replacing it with the following sequence:
Parameters
- $writer
THtmlWriter
the writer used for the rendering purpose
Overrides
|
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 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
|
|