[wxPython] Setting bg color on frame doesn't force repaint?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[wxPython] Setting bg color on frame doesn't force repaint?

andy-224
Linux RedHat 6.0
wxGTK 2.1 snap 9
wxPython 2.1b3
Fvwm Ver 1.24r

When calling SetBackgroundColour() on a frame, the frame isn't repainted
to reflect the new color.  Forcing a repaint (iconifying/un-iconifying)
repaints in the proper color.

                       &y

_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] Setting bg color on frame doesn't force repaint?

Robin Dunn
>
> When calling SetBackgroundColour() on a frame, the frame isn't repainted
> to reflect the new color.  Forcing a repaint (iconifying/un-iconifying)
> repaints in the proper color.
>

Have you tried calling the Refresh method?

--
Robin Dunn
Software Craftsman
[hidden email]
http://AllDunn.com/robin/
http://AllDunn.com/wxPython/  Check it out!






_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] Setting bg color on frame doesn't force repaint?

andy-224

>>
>> When calling SetBackgroundColour() on a frame, the frame isn't repainted
>> to reflect the new color.  Forcing a repaint (iconifying/un-iconifying)
>> repaints in the proper color.
>
>Have you tried calling the Refresh method?

  Yes, calling Refresh() does indeed repaint the window.  It just seems
strange that I must "manually" force a repaint after altering a
User-visible window property ...

                                &y

_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] Setting bg color on frame doesn't force repaint?

Robin Dunn
> >>
> >> When calling SetBackgroundColour() on a frame, the frame isn't
repainted
> >> to reflect the new color.  Forcing a repaint (iconifying/un-iconifying)
> >> repaints in the proper color.
> >
> >Have you tried calling the Refresh method?
>
>   Yes, calling Refresh() does indeed repaint the window.  It just seems
> strange that I must "manually" force a repaint after altering a
> User-visible window property ...
>

I think it's to avoid flicker on some platforms if there are several things
that doing to update the window.  This allows you to do all the things and
then call Refresh when you are done.

--
Robin Dunn
Software Craftsman
[hidden email]
http://AllDunn.com/robin/
http://AllDunn.com/wxPython/  Check it out!



_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] Setting bg color on frame doesn't force repaint?

Robin Dunn
>
> I think it's to avoid flicker on some platforms if there are several
things
> that doing to update the window.  This allows you to do all the things and
> then call Refresh when you are done.
>

Can you tell I usually forget to proof-read my messages?  :-)  I meant to
say, "...if there are several things that need doing to update the
window..."


_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users