Resize Pixmap

  • Hi


    I want know if it's possible to change the size of an pixmap?


    I try to use self["pixmap"].instance.resize(eSize(15,15))


    but i get AttributeError: 'NoneTyoe' objet has no attribute 'resize'


    Thanks for help me

    Dreambox 500 | 600 | 800 | 7020 | 7025

    • Offizieller Beitrag

    i assume you're trying to do that in __init__ ???.


    You can't as there is no instance of your pixmap there at that point.
    Use something in the style of (Assumging your class inherits Screen!:


    Code
    def __init__():
    	do something
    	self.onLayoutFinished.append(self.resize())
    
    def resize(self):
    	self["pixmap"].instance.resize(eSize(15,15))

    mfg ,
    Reichi

  • Hi Reichi


    Yes it's true i try to do it in def __init__(): now with a onLayoutFinished work fine


    Thanks

    Dreambox 500 | 600 | 800 | 7020 | 7025