Labels

OBJECTS

  typedef control  label;

FUNCTIONS

  label   newlabel(char *text, rect r, int alignment);

CONSTANTS

  #define AlignTop      0x0000
  #define AlignBottom   0x0100
  #define VJustify      0x0200
  #define VCenter       0x0400
  #define VCentre       0x0400
  #define AlignLeft     0x0000
  #define AlignRight    0x1000
  #define Justify       0x2000
  #define Center        0x4000
  #define Centre        0x4000
  #define AlignCenter   0x4000
  #define AlignCentre   0x4000
  #define Underline     0x0800

NOTES

The newlabel function creates a text label which cannot be edited by the user. The text string is aligned within the rectangle according to the value of the alignment parameter. Values such as AlignLeft, AlightRight or Center can be specified. A value of zero corresponds to AlignLeft+AlignTop.

It can be seen from the list of possible alignments above, both American and British spellings of the the word 'Centre' are legal.

The vertical alignments are explained below:

The horizontal alignments are: An additional flag which can be included in the alignment field is:

Either a vertical, or a horizontal alignment can be specified, or a combination of the two, using the plus or bitwise-or operators to combine the alignments. The Underline flag can also be added to the alignment to change the appearance of the label.