Add a standard button box.

        Override if you do not want the standard buttons
420409
def buttons(self, master):
        '''
        '''

        box = tk.Frame(master)

        ttk.Button(
            box,
            text="Next",
            width=10,
            command=self.next_day
        ).pack(side=tk.LEFT, padx=5, pady=5)
        ttk.Button(
            box,
            text="OK",
            width=10,
            command=self.ok,
            default=tk.ACTIVE
        ).pack(side=tk.LEFT, padx=5, pady=5)
        ttk.Button(
            box,
            text="Cancel",
            width=10,
            command=self.cancel
        ).pack(side=tk.LEFT, padx=5, pady=5)

        self.bind("n", self.next_day)
        self.bind("<Return>", self.ok)
        self.bind("<Escape>", self.cancel)

        box.pack()
420435
protected void addCancelButton() {

        if (m_editorDialog != null) {
            m_cancelButton = new CmsPushButton();
            m_cancelButton.setText(Messages.get().key(Messages.GUI_BUTTON_CANCEL_TEXT_0));
            m_cancelButton.setUseMinWidth(true);
            m_cancelButton.setButtonStyle(ButtonStyle.TEXT, ButtonColor.BLUE);
            m_cancelButton.addClickHandler(new ClickHandler() {

                public void onClick(ClickEvent event) {

                    cancelEdit();
                }
            });
            m_editorDialog.addButton(m_cancelButton);
        }
    }
63761
void initButtons() {

        m_okButton = new Button(CmsVaadinUtils.getMessageText(org.opencms.workplace.Messages.GUI_DIALOG_BUTTON_OK_0));
        m_okButton.addClickListener(new ClickListener() {

            private static final long serialVersionUID = 1L;

            public void buttonClick(ClickEvent event) {

                onClickOk();
            }
        });
        addButton(m_okButton);
        m_cancelButton = new Button(
            CmsVaadinUtils.getMessageText(org.opencms.workplace.Messages.GUI_DIALOG_BUTTON_CANCEL_0));
        m_cancelButton.addClickListener(new ClickListener() {

            private static final long serialVersionUID = 1L;

            @SuppressWarnings("synthetic-access")
            public void buttonClick(ClickEvent event) {

                m_context.finish(new ArrayList<CmsUUID>());
            }
        });

        addButton(m_cancelButton);
    }
1160668
function ()
	{
		/* Remove the old buttons */
		for ( var i=this.dom.buttons.length-1 ; i>=0 ; i-- ) {
			this.dom.collection.removeChild( this.dom.buttons[i] );
		}
		this.dom.buttons.splice( 0, this.dom.buttons.length );
		this.dom.groupButtons.splice(0, this.dom.groupButtons.length);

		if ( this.dom.restore ) {
			this.dom.restore.parentNode( this.dom.restore );
		}

		/* Re-add them (this is not the optimal way of doing this, it is fast and effective) */
		this._fnAddGroups();
		this._fnAddButtons();

		/* Update the checkboxes */
		this._fnDrawCallback();
	}
860043
function(element, options) {
        this.$element = $(element)
        this.options = $.extend({}, Button.DEFAULTS, options)
        this.isLoading = false
    }
982290
public void updateButtonVisibility() {
        if (isDirty()) {
            if (m_isValid) {
                m_saveButton.setEnabled(true);
            }
            m_undoButton.setEnabled(true);
            if (m_td != null) {
                m_td.setDirty(m_itemId, true);
            }
            m_owner.indicateDirtiness();
        } else {
            m_saveButton.setEnabled(false);
            m_undoButton.setEnabled(false);
            if (m_td != null) {
                m_td.setDirty(m_itemId, false);
            }
            m_owner.indicateDirtiness();
        }
        if (!m_isValid) {
            m_saveButton.setEnabled(false);
        }
    }
838141
def enable_radio_button(self):
        
        for button in self.default_input_button_group.buttons():
            button.setEnabled(True)
        self.set_selected_radio_button()
        self.custom_value.setEnabled(True)
559114
private void setupButtons() {
        cancelButton = (TextView) findViewById(R.id.cancelButton);
        cancelButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                setResult(CANCELLED);
                finish();
            }
        });
        forgetButton = (TextView) findViewById(R.id.forgotPin);
        forgetButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onForgotPin();
                setResult(FORGOT);
                finish();
            }
        });
    }
641919
private void adaptNeutralButton() {
        if (neutralButton != null) {
            neutralButton.setText(neutralButtonText != null ?
                    neutralButtonText.toString().toUpperCase(Locale.getDefault()) : null);
            OnClickListenerWrapper onClickListener =
                    new OnClickListenerWrapper(neutralButtonListener, false, getDialog(),
                            DialogInterface.BUTTON_NEUTRAL);
            neutralButton.setOnClickListener(onClickListener);
            neutralButton.setVisibility(
                    !TextUtils.isEmpty(neutralButtonText) ? View.VISIBLE : View.GONE);
            adaptButtonBarContainerVisibility();
        }
    }
291684
private void addButtons() {
        int y = DEFAULT_DIALOG_HEIGHT - 19;
        int x = DEFAULT_DIALOG_WIDTH - DEFAULT_SIDE_PANE_WIDTH - 70;

        previousButtonName = this.insertButton(new PreviousActionListener(), x, y, 40, 0, I18nLabelsLoader.REPORT_STEP_BUTTONS_PREV, ((short) PushButtonType.STANDARD_value));
        x += 50;
        nextButtonName = this.insertButton(new NextActionListener(), x, y, 40, 0, I18nLabelsLoader.REPORT_STEP_BUTTONS_NEXT, ((short) PushButtonType.STANDARD_value));
        x += 50;
        cancelButtonName = this.insertButton(this, x, y, 40, 0, I18nLabelsLoader.REPORT_STEP_BUTTONS_CANCEL, ((short) PushButtonType.CANCEL_value));
    }
