#!/usr/bin/env python
# coding: ascii

import sys
import wx
import wx.xrc as xrc
import xrcform

class MyFrame1(xrcform.XrcFrame):
    def __init__(self, parent, id=wx.ID_ANY, title=wx.EmptyString, 
        pos=wx.DefaultPosition, size=wx.DefaultSize, 
        style=wx.DEFAULT_FRAME_STYLE, name=wx.FrameNameStr, 
        res=None, resName=None, autoBindEvt=True):
        
        xrcform.XrcFrame.__init__(self, parent, id, title, pos, size, style, 
            name, res, resName, autoBindEvt)
            
        self.m_button6.SetId(1006)
        self.m_button7.SetId(1007)
        self.m_button8.SetId(1008)
        self.m_button9.SetId(1009)
        self.m_button10.SetId(1010)        
            
    def OnButton_m_button1(self, evt=None):
        wx.MessageBox(self.m_button1.Label)
        
    def OnButton_m_button2(self, evt=None):
        wx.MessageBox(self.m_button2.Label)
        
    def OnButton_m_button3(self, evt=None):
        wx.MessageBox(self.m_button3.Label)
        
    def OnButton_m_button4(self, evt=None):
        wx.MessageBox(self.m_button4.Label)
        
    def OnButton_m_button5(self, evt=None):
        wx.MessageBox(self.m_button5.Label)
        
    def OnButton_1006_1010(self, evt=None):
        wx.MessageBox(evt.GetEventObject().GetLabel())

class MyDialog1(xrcform.XrcDialog):
    def __init__(self, parent, id=wx.ID_ANY, title=wx.EmptyString, 
        pos=wx.DefaultPosition, size=wx.DefaultSize, 
        style=wx.DEFAULT_FRAME_STYLE, name=wx.FrameNameStr, 
        res=None, resName=None, autoBindEvt=True):
        
        xrcform.XrcDialog.__init__(self, parent, id, title, pos, size, style, 
            name, res, resName, autoBindEvt)
            
        self.m_button16.SetId(2006)
        self.m_button17.SetId(2007)
        self.m_button18.SetId(2008)
        self.m_button19.SetId(2009)
        self.m_button20.SetId(2010)        
            
    def OnButton_m_button11(self, evt=None):
        wx.MessageBox(self.m_button11.Label)
        
    def OnButton_m_button12(self, evt=None):
        wx.MessageBox(self.m_button12.Label)
        
    def OnButton_m_button13(self, evt=None):
        wx.MessageBox(self.m_button13.Label)
        
    def OnButton_m_button14(self, evt=None):
        wx.MessageBox(self.m_button14.Label)
        
    def OnButton_m_button15(self, evt=None):
        wx.MessageBox(self.m_button15.Label)
        
    def OnButton_2006_2010(self, evt=None):
        wx.MessageBox(evt.GetEventObject().GetLabel())

        
if __name__ == '__main__':
    app = wx.App()
    xrc.XmlResource.Get().Load('test.xrc')
    frame1 = MyFrame1(None, title='My Frame 1')
    frame1.Show()
    dialog1 = MyDialog1(None, title='My Dialog 1')
    dialog1.Show()
    app.MainLoop()
# EOF.