From: Robin Dunn [mailto:robin@alldunn.com]
Richard Cooper wrote:
>
> I'm having some difficulty in using the
NO_FULL_REPAINT_ON_RESIZE window
> style.
>
> The code below is a working sample showing my problem. It
is distilled down
> from a larger program where NO_FULL_REPAINT_ON_RESIZE helps
keep window
> resizing smooth except for this problem. The problem is
that when you resize
> the frame smaller then larger you end up with artefacts from the
> wxStaticText being drawn over the wxTextCtrl.
>
> Now, I don't fully understand the interaction between
> NO_FULL_REPAINT_ON_RESIZE and controls that are laid out by
sizers, so one
> of two things could be true:
>
> 1) This is what happens when you use
NO_FULL_REPAINT_ON_RESIZE. You need to
> redraw the window manually to fix things
> 2) This shouldn't happen. There is a bug either in my code or
> wx(Python/Windows)
>
> Does anyone know which of these is true? If it's the first
one, what's the
> incantation to refresh the window (since self.Refresh()
doesn't do it)?self.totalField.Refresh() is probably what you want.
Not quite. I had already tried this (and many, many other combinations).
Sorry, should of mentioned that. Doing this refreshes the bulk of the text
area but not it's border. Bug? Or is there another way to refresh
everything?
> If
> it's the second one, any pointers to where the bug is?
>It's probably just a matter of the move/refresh events
happening in an
odd order, so the static text ends up getting drawn over the
text field
after it has alread redrawn itself, and then the static text
gets moved
and redrawn in its new position. If you give the
wx.CLIP_SIBLINGS style
to the text control then it will solve it.
Perfect. That does the job. I can't find this style anywhere in the
documentation. Deliberate? Blindness on my part? Should I submit a bug
report?
Thanks Robin.
Rich
------- Important Disclaimer follows -------
The information in this email and any attachments is confidential and is
solely for the attention of the addressee. It must not be disclosed to any
third party without our prior authority. Any figures or financial data are
for informational purposes only and are not intended as an offer for
purchase or sale of any security. If you are not the intended recipient,
please telephone +44 (20) 7594 4000 immediately.