Basic Visibility, Panels and ContainerShip
Sample Home
|
Reset Form
Enter your name:
Enter your company:
Enter your Address:
32 Kaiea Place
Vertical Scrollbar
Both
This very basic form demonstrates how you can use panels to easily show and hide display content from the server side. Simply drop a panel on a page, add controls, and then from the codebehind set the panel's visibility to .t. or .f. When a panel is made invisible it's controls retain state across pages. So when you later re-display the panel the data is still maintained on it.
Note that the panel is painted in this funky format on purpose to demonstrate the scrollability of the panel. Panels are implemented as <div> tags and as such there are some quirks in how Internet Explorer and other browser render the control. IE incorrectly inherits margins and text attributes of parent tag where other browsers do not. As a workaround you can stick the div tag into a Table as done here. Mozilla browsers do not support the overflow property set to visible and auto-stretching, so if you use panels you typically will want to size them properly in the designer so content will fit. This form lets you experiment and see the results.
The sample again demonstrates property persistence by automatically tracking the visibility of the panel as well as the label that displays the result.