From: Alex T. <al...@tw...> - 2005-08-01 17:47:47
|
Kevin Altis wrote: > If you're using wxPython 2.6.x with the current release version of > PythonCard or the version in cvs, please report any issues here. In > particular, I would like to hear about differences from 2.5.x that > you've had to workaround or that are simply broken and we need to > address in the next release. I moved up to wxPython 2.6 (and Python 2.4), using PythonCard from CVS (from yesterday). I saw 2 (or 3) differences (small sample files below). 1. (as originally reported by Brad) I have a checkbox which overlaps a (later in the rsrc file) staticText. In wxPython 2.5.3, this "works", in 2.6 it doesn't. I think 2.6 is correct - the staticText should be drawn after the checkbox's label, and so it should hide the checkbox's text, and so I believe 2.6 is correct. So this is a compatibility warning, but not a bug in wxPython 2.6 (nor in PythonCard). 2. transparent PNG image. I have an imageButton where the image is a file reference to a PNG file with transparent pixels. The imageButton has border set to "transparent". (Needs to be "transparent" to see the problem, works OK if the button is style "3d"). In wxPython 2.5 this works properly. In 2.6, the background of the button shows what was there before the window opened. i.e. it's as though it were transparent all the way through the background of the app window. 3. missing PNG image if the image file is missing, both versions report "cannot load image file". In 2.5, it works OK - so the effect is simply that where the button is shows as background. In 2.6, it works as though the entire image were transparent - i.e. you can see the desktop behind the app window. (so far, just the same as problem 2). BUT - the transparent area is far larger than the imageButton's size. The imageButton has size 20,20 but the transparent area is something like 100,20. So this might be another bug, or it might not. So I think 2 and 3 (if 3 is actually different, not just a manifestation of 2) are wxPython 2.6 bugs, not things that need to be, or even can be, changed in PythonCard. Sample files: wxchanges.py --------------------------------------------- #!/usr/bin/python """ __version__ = "$Revision: 1.5 $" __date__ = "$Date: 2004/04/30 16:26:12 $" """ from PythonCard import model class MyBackground(model.Background): def on_initialize(self, event): # if you have any initialization # including sizer setup, do it here pass def on_mouseDown(self, event): ctlKey = event.ControlDown() print "mouseDown", ctlKey def on_Button_mouseDown(self, event): ctlKey = event.ControlDown() print "mouseDown", ctlKey if __name__ == '__main__': app = model.Application(MyBackground) app.MainLoop() ------------------------------------------- wxchanges.rsrc.py ------------------------------------------ {'application':{'type':'Application', 'name':'Template', 'backgrounds': [ {'type':'Background', 'name':'bgTemplate', 'title':'Standard Template with File->Exit menu', 'size':(400, 300), 'style':['resizeable'], 'menubar': {'type':'MenuBar', 'menus': [ {'type':'Menu', 'name':'menuFile', 'label':'&File', 'items': [ {'type':'MenuItem', 'name':'menuFileExit', 'label':'E&xit', 'command':'exit', }, ] }, ] }, 'components': [ {'type':'CheckBox', 'name':'chkallowNameLabelVariation', 'position':(149, 24), 'size':(70, -1), 'label':'Vary', }, {'type':'StaticText', 'name':'Properties', 'position':(214, 6), 'text':'Properties', }, {'type':'StaticText', 'name':'txtname', 'position':(160, 24), 'size':(84, -1), 'alignment':'right', 'text':'name', }, {'type':'ImageButton', 'name':'ImageButton1', 'position':(20, 20), 'border':'transparent', 'file':'image.png', }, ] # end components } # end background ] # end backgrounds } } -------------------------------------- image.png This is the file resourceEditor/images/nudge_down.png, copied and renamed to image.png but note that as it says in problem 3 above, if this file is missing you can see the problem. ------------------------------------- -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.9.6/59 - Release Date: 27/07/2005 |