From: Kevin A. <al...@se...> - 2004-08-07 15:47:01
|
On Aug 6, 2004, at 3:53 PM, XXXXXXXXXXX wrote: > Is it OK to overlap Image and TextField components? As mentioned in > another thread, I've used a large bitmap as an Image and place > TextField > components on top. I've noticed a couple of things: > > 1) Every time I change a property in one of the TextFields, all of the > TextFields redraw and the current one disappears behind the Image. I > can > use the "move to front" to get it back, or if I save the resource > project > then upon reloading the TextFields are still all on top. > > This is 0.7.3.1 on Windows NT SP6a > > 2) When I move the project to Mac OSX 10.3.3/Pythoncard 0.7.3.1 the > TextFields are not visible - if you click in the right place in the > resource editor then you can see the cursor and type into them, but > once > you click elsewhere the contents disappear. If you run the project then > again the TextFields appear but once you select them they stay on top. > > Using the resource editor's "move to front", etc. doesn't make any > difference, but I think it's a drawing problem rather than a depth one > (if that makes sense). > > Like I said, maybe I'm not using the components in the fashion they > were > intended? > > Neil > The Mac version of wxPython 2.5.2.3 is dramatically improved over previous releases, but it still has some z-order issues and doesn't really support overlapping widgets like you can do on Windows. If you are using a background image set via the Background Info... dialog instead of an actual component like Image, ImageButton, or BitmapCanvas, then that is different since the background image is just drawn on the panel and not actually an overlapping control. Using a background image seems to work reasonably well on the Mac with the upcoming wxPython release except that text fields will leave behind a white rectangle when the field loses focus and it will probably require an extra Refresh() and Update() call on the underlying panel to get that to be cleaned up. ka |