OpenCores
URL https://opencores.org/ocsvn/phr/phr/trunk

Subversion Repositories phr

[/] [phr/] [trunk/] [codigo/] [gui/] [windows/] [minimal python2.7.6/] [wx_hola_mundo/] [wx_example.py] - Blame information for rev 405

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 172 maximiq
import wx
2
class MyFrame(wx.Frame):
3
    def __init__(self, parent, title):
4
        wx.Frame.__init__(self, parent, -1, title )
5
        btn = wx.Button(self, -1, "Hola")
6
        self.Bind(wx.EVT_BUTTON, self.say_hello, btn)
7
 
8
    def say_hello(self,*arg):
9
        print "hola todo el mundo!"
10
 
11
class MyApp(wx.App):
12
    def OnInit(self):
13
        frame = MyFrame(None, "Simple wxPython App")
14
        frame.Show(True)
15
        return True
16
MyApp().MainLoop()

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.