Next: , Up: BLOX.BTextAttributes   [Index]


1.43.1 BLOX.BTextAttributes class: instance-creation shortcuts

backgroundColor: color

Create a new BTextAttributes object resulting in text with the given background color.

black

Create a new BTextAttributes object resulting in black text.

blue

Create a new BTextAttributes object resulting in blue text.

center

Create a new BTextAttributes object resulting in centered paragraphs.

cyan

Create a new BTextAttributes object resulting in cyan text.

darkCyan

Create a new BTextAttributes object resulting in dark cyan text.

darkGreen

Create a new BTextAttributes object resulting in dark green text.

darkMagenta

Create a new BTextAttributes object resulting in dark purple text.

events: aBTextBindings

Create a new BTextAttributes object for text that responds to events according to the callbacks established in aBTextBindings.

font: font

Create a new BTextAttributes object resulting in text with the given font. The font can be given as either an X font name or a Blox font description string.

X font names are given as many fields, each led by a minus, and each of which can be replaced by an * to indicate a default value is ok: foundry, family, weight, slant, setwidth, addstyle, pixel size, point size (the same as pixel size for historical reasons), horizontal resolution, vertical resolution, spacing, width, charset and character encoding.

Blox font description strings have three fields, which must be separated by a space and of which only the first is mandatory: the font family, the font size in points (or in pixels if a negative value is supplied), and a number of styles separated by a space (valid styles are normal, bold, italic, underline and overstrike). Examples of valid fonts are “Helvetica 10 Bold”, “Times -14”, “Futura Bold Underline”. You must enclose the font family in braces if it is made of two or more words.

foregroundColor: color

Create a new BTextAttributes object resulting in text with the given foreground color.

green

Create a new BTextAttributes object resulting in green text.

magenta

Create a new BTextAttributes object resulting in magenta text.

red

Create a new BTextAttributes object resulting in red text.

strikeout

Create a new BTextAttributes object resulting in struck-out text.

underline

Create a new BTextAttributes object resulting in underlined text.

white

Create a new BTextAttributes object resulting in white text.

yellow

Create a new BTextAttributes object resulting in yellow text.


Next: , Up: BLOX.BTextAttributes   [Index]