Param Precedence
This example demonstrates how to order and hide widgets by means of the precedence and display_threshold attributes.
Each Parameter object has a precedence attribute that is defined as follows in the documentation of param:
precedenceis a value, usually in the range 0.0 to 1.0, that allows the order of Parameters in a class to be defined (for e.g. in GUI menus). A negative precedence indicates a parameter that should be hidden in e.g. GUI menus.
A Param pane has a display_threshold attribute defaulting to 0 and defined as follows:
Parameters with precedence below this value are not displayed.
The interactive example below helps to understand how the interplay between these two attributes affects the display of widgets.
The PrecedenceTutorial class emulates a dummy app whose display we want to control and that consists of three input parameters, x, y and z. These parameters will be displayed by panel with their associated default widgets. Additionally, the class declares the four parameters that will control the dummy app display: x_precedence, y_precedence and z_precedence and dummy_app_display_threshold.