xbmcgui.ControlFadeLabel alignment
#1
I'm using xbmcgui.ControlFadeLabel but it does not take the "alignment" argument by default it aligns right instead I would like the left alignment

14:08:55.498 T:1691992944   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.TypeError'>
                                            Error Contents: 'alignment' is an invalid keyword argument for this function
                                            Traceback (most recent call last):
                                              File "service.py", line 84, in <module>
                                                fadelabel = xbmcgui.ControlFadeLabel(100, ypos + 40, xbmcgui.getScreenWidth(), 30, font='font14', textColor='0xFFFFFFFF', alignment=0)
                                            TypeError: 'alignment' is an invalid keyword argument for this function
                                            -->End of Python script error report<--

Image
Reply
#2
looks like it's some inconsistency in the kodi code, try using _alignment instead.
probably something we should fix on our end.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
Yes, the argument name in the docs is not correct: http://romanvm.github.io/Kodistubs/_auto...lFadeLabel
Reply
#4
so fix the docs or fix the code?

we do use the alignment parameter for other controls (http://romanvm.github.io/Kodistubs/_auto...ntrolLabel)
not sure why it would need an underscore prefix for fade labels ?
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
(2019-03-03, 14:48)ronie Wrote: so fix the docs or fix the code?
I've fixed the code Tongue
Reply

Logout Mark Read Team Forum Stats Members Help
xbmcgui.ControlFadeLabel alignment0