#!/usr/bin/env python

import wx

class Pallet(wx.Frame):
    def __init__(self, *args, **kwargs):
        super(Pallet, self).__init__(*args, **kwargs)
        self.panel = wx.Panel(self)
        self.ButtonSizer = wx.BoxSizer(wx.HORIZONTAL)
        self.createButtons()
        self.panel.SetSizerAndFit(self.ButtonSizer)
        self.Fit()
       
    def buttonLabels(self):
        return ("Button1", "Button2", "Button3")
       
    def createButtons(self):
        labels= self.buttonLabels()
        #buttonSize=(70,30)
        sizer=self.ButtonSizer
        for label in labels:
            button = wx.Button(self.panel, label=label)#, size=buttonSize)
            sizer.Add(button, 0, wx.ALIGN_CENTER|wx.ALL, 2)
           
class MyApp(wx.App):
    def OnInit(self):
        pallet = Pallet(None, style=wx.FRAME_TOOL_WINDOW)
        pallet.Show()
        return True
       
if __name__ == '__main__':
    app = MyApp(0)
    app.MainLoop() 
