A part of my application is composed of a frame that invokes another frame.
The child frame has as wx.FRAME_FLOAT_ON_PARENT style and has several buttons including the “Load” button that when pressed calls a FileDialog.
Now when I press the load button it has a strange and annoying flicker. I noticed that this flicker does not occur if I do not set the foreground color Load button.
I don't see any flicker, on Win7, Py 2.6.5 and wx 2.8.11.0.
Initially I wasn't sure and I removed the evt.Skip in the handler, but with or without I don't see a flicker.
I changed your sample to leave the Save button with standard font/colour and call the same handler as for Load and they look as if they behave the same to me.
Are you seeing this on Windows or on another platform?
I don't see any flicker, on Win7, Py 2.6.5 and wx 2.8.11.0.
Initially I wasn't sure and I removed the evt.Skip in the handler, but with or without I don't see a flicker.
I changed your sample to leave the Save button with standard font/colour and call the same handler as for Load and they look as if they behave the same to me.
Are you seeing this on Windows or on another platform?
Il giorno 24 febbraio 2012 14:25, werner wbruhin@free.fr ha scritto:
Hi don’t see any flicker, on Win7, Py 2.6.5 and wx 2.8.11.0.
Initially I wasn’t sure and I removed the evt.Skip in the handler, but with or without I don’t see a flicker.
I changed your sample to leave the Save button with standard font/colour and call the same handler as for Load and they look as if they behave the same to me.
Are you seeing this on Windows or on another platform?
Windows Vista, python 2.7.2, wxPython 2.8.12.1 (msw-unicode).
Whe flicker refers to the fact that the button disappears for a brief
moment.
IIRC some controls when you switch colors on them cause the control to
fallback and use a generic wx drawing routine. This could result in
the flashing due to the usual suspects of erase background handlers,
ect...
This is also in tandem with the SetBackgroundColour call you do on the
frame which causes custom background drawing to be done.
I can't reproduce the issue your seeing but would suggest the
following to track it down.
1) Use a Panel as the parent of the buttons and not the Frame.
Frame=>Panel=>Controls.
2) If the above doesnt help then try handling the buttons erase
background event and doing nothing in the handler (i.e pass).
Cody
···
On Fri, Feb 24, 2012 at 10:16 AM, werner <wbruhin@free.fr> wrote:
On 24/02/2012 16:53, Toni Ruža wrote:
On Fri, 24 Feb 2012 14:33:48 +0100, Fabio Spadaro >> <fabiolinospad@gmail.com> wrote: