General Box#
This is the general class all input boxes inherit from. For all input boxes see this page.
- class squap.widgets.Box(parent)[source]#
General class for each squap box.
- Parameters:
parent (
InputTable) – The parentInputTable.
- bind(func)[source]#
Bind function
functo 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.
- unbind(func)[source]#
Unbind function. Is used internally when removing a box.
- Parameters:
func (callable) – function to unbind from this box.
- set_value(value)[source]#
Set the value of the box and var.var_name to
value. Note that for a slider, the new slider position will be the closest possible position tovalue, and the new value of var.var_name will be the value corresponding to the new slider position.
- value()[source]#
Return the current value of var.var_name