added setMax and setMin functions to various widgets