<Panel>
Syntax Remarks Example
The Panel tag is a container tag that holds other tags and HTML. It can be used just as a container, making it easy to set the container's colors and borders. Primarily, though, it is used to show/hide parts of the form based on what role the current user is in. So, for instance, you can include controls that will only be available to administrators or editors or registered users, etc.
Syntax
<Panel
AccessKey="string"
BackColor="color name|#dddddd"
BackImageUrl="uri"
BorderColor="color name|#dddddd"
BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge|
Inset|Outset"
BorderWidth="size"
CssClass="string"
DefaultButton="string"
Font-Bold="True|False"
Font-Italic="True|False"
Font-Names="string"
Font-Overline="True|False"
Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium|
Large|X-Large|XX-Large"
Font-Strikeout="True|False"
Font-Underline="True|False"
ForeColor="color name|#dddddd"
Height="size"
HorizontalAlign="NotSet|Left|Center|Right|Justify"
ID="string"
ScrollBars="None|Horizontal|Vertical|Both|Auto"
ShowRoles="Role1Name,Role2Name"
Style="string"
Visible="True|False"
Width="size"
Wrap="True|False">
...HTML, Text, and Control Tags...
</Panel>
Remarks
This tag can be used solely as a container (much like the DIV tag in HTML). More often, it will be used to only show portions of a form to members of particular roles. To do this, use the ShowRoles attribute.
- AccessKey: Gets or sets the access key that allows you to quickly navigate to the control.
- BackColor: Color of the background of the control.
- BackImageUrl: Sets the URL of the background image for the panel control.
- BorderColor: Color of the border around the control
- BorderStyle: Style of the border around the control.
- BorderWidth: Width of the border around the control.
- CssClass: Name of the Cascading Style Sheets (CSS) class used to style this control
- DefaultButton: Set this to the ID of a push-button <AddButton>, <UpdateButton> or <CancelButton> on your form and it will be "clicked" when the user presses the ENTER key.Link and Image buttons may work for this as well, but are not supported. Link buttons, for instance, work on IE but not in Firefox.
- Font Properties: A series of attributes such as font-bold, font-size, etc. that allow you to control how the text in the control is displayed. More
- ForeColor: Sets the foreground color (typically the color of the text) of the control.
- Height: Height of the control, specified in units.
- HorizontalAlign: Sets the horizontal alignment of controls within the panel.
- ID: Name, consisting of letters and numbers, beginning with a letter, that uniquely identifies the control within the form.
- ScrollBars: Sets the visibility and position of scroll bars for the control:
- None: No scroll bars are shown (default)
- Horizontal: Only a horizontal scroll bar is shown
- Vertical: Only a vertical scroll bar is shown
- Both: Both horizontal and vertical scroll bars are shown
- Auto: Horizontal and/or vertical scroll bars are show - only if necessary
- ShowRoles: A comma-delimited list of security role names. When specified, only members of the security roles will be shown the content of the panel. Note that if you are logged-in as host, you will see the panel contents even though the account may not be a member of one of the specified roles. To accurately test the functionality, you should login as a non-host/superuser account.
- Style:Same as the HTML style attribute.It allows you to apply CSS styling to the control (e.g. "color: red; border: solid 1px black;")
- Visible: Determines if the control is visible (true) or hidden (false)
- Width: Width of the control in units.
- Wrap: If true (default), content within the panel wraps. If false, content does not wrap.
Back to top Example
<addform>
...
<Panel ShowRoles="Editor">
<checkbox id="chkApproved" datafield="Approved" datatype="boolean" text="Approved?" />
</Panel>
<table>
<tr>
<td>
<label for="txtFirstName" text="First Name" />
<textbox id="txtFirstName" datafield="FirstName"
datatype="string" />
</td>
</tr>
<tr>
<td>
<label for="txtLastName" text="Last Name" />
<textbox id="txtLastName" datafield="LastName"
datatype="string" />
</td>
</tr>
<tr>
<td colspan="2">
<addbutton text="Add"/> <cancelbutton
text="Cancel"/>
</td>
</tr>
</table>
</addform>
Back to top