'Turn on and off the panels.
:param panel: The panel to turn on and off
:param active: If it should be activated or deactivated'

def toggle_panels(self, panel, active):

    widg = self.panels[panel]
    if active:
        widg.show()
    else:
        widg.hide()
    self.panactiv[panel] = active