1110699
private void adaptButtonBarDividerVisibility() {
        if (buttonBarDivider != null) {
            buttonBarDivider.setVisibility(showButtonBarDivider ? View.VISIBLE : View.GONE);
            buttonBarDivider.setVisibleByDefault(showButtonBarDivider);
        }
    }
226362
function() {
      
      this.disabled = true;
      
      Dom.addClass(this.el,"inputEx-Button-disabled");
      
      if (this.options.type === "submit") {
         this.el.disabled = true;
      }
   }
788756
def add(self, *args):
        
        row = []
        for index, button in enumerate(args, start=1):
            row.append(button)
            if index % self.row_width == 0:
                self.inline_keyboard.append(row)
                row = []
        if len(row) > 0:
            self.inline_keyboard.append(row)
        return self
327118
def addButton(self, button, alignment=None):
        
        if alignment == None:
            if button.pos().x() < self.pos().x():
                alignment = Qt.AlignLeft
            else:
                alignment = Qt.AlignRight
        
        all_buttons = self.buttons()
        if button in all_buttons:
            return False
        
        # move the button to this edit
        button.setParent(self)
        button.setAutoRaise(True)
        button.setIconSize(self.iconSize())
        button.setCursor(Qt.ArrowCursor)
        button.setFixedSize(QSize(self.height() - 2, self.height() - 2))
        
        self._buttons.setdefault(alignment, [])
        self._buttons[alignment].append(button)
        self.adjustButtons()
        return True
444438
private void addDisabledExamples() {
		add(new WHeading(HeadingLevel.H2, "Examples of disabled buttons"));

		WPanel disabledButtonLayoutPanel = new WPanel(WPanel.Type.BOX);
		disabledButtonLayoutPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 6, 0,
				FlowLayout.ContentAlignment.BASELINE));
		add(disabledButtonLayoutPanel);

		WButton button = new WButton("Disabled button");
		button.setDisabled(true);
		disabledButtonLayoutPanel.add(button);
		button = new WButton("Disabled button as link");
		button.setDisabled(true);
		button.setRenderAsLink(true);
		disabledButtonLayoutPanel.add(button);

		add(new WHeading(HeadingLevel.H3, "Examples of disabled buttons displaying only an image"));
		disabledButtonLayoutPanel = new WPanel(WPanel.Type.BOX);
		disabledButtonLayoutPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 6, 0,
				FlowLayout.ContentAlignment.BASELINE));
		add(disabledButtonLayoutPanel);

		button = new WButton("Disabled button");
		button.setDisabled(true);
		button.setImage("/image/tick.png");
		button.setToolTip("Checking currently disabled");
		disabledButtonLayoutPanel.add(button);
		button = new WButton("Disabled button as link");
		button.setDisabled(true);
		button.setRenderAsLink(true);
		button.setImage("/image/tick.png");
		button.setToolTip("Checking currently disabled");
		disabledButtonLayoutPanel.add(button);

		add(new WHeading(HeadingLevel.H3,
				"Examples of disabled buttons displaying an image with imagePosition EAST"));

		disabledButtonLayoutPanel = new WPanel(WPanel.Type.BOX);
		disabledButtonLayoutPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 6, 0,
				FlowLayout.ContentAlignment.BASELINE));
		add(disabledButtonLayoutPanel);
		button = new WButton("Disabled button");
		button.setDisabled(true);
		button.setImage("/image/tick.png");
		button.setToolTip("Checking currently disabled");
		button.setImagePosition(ImagePosition.EAST);
		disabledButtonLayoutPanel.add(button);
		button = new WButton("Disabled button as link");
		button.setDisabled(true);
		button.setRenderAsLink(true);
		button.setImage("/image/tick.png");
		button.setToolTip("Checking currently disabled");
		button.setImagePosition(ImagePosition.EAST);
		disabledButtonLayoutPanel.add(button);
	}
357065
private void enableButtons() {
		final int itemCount = this.list.getTable().getItemCount();
		final boolean hasElement = itemCount > 0;
		IStructuredSelection selection;
		if (hasElement) {
			selection = this.list.getStructuredSelection();
			final int selectionCount = selection.size();
			if (selectionCount <= 0 || selectionCount > itemCount) {
				selection = null;
			}
		} else {
			selection = null;
		}
		this.removeButton.setEnabled(selection != null);
		this.clearButton.setEnabled(hasElement);
		if (this.isSortedElements) {
			final Object firstElement = selection != null ? this.list.getTable().getItem(0).getData() : null;
			final Object lastElement = selection != null ? this.list.getTable().getItem(this.list.getTable().getItemCount() - 1).getData() : null;
			final boolean isNotFirst = firstElement != null && selection != null && firstElement != selection.getFirstElement();
			final boolean isNotLast = lastElement != null && selection != null && lastElement != selection.getFirstElement();
			this.moveTopButton.setEnabled(isNotFirst);
			this.moveUpButton.setEnabled(isNotFirst);
			this.moveDownButton.setEnabled(isNotLast);
			this.moveBottomButton.setEnabled(isNotLast);
		}
	}
285410
public function addButtons()
    {
        $this->save = $this->addSubmit('Save');
        $this->reset = $this->addSubmit('Reset');

        return $this;
    }