Reference βŒͺ Class

Cpanel( Helipad model )

Control Panel

The Cpanel class uses either Tkinter or Jupyter to programmatically construct and render a control panel from the various setting functions called in user code and manage user interactions at runtime.

The Tkinter frontend subclasses Tkinter.Tk and the Jupyter frontend subclasses Ipywidgets.VBox. In either case, the class should not be instantiated directly. Use model.launchCpanel() instead.

It is not recommended to directly access individual GUI elements, but if necessary these can be found in Param.element once the control panel is initialized.

Initialization Parameters

  • model Helipad, required

    The model object.

Properties

  • progress ttk.ProgressBar|Ipywidgets.FloatProgress

    The GUI element for the progress bar. Subclasses either ttk.ProgressBar or Ipywidgets.FloatProgress, depending on the frontend, and provides a standard set of methods determinate(), update(), start(), stop(), and done() to handle updating the progressbar state.

  • runButton tkinter.Button|Ipywidgets.Button

    The GUI element for the start/stop/pause button. Subclasses either Tkinter.Button or Ipywidgets.Button, depending on the frontend, and provides a standard set of run(), pause(), and terminate() methods to handle changing the button text and action.

Hooks

Click a hook name for more detailed documentation.

  • CpanelBottom( cpanel, bg )

    Allows low-level access to either the Tkinter or the Jupyter control panel. Allows the insertion of widgets – either a Tkinter frame (or any subclass of it) or an Ipywidget, as appropriate – at the bottom of the control panel, as shown by the red stripe.

  • CpanelAboveParams( cpanel, bg )

    Allows low-level access to either the Tkinter or the Jupyter control panel. Allows the insertion of widgets – either a Tkinter frame (or any subclass of it) or an Ipywidget, as appropriate – above the global parameters panel, as shown by the red stripe.

  • CpanelAboveItemParams( cpanel, bg )

    Allows low-level access to either the Tkinter or the Jupyter control panel. Allows the insertion of widgets – either a Tkinter frame (or any subclass of it) or an Ipywidget, as appropriate – above the item parameters panel, as shown by the red stripe.

  • CpanelTop( cpanel, bg )

    Allows low-level access to either the Tkinter or the Jupyter control panel. Allows the insertion of widgets – either a Tkinter frame (or any subclass of it) or an Ipywidget, as appropriate – at the top of the control panel, as shown by the red stripe.

  • CpanelAboveShocks( cpanel, bg )

    Allows low-level access to either the Tkinter or the Jupyter control panel. Allows the insertion of widgets – either a Tkinter frame (or any subclass of it) or an Ipywidget, as appropriate – above the Shocks panel, as shown by the red stripe.

  • CpanelPostInit( cpanel )

    Runs after the control panel has been built. Can be used to modify control panel elements or add additional elements.

Notes and Examples

  1. Contribute a Note

    Your email address will not be published.

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

History