News

Summary:

This control is fairly simple. It shows a box with a title, a date, the creator of the news, the contents of the news and a link for hifing and showing the news content.

Click here for an image example

Properties & Specifications:

The control inherits from the Control class.

PropertyAssignment TypeDefault ValueComments
WidthString"95%"The width of the box (can also be for example "50%")
TitleString"Undefined Title"The news title
byStrString"by -Unknown- (Unknown date)"The one who created the news and the date.
UseRandomBottomBorderBooleanTrueIf the bottom border of the box should be different for each news box (random width)
fOpenedBooleanFalseSpecifies if the content is opened or not in the first place.
aOpenedBooleanIf the content is opened or not. (Should be used only for reading or changing the hidden status. Should not be used for example in the tag)

CSS Style ClassDescription
defaulttextThe default text of the news.
News-NewsThe style of the top-left cell which writes "News".
News-ByThe style of the cell which writes the one who wrote the piece of news.
News-MainThe style of the main cell.
News-HideShowThe style of the cell with the Show/Hide link.
These styles are found in the Styles.css file in the Files folder. You can modify it, but you have to copy according to the Install Instructions.

Usage:

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

<TP:News runat="server" [Width="Width of box String"] [Title="String"] [byStr=String] [UseRandomBottomBorder=Boolean] [fOpened=Boolean] > [News Details Content] </TP:News>
The brackets [ ] are used to show the optional. Italics are used to show the text you need to type according to your preferences.

Comments:

This control is just a graphical box for showing news. Further enhancement is the News Organizer.