4.16  <label>

A label for displaying one or more lines of text. The Pango markup language can be used for marking up passages of text.

4.16.1  Attributes

Name Type Default Value Description
color color (system default) The text color. You cannot use an alpha channel for colors here. The text color can also be changed with markup tags in the running text. ([new in 0.35] the alpha channel can be used!)
font font (system default) The text font. The font can also be changed with markup tags in the running text.
value string The text to display. It has to be in valid UTF-8 encoding and has to escape characters which are reserved in XML by using the usual XML entities.
wrap-at unit The width at which the label should wrap to the next line. Wrapping is disabled by default.

4.16.2  Examples

<display>

  <label value="gDesklets rocks!" font="Sans 3cm" color="red"/>
  
  <label id="line2" 
    value="This is a really long line, but it will be
    wrapped at 1 CM because I'm going to tell it to!  
    I'll wrap it to 1/2 an inch in the script though..." 
    wrap-at="1cm"/>

</display>

<script>
  
  # The following will change the wrapping to 0.5 inches
  Dsp.line2.wrap_at = Unit( 0.5, IN )

</script>