SimpleLabel:
Filter:
ServerTools/Classes (extension) | GUI

SimpleLabel
ExtensionExtension

displays a string as a StaticText with size automatically determined

Description

This is the parent class for several simple text and button views in this package

Class Methods

.new

Arguments:

layout

the parent view, FlowView or window

string

the string to display

bounds

nil: automatically determines size based on the string size Integer: a minimum width. if the string is longer and requires more than the integer then the then the button will be wider. height will be GUI.skin.buttonHeight array: taken as: [width, height, ... ignored] Point: a width and a height Rect: the first two values x/y will be used as width and height and the rest are ignored.

font

optional Font, else uses default font

Instance Methods

.makeViewWithStringSize

private

Arguments:

layout

the parent view, FlowView or window

optimalWidth
minHeight

default is GUI.skin.buttonHeight

Returns:

(returnvalue)

.label

set a new label string

Arguments:

string

.bold

change the font to the bold variation. no method supplied to set it back but you could set the font manually.

Arguments:

fontSize

in standard pt

.color

set the label color

Arguments:

color

Examples