@on_trait_change( 'button.enabled' )
    def _on_enabled_changed ( self ):
        if self.button.enabled:
            self.button.set( state  = 'normal',
                             offset = ( 0, 0 ),
                             theme  = self.factory.theme )
        else:
            self.button.set( state  = 'disabled',
                             offset = ( 0, 0 ),
                             theme  = self.factory.disabled_theme or
                                      self.factory.theme )

    #-- ThemedControl Event Handlers -------------------------------------------
Handles the button 'enabled' state changing.
dataset/ETHPy150Open enthought/traitsui/traitsui/wx/themed_button_editor.py/_ThemedButtonEditor._on_enabled_changed