#!/usr/bin/env python
# -*- coding: ISO-8859-1 -*-
# generated by wxGlade 0.4cvs on Sun Aug 21 20:36:19 2005

import wx

def PrintExample(teststring):
	print """this function should print '%s' at position 100mm, 60mm on an A4 page""" % teststring

class MyFrame(wx.Frame):
	def __init__(self, *args, **kwds):
		kwds["style"] = wx.DEFAULT_FRAME_STYLE
		wx.Frame.__init__(self, *args, **kwds)
		self.button = wx.Button(self, -1, "Print me")
		sizer = wx.BoxSizer(wx.VERTICAL)
		sizer.Add(self.button, 0, wx.ALL, 3)
		self.SetAutoLayout(True)
		self.SetSizer(sizer)
		sizer.Fit(self)
		sizer.SetSizeHints(self)
		self.Layout()
		self.Bind(wx.EVT_BUTTON, self.OnButton, self.button)

	def OnButton(self, event): # wxGlade: MyFrame2.<event_handler>
		PrintExample("this is a test")
		event.Skip()

class MyApp(wx.App):
	def OnInit(self):
		frame = MyFrame(None, -1, "Printer test")
		self.SetTopWindow(frame)
		frame.Show()
		return 1

if __name__ == "__main__":
	app = MyApp(0)
	app.MainLoop()
