예제 #1
0
    def set_state (self, state):
        """I.set_state (...) -> None

        Sets the state of the ImageButton.

        Sets the state of the ImageButton and causes its child to set
        its state to the same value.
        """
        if self.state == state:
            return

        self.lock ()
        if self.child:
            self.child.state = state
        ButtonBase.set_state (self, state)
        self.unlock ()
예제 #2
0
    def set_state(self, state):
        """T.set_state (...) -> None

        Sets the state of the ToggleButton.

        Sets the state of the ToggleButton and causes its child to set
        its state to the same value.
        """
        if (self.active and (state != STATE_ACTIVE)) or (self.state == state):
            return

        self.lock()
        if self.child:
            self.child.state = state
        ButtonBase.set_state(self, state)
        self.unlock()
예제 #3
0
    def set_state (self, state):
        """T.set_state (...) -> None

        Sets the state of the ToggleButton.

        Sets the state of the ToggleButton and causes its child to set
        its state to the same value.
        """
        if (self.active and (state != STATE_ACTIVE)) or (self.state == state):
            return

        self.lock ()
        if self.child:
            self.child.state = state
        ButtonBase.set_state (self, state)
        self.unlock ()