Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
Subclass - ControlLabel

Used to show some lines of text. More...

Classes

class  XBMCAddon::xbmcgui::ControlLabel
 

Functions

 XBMCAddon::xbmcgui::ControlLabel::getLabel ()
 

Function: getLabel()


Returns the text value for this label.
 
 XBMCAddon::xbmcgui::ControlLabel::setLabel (...)
 

Function: setLabel(label[, font, textColor, disabledColor, shadowColor, focusedColor, label2])


Sets text for this label.
 
 XBMCAddon::xbmcgui::ControlFadeLabel::reset ()
 

Function: reset()


Clear this fade label.
 

Detailed Description

Used to show some lines of text.

Class: ControlLabel(x, y, width, height, label[, font, textColor, disabledColor, alignment, hasPath, angle])

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.

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.
labelstring or unicode - text string.
font[opt] string - font used for label text. (e.g. 'font13')
textColor[opt] hexstring - color of enabled label's label. (e.g. '0xFFFFFFFF')
disabledColor[opt] hexstring - color of disabled label's label. (e.g. '0xFFFF3300')
alignment[opt] integer - alignment of label
  • Flags for alignment used as bits to have several together:
    Definition 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
    XBFONT_TRUNCATED_LEFT 0x00000020 Truncated text from left
hasPath[opt] bool - True=stores a path / False=no path
angle[opt] integer - angle of control. (+ rotates CCW, - rotates C)

Example:

...
# ControlLabel(x, y, width, height, label[, font, textColor,
# disabledColor, alignment, hasPath, angle])
self.label = xbmcgui.ControlLabel(100, 250, 125, 75, 'Status', angle=45)
...

Function Documentation

◆ getLabel()

String XBMCAddon::xbmcgui::ControlLabel::getLabel ( )

Function: getLabel()


Returns the text value for this label.

Returns
This label

Example:

...
label = self.label.getLabel()
...

◆ reset()

void XBMCAddon::xbmcgui::ControlFadeLabel::reset ( )

Function: reset()


Clear this fade label.


Example:

...
self.fadelabel.reset()
...

◆ setLabel()

void XBMCAddon::xbmcgui::ControlLabel::setLabel ( ...)

Function: setLabel(label[, font, textColor, disabledColor, shadowColor, focusedColor, label2])


Sets text for this label.

Parameters
labelstring or unicode - text string.
font[opt] string - font used for label text. (e.g. 'font13')
textColor[opt] hexstring - color of enabled label's label. (e.g. '0xFFFFFFFF')
disabledColor[opt] hexstring - color of disabled label's label. (e.g. '0xFFFF3300')
shadowColor[opt] hexstring - color of button's label's shadow. (e.g. '0xFF000000')
focusedColor[opt] hexstring - color of focused button's label. (e.g. '0xFF00FFFF')
label2[opt] string or unicode - text string.

Example:

...
self.label.setLabel('Status')
...