durumdara@gmail.com wrote:
Your code is very interesting, but not working good in my machine. Possible it is windows s*ing :-(....
Well, I only tested in OS-X, there are subtle differences.
I installed the new version of the wxPython 2.4 unicode today, but the problem remaining.
I hope you mean wxPython2.8 -- 2.4 is very old.
Are you see that the growing is not working good?
strange -- that must be the system setting a clipping region so that only the expanded part of the Window is re-drawn
And this?
Similar issue, I think.
In Delphi I can solve these problems with a Timer that fired 10 (20, 100, 250) ms after the resize and destroys prev. Timer class.
You can do the same thing in wxPython, with a wx.Timer. I've done that for things that take a while to re-draw. However, I suspect this is fast enough that it should be able to keep up with the Window re-size.
Or if not then how I force the full repaint in your code?
I've just tested on Windows, and I get the same result. Adding a self.Refresh() call at the end of the OnSize() method works, but results in some flashing. I think it's clearing the Window before re-painting it.
Then I tried a dc.DestroyClippingRegion() call in the OnPaint, but that did nothing -- apparently, the clipping is happening somewhere down in the system, not at the DC level. Indeed, a call to dc.Clear() didn't work either.
So: how do I get it to repaint the whole window, but without clearing it first?
I think this may have been covered in a recent thread on this list -- something about a gradient background -- take a look at the last week or so's posts.
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov