used a delegation to bind the routine handle to open and close the panel.