Used to show some lines of text.
The label control is used for displaying text in Kodi. You can choose the font, size, colour, location and contents of the text to be displayed.
Wrapping your label in a grouplist with the auto width and appropriate minimum and maximum values. Allows the labels width to dynamically change relative to how long the label text is. This allows a image or other control to be aligned to the right of the actual label text no matter how wide the label is.
As of XBMC Gotham, simply specifying <width>auto</width>
is also supported.
If you want your label control to span multiple lines, you can insert a new line character in your label. For example:
Also, if you want your label control to conform to the <width>
parameter, but still want to be able to give it more content than will fit on one line, then setting:
Will cause the text to be cut up onto multiple lines.
In addition to the Default Control Tags the following tags are available. Note that each tag is lower case only. This is important, as xml
tags are case-sensitive.
Tag | Description |
---|---|
align | Can be left, right, or center. Aligns the text within the given label <width> . Defaults to left |
aligny | Can be top or center. Aligns the text within its given label <height> . Defaults to top |
scroll | When true, the text will scroll if longer than the label's <width> . If false, the text will be truncated. Defaults to false. |
label | Specifies the text which should be drawn. You should specify an entry from the strings.po here (either the Kodi strings.po or your skin's strings.po file), however you may also hardcode a piece of text also if you wish, though of course it will not be localisable. You can use the full label formatting syntax and you may also specify more than one piece of information here by using the $INFO and $LOCALIZE formats. |
info | Specifies the information that should be presented. Kodi will auto-fill in this info in place of the <label> . See here for more information. |
number | Specifies a number that should be presented. This is just here to allow a skinner to use a number rather than a text label (as any number given to <label> will be used to lookup in strings.po) |
angle | The angle the text should be rendered at, in degrees. A value of 0 is horizontal. |
haspath | Specifies whether or not this label is filled with a path. Long paths are shortened by compressing the file path while keeping the actual filename full length. |
font | Specifies the font to use from the font.xml file. |
textcolor | Specifies the color the text should be, in hex AARRGGBB format, or a name from the colour theme. |
shadowcolor | Specifies the color of the drop shadow on the text, in AARRGGBB format, or a name from the colour theme. |
wrapmultiline | If true, any text that doesn't fit on one line will be wrapped onto multiple lines. |
scrollspeed | Scroll speed of text in pixels per second. Defaults to 60. |
scrollsuffix | Specifies the suffix used in scrolling labels. Defaults to "¦" . |