Displayor

Summary:

The control is used simply for hiding and showing content. When closed, it shows a title and a link "Open". Upon clicking the link, the control opens up to show the content. The link then reads "Close". When clicked, the control closes up again to show only the title and the link.

Click here for an image example

...More:

The control has a main variable to signify whether the control is opened or not. Also, it has an event to signify the action of opening and closing. CSS stylesheets are used (mainly gray).

Properties & Specifications:

The control inherits from the Control class.

PropertyAssignment TypeComments
strTitleStringThe title to show on top.
OpenedBooleanIf, when first loaded, is opened or not.

MethodComments
Add(Object)Add an object to the contents of the displayor.

EventComments
OnChangeWhen the state of the Displayor (opened or closed) is changed.

Usage:

You can either use the control through script by referring to TPControls.Displayor (according to the install instructions), or either through placing a control instance on an .aspx page like this:

<TP:Displayor runat="server" [strTitle="Title String"] [Opened=Boolean] [OnChange=Sub for event] > [Content to show and hide] </TP:Displayor>
The brackets [ ] are used to show the optional. Italics are used to show the text you need to type according to your preferences.

e.g. <TP:Displayor runat="server" strTitle="Requirements for the site..." ID="ReqDisp" Opened=False><asp:placeholder runat="server"> <table cellpadding="5" cellspacing="5" width="100%" height="100%" class="defaulttext"><tr><td style="font-size:12px;color:white">The website just needs CSS stylesheets support.</td></tr></table> </asp:placeholder></TP:Displayor>

Comments:

This was the first control I ever made and I strived much to complete it without the help of anyone. So, it's a little bit incomplete and not much pretty. If anyone makes a better version please send me it.