xbmc
Modules | Classes
Subclass - ControlRadioButton

**A radio button control (as used for on/off settings). More...

Collaboration diagram for Subclass - ControlRadioButton:

Modules

 Font alignment flags
 Flags for alignment.
 

Classes

class  XBMCAddon::xbmcgui::ControlRadioButton
 

Detailed Description

**A radio button control (as used for on/off settings).

**

{ ControlRadioButton(x, y, width, height, label[, focusOnTexture, noFocusOnTexture, focusOffTexture, noFocusOffTexture, focusTexture, noFocusTexture, textOffsetX, textOffsetY, alignment, font, textColor, disabledColor]) }

The radio button control is used for creating push button on/off settings in Kodi. You can choose the position, size, and look of the button, as well as the focused and unfocused radio textures. Used for settings controls.

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.
focusOnTexture[opt] string - filename for radio ON focused texture.
noFocusOnTexture[opt] string - filename for radio ON not focused texture.
focusOfTexture[opt] string - filename for radio OFF focused texture.
noFocusOffTexture[opt] string - filename for radio OFF not focused texture.
focusTexture[opt] string - filename for focused button texture.
noFocusTexture[opt] string - filename for not focused button texture.
textOffsetX[opt] integer - horizontal text offset
textOffsetY[opt] integer - vertical text offset
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
font[opt] string - font used for label text. (e.g. 'font13')
textColor[opt] hexstring - color of label when control is enabled. radiobutton's label. (e.g. '0xFFFFFFFF')
disabledColor[opt] hexstring - color of label when control is disabled. (e.g. '0xFFFF3300')
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().

New function added.

Example:

...
self.radiobutton = xbmcgui.ControlRadioButton(100, 250, 200, 50, 'Enable', font='font14')
...