Reference 〉 Function


Hides a parameter after the control panel is drawn. Useful for callback functions, i.e. toggling the visibility of a parameter based on the value of another parameter. Hidden parameters can be re-shown with


  • name str, required

    The name of the parameter to hide.

Notes and Examples

  1. charwick

    Jul 04, 2024 at 15:08

    This code hides the 'rent' parameter depending on whether the 'city' parameter is checked.

    def constrain(model, var, val):
    	if var=='city':
    		if val: model.params.hide('rent')
    heli.params.add('city', 'City', 'check', True, runtime=False, callback=constrain)
  2. Contribute a Note

    Your email address will not be published. Required fields are marked *

    You may use limited HTML for formatting. Please embed blocks of code in <pre><code> </code></pre> tags.