Kodi Documentation  20.0 Kodi is an open source media player and entertainment hub.

Used to show multiple pieces of text in the same position, by fading from one to the other. More...

Collaboration diagram for Subclass - ControlFadeLabel:

## Functions

#### Function: addLabel(label)

Add a label to this control for scrolling. More...

#### Function: setScrolling(scroll)

Set scrolling. If set to false, the labels won't scroll. Defaults to true. More...

## Detailed Description

Used to show multiple pieces of text in the same position, by fading from one to the other.

#### Class: ControlFadeLabel(x, y, width, height[, font, textColor, alignment])

The fade label control is used for displaying multiple pieces of text in the same space in Kodi. You can choose the font, size, colour, location and contents of the text to be displayed. The first piece of information to display fades in over 50 frames, then scrolls off to the left. Once it is finished scrolling off screen, the second piece of information fades in and the process repeats. A fade label control is not supported in a list container.

Note
This class include also all calls from Control
Parameters
xinteger - x coordinate of control.
yinteger - y coordinate of control.
widthinteger - width of control.
heightinteger - height of control.
font[opt] string - font used for label text. (e.g. 'font13')
textColor[opt] hexstring - color of fadelabel's labels. (e.g. '0xFFFFFFFF')
alignment[opt] integer - alignment of label
• Flags for alignment used as bits to have several together:
Defination name Bitflag Description
XBFONT_LEFT 0x00000000 Align X left
XBFONT_RIGHT 0x00000001 Align X right
XBFONT_CENTER_X 0x00000002 Align X center
XBFONT_CENTER_Y 0x00000004 Align Y center
XBFONT_TRUNCATED 0x00000008 Truncated text
XBFONT_JUSTIFIED 0x00000010 Justify text
Note
You can use the above as keywords for arguments and skip certain optional arguments.
Once you use a keyword, all following arguments require the keyword.
After you create the control, you need to add it to the window with addControl().

Example:

...
self.fadelabel = xbmcgui.ControlFadeLabel(100, 250, 200, 50, textColor='0xFFFFFFFF')
...

## Function Documentation

#### Function: addLabel(label)

Add a label to this control for scrolling.

Parameters
 label string or unicode - text string to add.
Note
To remove added text use reset() for them.

Example:

...
self.fadelabel.addLabel('This is a line of text that can scroll.')
...

## ◆ setScrolling()

#### Function: setScrolling(scroll)

Set scrolling. If set to false, the labels won't scroll. Defaults to true.

Parameters
 scroll boolean - True = enabled / False = disabled

Example:

...