Developer Resources

BannerBox

Overview

The BannerBox class represents a banner box control.

Base Class

FormControl

Constructor

BannerBox(text : String, x_pos : Integer, y_pos : Integer, width : Integer, height : Integer)

Arguments

text
The caption to show for the control.
x_pos
The x position of the control.
y_pos
The y position of the control.
width
The width of the control.
height
The height of the control.

Properties

BannerBox.Top
A flag representing whether to show the top border.
BannerBox.Bottom
A flag representing whether to show the bottom border.
BannerBox.Left
A flag representing whether to show the left border.
BannerBox.Right
A flag representing whether to show the right border.
BannerBox.All
A flag representing whether to show all borders.
BannerBox.NoGradient
A flag representing no gradient (solid fill color).
BannerBox.GradientVertical
A flag representing a vertical gradient.
BannerBox.GradientHorizontal
A flag representing a horizontal gradient.
BannerBox.AlignTextLeft
A flag representing left text alignment.
BannerBox.AlignTextCenter
A flag representing centered text alignment.
BannerBox.AlignTextRight
A flag representing right text alignment.

Methods

BannerBox.setBorder
Sets the sides of the banner control that have a border.
BannerBox.setBorderColor
Sets the color of the banner border.
BannerBox.setEndColor
Sets the ending color for the banner gradient.
BannerBox.setFont
Sets the font for the banner text.
BannerBox.setGradientDirection
Sets the gradient direction for the banner.
BannerBox.setStartColor
Sets the starting color for the banner gradient.
BannerBox.setText
Sets the banner text.
BannerBox.setTextAlignment
Sets the text alignment for the banner.
BannerBox.setTextColor
Sets the text color for the banner text.
BannerBox.setTextPadding
Sets the text padding for the banner.

Inherited Methods

FormControl.captureMouse
Captures the mouse on this form control.
FormControl.disablePaint
Disables the window from redrawing itself.
FormControl.enablePaint
Enables the window to redraw itself.
FormControl.getBackgroundColor
Gets the background color of the form control.
FormControl.getClientSize
Gets the client size of the form control.
FormControl.getEnabled
Indicates whether or not a form control is enabled.
FormControl.getFont
Gets the default font for the text of form control.
FormControl.getForegroundColor
Gets the foreground color of the form control.
FormControl.getMaxSize
Gets the maximum size of the form control.
FormControl.getMinSize
Gets the minimum size of the form control.
FormControl.getMousePosition
Gets the mouse position relative to this form control.
FormControl.getNativeHandle
Gets the native handle of the window/control
FormControl.getPosition
Gets the position of a form control.
FormControl.getSize
Gets the size of the form control.
FormControl.invalidate
Invalidates a form control, which will cause it to be repainted on the next paint event.
FormControl.refresh
Refreshes a form control, which immediately repaints the entire form control.
FormControl.releaseMouse
Releases the mouse from being captured on this form control.
FormControl.setBackgroundColor
Sets the background color of the form control.
FormControl.setClientSize
Sets the client size of a form control.
FormControl.setEnabled
Enables or disables the form control.
FormControl.setFocus
Sets the focus to the form control.
FormControl.setFont
Sets the default font for the text of the form control.
FormControl.setForegroundColor
Sets the foreground color of the form control.
FormControl.setMaxSize
Sets the maximum size of a form control.
FormControl.setMinSize
Sets the minimum size of a form control.
FormControl.setPosition
Sets the position of a form control relative to the the form control's parent.
FormControl.setSize
Sets the size of a form control.
FormControl.show
Shows or hides the form control.
FormControl.update
Updates a form control, which will immediately repaint any invalid areas.

BannerBox.setBorder

function BannerBox.setBorder(flags : Integer)

Arguments

flags
The sides of the banner that have borders, given by a combination of BannerBox.Left, BannerBox.Right, BannerBox.Top and BannerBox.Bottom, or BannerBox.All for all borders.

Description

Sets the sides of the banner control that have a border given by flags.

BannerBox.setBorderColor

function BannerBox.setBorderColor(color : Color)

Arguments

color
The color to which to set the banner border.

Description

Sets the color of the banner border.

BannerBox.setEndColor

function BannerBox.setEndColor(color : Color)

Arguments

color
The ending color for the banner gradient.

Description

Sets the ending color for the banner gradient.

BannerBox.setFont

function BannerBox.setFont(font : Font)

Arguments

font
The font to use to draw the banner text.

Description

Sets the font for the banner text.

BannerBox.setGradientDirection

function BannerBox.setGradientDirection(direction : Integer)

Arguments

direction
The direction in which the banner color background changes. One of BannerBox.NoGradient, BannerBox.GradientVertical or BannerBox.GradientHorizontal.

Description

Sets the gradient direction to the value given by direction. The gradient direction in which the banner color background gradually changes from the starting color to the ending color. If BannerBox.NoGradient is specified, the start color will be used as the background fill color.

BannerBox.setStartColor

function BannerBox.setStartColor(color : Color)

Arguments

color
The starting color for the banner gradient.

Description

Sets the starting color for the banner gradient.

BannerBox.setText

function BannerBox.setText(text : String)

Arguments

text
The text for the banner.

Description

Sets the banner text.

BannerBox.setTextAlignment

function BannerBox.setTextAlignment(alignment : Integer)

Arguments

alignment
The alignment for the banner. One of BannerBox.AlignTextLeft, BannerBox.AlignTextCenter or BannerBox.AlignTextRight.

Description

Sets the alignment for the banner.

BannerBox.setTextColor

function BannerBox.setTextColor(color : Color)

Arguments

color
The color for the banner text.

Description

Sets the color for the banner text.

BannerBox.setTextPadding

function BannerBox.setTextPadding(padding : Integer)

Arguments

padding
The padding for the banner text.

Description

Sets the padding for the banner text, which is the space between the text and the edge of the banner control.