potential problems are that the C++ side of the "stock-objects"
(wx.BLUE_PEN, wx.TheColourDatabase, etc.) are not initialized until
the wx.App object is created, so you should not use them until after
-you have created your wx.App object. (In fact, until I find a better
-solution trying to use one of the stock objects before the app is
-created will probably result in a crash.)
+you have created your wx.App object. If you do then an exception will
+be raised telling you that the C++ object has not bene initialized
+yet.
Also, you will probably not be able to do any kind of GUI or bitmap
operation unless you first have created an app object, (even on
Change it like so::
- myCustomEventType = wxNewEventType()
- EVT_MY_CUSTOM_EVENT = wxPyEventBinder(myCustomEventType, 1)
+ myCustomEventType = wx.NewEventType()
+ EVT_MY_CUSTOM_EVENT = wx.PyEventBinder(myCustomEventType, 1)
The second parameter is an integer in [0, 1, 2] that specifies the
number of IDs that are needed to be passed to Connect.
You shouldn't need to migrate all your modules over to use the new
package and names right away as there are modules in place that try to
provide as much backwards compatibility of the names as possible. If
-you rewrote the above sample using "from wxPython.wx import *", the
+you rewrote the above sample using "from wxPython.wx import * ", the
old wxNames, and the old style of event binding it will still work
just fine.
Blit(destPt, size, sourceDC, srcPt,
rop = wxCOPY, useMask = FALSE, srcPtMask = wx.DefaultPosition)
- SetClippingRegionXY SetClippingRegion(x, y, width, height)
+ SetClippingRegionXY(x, y, width, height)
SetClippingRegion(point, size)
SetClippingRect(rect)
SetClippingRegionAsRegion(region);