def button_OnClick(self, evt): btn = evt.GetEventObject().GetLabel() # Get the name of the button and store in btn variable id = evt.GetEventObject().GetId() # Get the id of the button for differentiating between admin and client if btn == 'Admin': # Admin Button panel = Panels.AdminLogin(self) self.pushWinStack(panel) self.Layout() elif btn == 'Client': # Client Button panel = Panels.ClientLogin(self) self.pushWinStack(panel) self.Layout()