Button#

squap.add_button(name, func=None, row=None)[source]#

Adds a button to the main input widget, or to all input tables if there are more.

Parameters:
  • name (str) – The name in front of the button.

  • func (callable, optional) – The function which is run on button press.

  • row (int, optional) – Row to which the button is added. Defaults to first empty row.

Returns:

The created button widget(s).

Return type:

Button or list of Button

class squap.widgets.InputTable.Button#
Button.bind(func)#

Bind function func to this box, meaning that when the value of the box is changed, the function is called.

Parameters:

func (callable) – function to bind to this box.

Button.unbind(func)#

Unbind function. Is used internally when removing a box.

Parameters:

func (callable) – function to unbind from this box.

Button.change_params(**kwargs)#

Changes the parameters of the button. Accepts name and func as keyword arguments.

Button.remove()#

Remove this box.