Documentation

Reference
qx:label (qx.ui.basic.Label)

The label class brings typical text content to the widget system.

It supports simple text nodes and complex HTML (rich). The default content mode is for text only. The mode is changeable through the property qx.ui.basic.Label#rich.

The label supports heightForWidth when used in HTML mode. This means that multi line HTML automatically computes the correct preferred height.

Example

Here is a little example of how to use the widget.

  // a simple text label without wrapping and markup support
  var label1 = new qx.ui.basic.Label("Simple text label");
  this.getRoot().add(label1, {left:20, top:10});

  // a HTML label with automatic line wrapping
  var label2 = new qx.ui.basic.Label().set({
    content: "A long label text with auto-wrapping. This also may contain rich HTML markup.",
    rich : true,
    width: 120
  });
  this.getRoot().add(label2, {left:20, top:50});

The first label in this example is a basic text only label. As such no automatic wrapping is supported. The second label is a long label containing HTML markup with automatic line wrapping.

External Documentation

Documentation of this widget in the qooxdoo wiki.

LGPL, EPL © 2008 QxTransformer | Siarhei Barysiuk & Christian Boulanger.
Site design and illustrations by Siarhei Barysiuk. | Icons by Dry Icons.

qooxdoo