Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > wxpython : wxDc and Refresh() = flash

Reply
Thread Tools

wxpython : wxDc and Refresh() = flash

 
 
marco
Guest
Posts: n/a
 
      11-19-2003
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 ?


 
Reply With Quote
 
 
 
 
Brian Kelley
Guest
Posts: n/a
 
      11-19-2003
marco wrote:
> 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

 
Reply With Quote
 
 
 
 
marco
Guest
Posts: n/a
 
      11-20-2003
> > 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


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 ...


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[wxPython-users] ANNOUNCE: wxPython 2.6.3.0 Robin Dunn Python 0 03-28-2006 06:03 PM
[wxPython-users] Web based applications are possible with wxPython? Ruben Charles Python 6 10-25-2005 09:41 PM
wxPython - wx package (new style wxPython?) Logan Python 5 12-11-2003 04:12 PM
[PY GUI] interest function in python GUI(wxpython,pyqt) program.wxpython,pyqt ulysses Python 4 10-22-2003 03:28 PM
wxPython looses function "wxPython.wx.miscc" Anand Python 1 07-23-2003 01:59 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57