mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 01:30:07 +01:00
Gobs and gobs of changes, and tons of progress made. Can now create a wx.App, show a wx.Frame, run the MainLoop, bind event handlers and dispatch the events to the handler! YeeHa!
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@66393 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
6
samples/simple/deprecated.py
Normal file
6
samples/simple/deprecated.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import wxPhoenix as wx
|
||||
app = wx.PySimpleApp() # Should see a deprecation warning here
|
||||
frm = wx.Frame(None)
|
||||
frm.Show()
|
||||
app.MainLoop()
|
||||
|
||||
16
samples/simple/events.py
Normal file
16
samples/simple/events.py
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
import wxPhoenix as wx
|
||||
|
||||
class MyFrame(wx.Frame):
|
||||
def __init__(self, *args, **kw):
|
||||
wx.Frame.__init__(self, *args, **kw)
|
||||
self.Bind(wx.EVT_SIZE, self.onSize)
|
||||
|
||||
def onSize(self, evt):
|
||||
print repr(evt.Size)
|
||||
|
||||
app = wx.App()
|
||||
frm = MyFrame(None, title="Hello Events", size=(480,360))
|
||||
frm.Show()
|
||||
app.MainLoop()
|
||||
|
||||
11
samples/simple/hello.py
Normal file
11
samples/simple/hello.py
Normal file
@@ -0,0 +1,11 @@
|
||||
import sys, os
|
||||
import wxPhoenix as wx
|
||||
|
||||
#print 'PID:', os.getpid(); raw_input('Ready to start, press enter...')
|
||||
|
||||
app = wx.App()
|
||||
frm = wx.Frame(None, title="Hello World!")
|
||||
frm.Show()
|
||||
app.MainLoop()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user