How to create new element in skin ?


  • How can I use eTimer here ? to update infos??

    Einmal editiert, zuletzt von tracer ()

    • Offizieller Beitrag
    Code
    self.timer = eTimer()
    		self.timer.timeout.get().append(self.resetList) 
    		self.onShown.append(lambda: self.timer.start(5000))


    where resetList is a Method where you do whatever you want to update

    Code
    def resetList(self):
    		self.blubb = "thingstochange"


    Addition:


    you'll a need a:


    from enigma import eTimer


  • It told me then that Label ="XXXname" is not defined



    Thank You

  • Yes, it is exacly this code.


    When i ll put


    Inside this definition


    Python
    def __init__(self):
    
    
    self["XXXname"] = Label(_('Not aviable'))


    Label definition


    it is ok - but no refresh - it is normall why it no refresh...


    Any idea?

    4 Mal editiert, zuletzt von tracer ()



  • I think all elements have to be in __init__ definition, and there need to be def to name of eLabel ?



    EDIT




    OK DONE!! easier use setText :smiling_face:

    Einmal editiert, zuletzt von tracer ()

  • Is it possiable to to Change BackGround Color of eLabel in the code?


    self["button_test"].setText(_('TEST'))
    self["button_test"].backGroundColor(_('yellow'))



    ?