wxpython : wxDc and Refresh() = flash

M

marco

Juste a simple question about the DC in wxpython ...

I've made a wxWindow class, where i need to paint myself the content.
so i've added an evt_paint() to draw in the wxPaintDC ...
It works like a charm !! superb

To trigg the painter event, in some codes, i use the Refresh() method
It works greatly !

But the trouble is :

i found it flash a lot my wxwindow, when i trigg the painter ...
(i see speed "drawing horizontal line" .. which make the screen seems to
flash (i don't know how to describe that, but that flash my screen ;-) ))

Here are my questions :

- is there a way to wait for an "vertical top" to draw the content (to
synchronize with the screen redraw) ?
- is there a way to implement a double-buffering system, to let the redraw
be smoother ?

in an another way : how to skip theses flash redraw ?
 
B

Brian Kelley

marco said:
Juste a simple question about the DC in wxpython ...

I've made a wxWindow class, where i need to paint myself the content.
so i've added an evt_paint() to draw in the wxPaintDC ...
It works like a charm !! superb

To trigg the painter event, in some codes, i use the Refresh() method
It works greatly !

Two points
1) you would do well to subscribe to the wxPython news group, they
specifically handle wxPython related issues and you will have a better
shot at getting the right answer.

http://wxpython.org/maillist.php

2) In the demos supplied by wxPython, see the wxScrolledWindow example.
They show how to use a double buffering screen that will help prevent
the flashing screen when it is being redrawn. Just look for

if BUFFERED:

in the code. If you don't have access to this, I'll send it to you.

Brian
 
M

marco

Juste a simple question about the DC in wxpython ...
Two points
1) you would do well to subscribe to the wxPython news group, they
specifically handle wxPython related issues and you will have a better
shot at getting the right answer.

http://wxpython.org/maillist.php

sure ... and i've already subscribe to it
2) In the demos supplied by wxPython, see the wxScrolledWindow example.
They show how to use a double buffering screen that will help prevent
the flashing screen when it is being redrawn. Just look for

if BUFFERED:

in the code. If you don't have access to this, I'll send it to you.

Brian

thanx a lot ...
i've got the demo, and got access to the code ...
(i use it a lot, but never see an example to disabled this flashed
rendering)

i will use it ...
thanx for your answer ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top