Is there a way of capturing Maximize and Minimize Event Inside a Timer Event(Moving Line Stops moving when Frame Maximized)

Thanks in advance. I am trying to figure out how to create a not to
complicated Photo Slider in wxpython, this probably just came into my mind
this saturday evening. First of all i tried to search for how i can use the
wxpython Timer as is the only and only way we can create some moving object,
and probably i want to port to photo sliding. I fell into some tutorial
which figured out how to use timer and move user own drawn line. I did the
stuff pratically, But here came a problem, when I Maximize the Whole
Application, the Moving Line stops Moving. I tried Incrementing and
Decrementing the Timer Interval but all in pain cause there was no change.

I thought may i could capture the maximize event inside of a timer such that
when the windows is maximized the object is notified and just keeps moving
not stopping, but i can't probably get this event.

Here is my code have a look at it.
MOVING.py
<http://wxpython-users.1045709.n5.nabble.com/file/n5715721/MOVING.py>

···

--
View this message in context: http://wxpython-users.1045709.n5.nabble.com/Is-there-a-way-of-capturing-Maximize-and-Minimize-Event-Inside-a-Timer-Event-Moving-Line-Stops-movin-tp5715721.html
Sent from the wxPython-users mailing list archive at Nabble.com.

want_learn1 wrote:

Thanks in advance. I am trying to figure out how to create a not to
complicated Photo Slider in wxpython, this probably just came into my mind
this saturday evening. First of all i tried to search for how i can use the
wxpython Timer as is the only and only way we can create some moving object,
and probably i want to port to photo sliding. I fell into some tutorial
which figured out how to use timer and move user own drawn line. I did the
stuff pratically, But here came a problem, when I Maximize the Whole
Application, the Moving Line stops Moving. I tried Incrementing and
Decrementing the Timer Interval but all in pain cause there was no change.

I thought may i could capture the maximize event inside of a timer such that
when the windows is maximized the object is notified and just keeps moving
not stopping, but i can't probably get this event.

Here is my code have a look at it.
MOVING.py
<http://wxpython-users.1045709.n5.nabble.com/file/n5715721/MOVING.py&gt;

You should not save the PaintDC, but rather create a new one each time you get a paint event. Instead of calling your paint handler from the timer handler you can call one of the Refresh methods, which will then trigger a new paint event for you.

···

--
Robin Dunn
Software Craftsman