Re: How to use/understand <Expose> events on MS Windows



Donal K. Fellows wrote:
On Jun 12, 11:59 pm, Erik Leunissen <l...@xxxxxxxxxxxxxxxxxx> wrote:
What is the *meaning* of an <Expose> event under MS Windows? (Yes, I
have seen them happen, but apparently not in this case.)

The meaning is exactly that of the low-level WM_PAINT message: draw a
particular area of a window. If windows have backing store of some
kind, they might be redrawn from that instead of directly by the
application. By what you report, there must be plenty of that in use
in Windows. Note that Expose is strictly X11 language, but the Windows-
equivalent (a WM_PAINT message) is strongly analogous. It's all part
of the machinery that Tk normally conceals from you.


That's too bad.

I really want to bind to the display redraw (actually to the scheduling
thereof through an <Expose> event) of a widget.

Since it's unclear under which circumstances an <Expose> event is
generated on MS Windows, I'm going to perform some trial and error
experiments to find that out.

What has become clear in the meantime is, that if an <Expose> event is
generated on Windows, it is generated for all ancestors of the widget
that has been modified up to the toplevel widget (not including the very
widget that received the modification). This is the complete inverse
from what happens under Linux, where the event is generated for just the
widget being modified, not its the ancestors.

Erik.


More of an issue is that Windows doesn't (AFAIK) generate events when
a window is restacked or when its visibility changes. :-(

Donal.


--
leunissen@ nl | Merge the left part of these two lines into one,
e. hccnet. | respecting a character's position in a line.
.