FLlabel

FLlabel — A FLTK opcode that modifies the appearance of a text label.

Description

Modifies a set of parameters related to the text label appearence of a widget (i.e. size, font, alignment and color of corresponding text).

Syntax

FLlabel isize, ifont, ialign, ired, igreen, iblue

Initialization

isize -- size of the font of the target widget. Normal values are in the order of 15. Greater numbers enlarge font size, while smaller numbers reduce it.

ifont -- sets the the font type of the label of a widget.

Legal values for ifont argument are:

  • 1 - Helvetica (same as Arial under Windows)

  • 2 - Helvetica Bold

  • 3 - Helvetica Italic

  • 4 - Helvetica Bold Italic

  • 5 - Courier

  • 6 - Courier Bold

  • 7 - Courier Italic

  • 8 - Courier Bold Italic

  • 9 - Times

  • 10 - Times Bold

  • 11 - Times Italic

  • 12 - Times Bold Italic

  • 13 - Symbol

  • 14 - Screen

  • 15 - Screen Bold

  • 16 - Dingbats

ialign -- sets the alignment of the label text of the widget.

Legal values for ialign argument are:

  • 1 - align center

  • 2 - align top

  • 3 - align bottom

  • 4 - align left

  • 5 - align right

  • 6 - align top-left

  • 7 - align top-right

  • 8 - align bottom-left

  • 9 - align bottom-right

ired -- The red color of the target widget. The range for each RGB component is 0-255

igreen -- The green color of the target widget. The range for each RGB component is 0-255

iblue -- The blue color of the target widget. The range for each RGB component is 0-255

Performance

FLlabel modifies a set of parameters related to the text label appearance of a widget, i.e. size, font, alignment and color of corresponding text. This opcode affects (almost) all widgets defined next its location. A user can put several instances of FLlabel in front of each widget he intends to modify. However, to modify a particular widget, it is better to use the opcode belonging to the second type (i.e. those containing the ihandle argument).

The influence of FLlabel on the next widget can be turned off by using -1 as its only argument. FLlabel is designed to modify text attributes of a group of related widgets.

See Also

FLcolor2, FLhide, FLlabel, FLsetAlign, FLsetBox, FLsetColor, FLsetColor2, FLsetFont, FLsetPosition, FLsetSize, FLsetText, FLsetTextColor, FLsetTextSize, FLsetTextType, FLsetVal_i, FLsetVal, FLshow

Credits

Author: Gabriel Maldonado

New in version 4.22