#NEWLINE# def set_enabled( self , enabled ) : #NEWLINE# #INDENT# '\n        Enables or disables the Button.\n\n        Args:\n            enabled (bool): If true te button is enabled and so the user can press it.\n        ' #NEWLINE# if enabled : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# del self . attributes [ 'disabled' ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . attributes [ 'disabled' ] = None