hide show method in main window