wxpython : wxDc and Refresh() = flash

Discussion in 'Python' started by marco, Nov 19, 2003.

  1. marco

    marco Guest

    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 ?
     
    marco, Nov 19, 2003
    #1
    1. Advertising

  2. marco

    Brian Kelley Guest

    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
     
    Brian Kelley, Nov 19, 2003
    #2
    1. Advertising

  3. marco

    marco Guest

    > > 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 ...
     
    marco, Nov 20, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bernie
    Replies:
    0
    Views:
    582
    Bernie
    Sep 5, 2004
  2. =?Utf-8?B?VmxhZGk=?=
    Replies:
    0
    Views:
    561
    =?Utf-8?B?VmxhZGk=?=
    Jul 20, 2005
  3. Jim Higson
    Replies:
    1
    Views:
    527
    Jim Higson
    Sep 21, 2004
  4. Replies:
    8
    Views:
    23,556
    SABOND21
    Feb 9, 2012
  5. Anand
    Replies:
    1
    Views:
    361
    Cliff Wells
    Jul 23, 2003
Loading...

Share This Page