Documentation
- qx:row
- qx:label
- qx:application
- qx:splitButton
- qx:toolBarSplitButton
- qx:tabView
- qx:resizer
- qx:comboBox
- qx:textarea
- qx:list
- qx:slider
- qx:checkGroupBox
- qx:contextMenu
- qx:embedHtml
- qx:embedCanvas
- qx:checkBox
- qx:spacer
- qx:toolBarMenuButton
- qx:menuCheckBox
- qx:widget
- qx:toggleButton
- qx:composite
- qx:command
- qx:page
- qx:radioButton
- qx:toolBarPart
- qx:hsplit
- qx:vsplit
- qx:toolTip
- qx:atom
- qx:toolBarRadioButton
- qx:dateChooser
- qx:treeFolder
- qx:groupBox
- qxt:elsif
- qx:selectBox
- qx:listItem
- qxt:else
- qx:menu
- qxt:component
- qxt:property
- qx:toolBar
- qxt:script
- qx:separator
- qx:textField
- qx:embedIframe
- qxt:if
- qx:menuRadioButton
- qx:popup
- qx:slideBar
- qxt:variant
- qx:grow
- qx:tree
- qx:toolBarCheckBox
- qx:treeFile
- qx:vbox
- qx:scroll
- qx:colorSelector
- qx:split
- qx:canvas
- qx:dateField
- qx:spinner
- qxt:subscriber
- qx:menuBarButton
- qx:toolBarButton
- qx:image
- qx:button
- qx:column
- qx:basic
- qx:colorPopup
- qx:repeatButton
- qx:menuBar
- qx:hbox
- qx:grid
- qx:dock
- qx:formMenuButton
- qx:menuButton
- qxt:listener
- qx:stack
- qx:window
- qx:radioGroupBox
- qx:radioGroup
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.- allowGrowX
-
None
Default value: false Possible values:
- allowGrowY
-
None
Default value: false Possible values:
- appearance
-
None
Default value: "label" Possible values:
- content
-
Contains the HTML or text content. Interpretation depends on the value of qx.ui.basic.Label#rich. In text mode entities and other HTML special content is not supported. But it is possible to use unicode escape sequences to insert symbols and other non ASCII characters.
Default value: Possible values: - rich
-
Switches between rich HTML and text content. The text mode (
false) supports advanced features like ellipsis when the available space is not enough. HTML mode (true) supports multi-line content and all the markup features of HTML content.Default value: false Possible values: - allowShrinkY
-
None
Default value: false Possible values:
- selectable
-
None
Default value: false Possible values:
- textAlign
-
Control the text alignment
Default value: Possible values: "left","center","right"
{ u'add': { u'*': u'add/defaultWithPosition.mako',
u'layout': u'add/noParent.mako',
u'qx:application': u'add/qx/application.mako',
u'qx:split': u'add/qx/split.mako',
u'qxt:variant': u'add/noParent.mako'},
u'attributes': {u'*': u'attr/default.mako', u'id': u'', u'qxt:*': u''},
u'body': { u'*': u'body/qx/widget.mako',
u'qxt:component': u'body/qxt/component_root.mako'},
u'data': { u'attr': {},
u'props': { u'class': u'qx.ui.basic.Label',
u'constructor-args': u'content'}},
u'extends': [u'qx:label', u'qx:widget', u'base']}
LGPL, EPL © 2008 QxTransformer | Siarhei Barysiuk &
Christian Boulanger.
Site design and illustrations by Siarhei Barysiuk. | Icons by Dry Icons.