import wx
class InitialMenu(wx.Dialog):
def __init__(self, parent, id, title):
wx.Dialog.__init__(self, parent, id, title, size=(300, 200))
self.colour = wx.Colour(0, 0, 0)
sorter_btn = wx.Button(self, 1, 'App1', (115, 25))
sorter_btn.Bind(wx.EVT_BUTTON, self.onApp1Button)
viewer_btn = wx.Button(self, 2, 'App2', (115, 80))
viewer_btn.Bind(wx.EVT_BUTTON, self.onApp2Button)
self.Centre()
self.ShowModal()
self.Destroy()
def onApp1Button(self, event):
print("Starting App1!")
import app1
app1_frame = app1.createFrame(None, -1, "App1", size=(500, 500)) # it is a 'class createFrame(wx.Frame)'
app1_frame.Show()
def onApp2Button(self, event):
""" For now just print a message"""
print("Starting App2!")
app = wx.App(False)
InitialMenu(None, -1, 'Select app')
app.MainLoop()