class label

superclass(es) control
subclass(es) -
description The label control is used to display a text on a window. The control is not used to get input from the user.

pl_img55.gif (1674 bytes)
see also panel - raisedLabel

tasks

The text inside a label control is normally aligned left, with the method createCenter/6 a label can be created that centers the text and createRight/6 creates label that aligns the text on the right side of the control. The method putText of the window class can be used to set the contents of the label control.

methods

create(Parent, X, Y, Width, Height, Output)

func Create a label control at a specified position with the specified dimensions. Because a control is a child window a parent window must always be specified. The coordinates X, Y, Width and Height determine the dimensions, in window coordinates, of the control. The text is left aligned.
pre The variable Parent must refer to a parent window. The X, Y, Width and Height coordinates must specify a position and dimension for the control.
post If the control was successfully created then true is assigned to Output, else it will contain false.

createCenter(Parent, X, Y, Width, Height, Output)

func Create a label control that centers it's text at a specified position with the specified dimensions. Because a control is a child window a parent window must always be specified. The coordinates X, Y, Width and Height determine the dimensions, in window coordinates, of the control.
pre The variable Parent must refer to a parent window. The X, Y, Width and Height coordinates must specify a position and dimension for the control.
post If the control was successfully created then true is assigned to Output, else it will contain false.

createRight(Parent, X, Y, Width, Height, Output)

func Create a label control that at a specified position with the specified dimensions. Because a control is a child window a parent window must always be specified. The coordinates X, Y, Width and Height determine the dimensions, in window coordinates, of the control. The text is aligned on the right side of the control.
pre The variable Parent must refer to a parent window. The X, Y, Width and Height coordinates must specify a position and dimension for the control.
post If the control was successfully created then true is assigned to Output, else it will contain false.

alignedLeft(Output)

func Check if the label aligns it's text on the left side of the label control.
pre TRUE.
post If the label aligns it's text on the left side of the control then Output is assigned true, else it is assigned false.

alignedCenter(Output)

func Check if the label aligns centers it's text.
pre TRUE.
post If the label aligns centers it's text then Output is assigned true, else it is assigned false.

alignedRight(Output)

func Check if the label aligns it's text on the right side of the label control.
pre TRUE.
post If the label aligns it's text on the right side of the control then Output is assigned true, else it is assigned false.