logo

class

fwt::Label

sys::Obj
  fwt::Widget
    fwt::Label
//
// Copyright (c) 2008, Brian Frank and Andy Frank
// Licensed under the Academic Free License version 3.0
//
// History:
//   10 Jun 08  Brian Frank  Creation
//

**
** Label displays text and/or an image.
**
class Label : Widget
{

  **
  ** Text of the label. Defaults to "".
  **
  Str text := "" { set { @text = val; sync(textId) } }
  internal static const Str textId := "text"

  **
  ** Image to display on label. Defaults to null.
  **
  Image image := null { set { @image = val; sync(imageId) } }
  internal static const Str imageId := "image"

  **
  ** Foreground color. Defaults to null (system default).
  **
  Color fg := null { set { @fg = val; sync(fgId) } }
  internal static const Str fgId := "fg"

  **
  ** Background color. Defaults to null (system default).
  **
  Color bg := null { set { @bg = val; sync(bgId) } }
  internal static const Str bgId := "bg"

  **
  ** Font for text. Defaults to null (system default).
  **
  Font font := null { set { @font = val; sync(fontId) } }
  internal static const Str fontId := "font"

  **
  ** Horizontal alignment. Defaults to left.
  **
  Halign halign := Halign.left { set { @halign = val; sync(halignId) } }
  internal static const Str halignId := "halign"

}