#!/usr/bin/python # border.py import wx class MainFrame(wx.Frame): def __init__(self, parent, id, title): try: wx.Frame.__init__(self, parent, id, title, size=(800, 600)) #Create Main Panel panel = wx.Panel(self, -1) #panel.SetBackgroundColour('#4f5049') panel.SetBackgroundColour('#00A03D') wx.Frame.SetMinSize(self, (800,600)) vbox = wx.BoxSizer(wx.VERTICAL) dealerPanel = wx.Panel(panel, -1) dealerPanel.SetBackgroundColour('#ededed') AIPanel1 = wx.Panel(panel, -1) AIPanel1.SetBackgroundColour('#3d3d3d') AIPanel2 = wx.Panel(panel, -1) AIPanel2.SetBackgroundColour('#5d3d3d') AIPanel3 = wx.Panel(panel, -1) AIPanel3.SetBackgroundColour('#7d3d3d') playerPanel = wx.Panel(panel, -1) playerPanel.SetBackgroundColour('#9d3d3d') buttonPanel = wx.Panel(panel, -1) buttonPanel.SetBackgroundColour('#9d9d9d') vbox.Add(dealerPanel, 1, wx.EXPAND | wx.ALL) vbox.Add(AIPanel1, 1, wx.EXPAND | wx.ALL) vbox.Add(AIPanel2, 1, wx.EXPAND | wx.ALL) vbox.Add(AIPanel3, 1, wx.EXPAND | wx.ALL) vbox.Add(playerPanel, 1, wx.EXPAND | wx.ALL) vbox.Add(buttonPanel, 1, wx.EXPAND | wx.ALL) panel.SetSizer(vbox) #Create a window #window = DrawWindow(self) dummyPanel = wx.Panel(AIPanel2, -1) dummyPanel.SetBackgroundColour('#3d1000') dummyPanel2 = wx.Panel(AIPanel2, -1) dummyPanel2.SetBackgroundColour('#3dFF00') dummyPanel3 = wx.Panel(AIPanel2, -1) dummyPanel3.SetBackgroundColour('#9d10FF') #Create a sizer hbox = wx.BoxSizer(wx.HORIZONTAL) hbox.Add(dummyPanel, 1, wx.EXPAND | wx.ALL) hbox.Add(dummyPanel2, 1, wx.EXPAND | wx.ALL) hbox.Add(dummyPanel3, 1, wx.EXPAND | wx.ALL) AIPanel2.SetSizer(hbox) # Create Buttons buttonBox = wx.BoxSizer(wx.HORIZONTAL) button1 = wx.Button(self, id=-1, label="Button1") ret = buttonBox.Add(button1, 1, wx.EXPAND | wx.ALL) print ret ret = buttonPanel.SetSizer(buttonBox) print ret self.Centre() self.Show(True) except: print "Error" app = wx.App() MainFrame(None, -1, 'Blackjack') app.MainLoop()