wx.EVT_PAINT in wxGTK

Robin Dunn wrote:

Schoenborn, Oliver wrote:

Hello, I'm running an app I'm building with wxPython on MS Windows, whenever
a wxPanel is shown all the controls in it get a EVT_PAINT event, that's
expected behavior. However, running the same app with wxPython and wxGTK on
SGI (Unix) shows that the event for each control is NOT generated when the
panel is shown. Is this a well-known portability thing (i.e. the way I
implemented it probably works only on Windows, a portable implementation
would be slightly different)? The crucial Python code is:

There is no guarantees about event order and etc. when dealing with the native controls. That is one of the costs associated with having a true native look and feel. In this case it is because some controls on wxGTK are not true X Windows, but are just simple widgets drawn directly on the parent window. Hence many of the low level events are not sent at all, and those that are sent are probably synthesized in wxGTK.

What he said.

What is it you are trying to do? Robin's quite right, most of the cross-platform issues that come up on this list have to do with expecting a particular order of operations of when widgets are refreshed, etc.

However, there is usually a way to accomplish what you want without needing particular behavior. In my experience, the cross-platform approach is usually cleaner code anyway.

Let us know what it is you are trying to do, and perhaps we can make a suggestion as to how to do it.

-Chris

ยทยทยท

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (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