Toggle the button state.
420510
public void toggleState()
    {
        if (m_iCurrentState == ON)
            m_iCurrentState = NULL;
        else if (m_iCurrentState == OFF)
            m_iCurrentState = ON;
        else
            m_iCurrentState = OFF;
        this.updateImage();
    }
462746
def on_state(self, *args):
        """"""
        # This really ought to be done with the selection behavior
        if self.state == 'down':
            self.rulesview.rule = self.rule
            for button in self.ruleslist.children[0].children:
                if button != self:
                    button.state = 'normal'
253779
def toggle(self):
        """"""
        if self._open:
            self._open = False
            self.__checkbutton_var.set(False)
            self.interior.grid_forget()
            self._checkbutton.config(image=self._closed_image)
        else:
            self._open = True
            self.__checkbutton_var.set(True)
            self.interior.grid(row=1, column=0, sticky="nswe")
            self._checkbutton.config(image=self._open_image)
835088
def setEnabled(self, state):
        
        super(XToolButton, self).setEnabled(state)
        
        self.updateUi()
284409
def setShowAddButton(self, state):
        
        self._showAddButton = state
        self._addButton.setVisible(state)
1047395
private void showButtons() {
        if (!areButtonsShowing) {
            buttonContainer.clearAnimation();
            buttonContainer.startAnimation(slideUp);
            buttonContainer.setVisibility(View.VISIBLE);
            areButtonsShowing = true;
        }
    }
433891
def help_toggled(self, flag):
        
        if flag:
            self.help_button.setText(self.tr('Hide Help'))
            self.show_help()
        else:
            self.help_button.setText(self.tr('Show Help'))
            self.hide_help()
676267
public function toggleCurrent()
    {
        list($checkbox, $checkbox_key) = $this->getCurrent();

        $checkbox->setChecked(!$checkbox->isChecked());

        foreach ($this->checkboxes as $key => $checkbox) {
            if ($key == $checkbox_key) {
                continue;
            }

            $checkbox->setChecked(false);
        }
    }
443694
protected void toggleTable() {

        CmsVaadinUtils.toggleButton(m_revertButton);
        openSubView(
            new CmsStateBean(m_stateBean.getResources(), CmsVaadinUtils.isButtonPressed(m_revertButton)).getState(),
            true);
    }
333449
def toggle(self, section, option):
  """"""
  self.set(section, option, not self.get(section, option))
155589
def updateState(self):
        
        if self.isChecked():
            self.setIcon(self.lockIcon())
            self.setToolTip('Click to unlock')
        else:
            self.setIcon(self.unlockIcon())
            self.setToolTip('Click to lock')
885511
def toggle(self):
        
        with self._lock:
            if self.is_active:
                self.off()
            else:
                self.on()
379569
def uncheckButton(self):
        
        #for button in self.buttons[1:]:
        for button in self.buttons:
            # supress editButtons toggled event
            button.blockSignals(True)
            if button.isChecked():
                button.setChecked(False)
            button.blockSignals(False)
748319
def set_current_state(self):
        """""""
        if not self.thresholds:
            self.thresholds = self.parent.get_existing_keyword('thresholds')
        if not self.value_maps:
            self.value_maps = self.parent.get_existing_keyword('value_maps')
669115
def switch_toggle(self, device):
        """"""
        state = self.get_state(device)
        if(state == '1'):
            return self.switch_off(device)

        elif(state == '0'):
            return self.switch_on(device)
        else:
            return state
552076
def setAutoDefault(self, state):
        
        self._autoDefault = state
        for button in self.buttonBox().buttons():
            button.setAutoDefault(state)
            button.setDefault(state)
865547
function release_button(button) {
        if (guac_touchscreen.currentState[button]) {
            guac_touchscreen.currentState[button] = false;
            if (guac_touchscreen.onmouseup)
                guac_touchscreen.onmouseup(guac_touchscreen.currentState);
        }
    }