1. flicker problem

I gotta question.
How do you get rid of flicker on list boxes when they are changing
several times per second?

  This, run several times per second, causes flicker:

[example 1]

    eraseItems(lstCity)
    <begin loop>
      addItem(lstCity,data)
    <end loop>

  What I would like to do is something like:

[example 2]

    eraseItems_without_redrawing(lstCity)
    <begin loop>
      addItem_without_redrawing(lstCity,data)
    <end loop>
    redraw(lstCity)

  This would produce no flicker except the items that are changed, if any.

  Is there any way in win32lib.ew to do this, or to fake it?


       Jerry Story

new topic     » topic index » view message » categorize

2. Re: flicker problem

I cannot replicate the problem on my computer, but from memory try this:

Use this function to turn redrawing off before adding bulk items:
SendMessage(hwndList,WM_SETREDRAW,False,0)

Then call this function to turn it on again after all additions are made.
SendMessage(hwndList,WM_SETREDRAW,True,0)

You might have to redraw the window too, I haven't tried it

----- Original Message -----
From: <jstory at freenet.edmonton.ab.ca>
To: "EUforum" <EUforum at topica.com>
Sent: Saturday, June 30, 2001 4:49 PM
Subject: flicker problem


>
>
>   I gotta question.
> How do you get rid of flicker on list boxes when they are changing
> several times per second?
>
>   This, run several times per second, causes flicker:
>
> [example 1]
>
>     eraseItems(lstCity)
>     <begin loop>
>       addItem(lstCity,data)
>     <end loop>
>
>   What I would like to do is something like:
>
> [example 2]
>
>     eraseItems_without_redrawing(lstCity)
>     <begin loop>
>       addItem_without_redrawing(lstCity,data)
>     <end loop>
>     redraw(lstCity)
>
>   This would produce no flicker except the items that are changed, if any.
>
>   Is there any way in win32lib.ew to do this, or to fake it?
>
>
>        Jerry Story
>
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

3. Re: flicker problem

Hi Jerry,
Faking it:
Set the listview so it is not visible whilst loading and when finished make
it visible again.
setVisible(1stCity, False)
eraseItems(lstCity)
<begin loop>
    addItem(lstCity,data)
<end loop>
setVisible(1stCity, True)

Regards

Tony Steward


Come Visit Me At www.locksdownunder.com

----- Original Message -----
From: <jstory at freenet.edmonton.ab.ca>
To: "EUforum" <EUforum at topica.com>
Sent: Saturday, June 30, 2001 2:49 PM
Subject: flicker problem


>
>
>   I gotta question.
> How do you get rid of flicker on list boxes when they are changing
> several times per second?
>
>   This, run several times per second, causes flicker:
>
> [example 1]
>
>     eraseItems(lstCity)
>     <begin loop>
>       addItem(lstCity,data)
>     <end loop>
>
>   What I would like to do is something like:
>
> [example 2]
>
>     eraseItems_without_redrawing(lstCity)
>     <begin loop>
>       addItem_without_redrawing(lstCity,data)
>     <end loop>
>     redraw(lstCity)
>
>   This would produce no flicker except the items that are changed, if any.
>
>   Is there any way in win32lib.ew to do this, or to fake it?
>
>
>        Jerry Story
>
>
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

4. Re: flicker problem

On 2001 xxx -1, Tony Steward wrote:

> Hi Jerry,
> Faking it:
> Set the listview so it is not visible whilst loading and when finished make
> it visible again.
> setVisible(1stCity, False)
> eraseItems(lstCity)
> <begin loop>
>     addItem(lstCity,data)
> <end loop>
> setVisible(1stCity, True)
> 

  Tried that.  Doesn't work.  Still flickers.


       Jerry Story

new topic     » goto parent     » topic index » view message » categorize

5. Re: flicker problem

Jerry,
I tried the "fix" of using WM_SETREDRAW to enclose the loading of the list
box and only got a single flicker, no matter how many items I loaded in. Is
this what you get? Is that a problem? Can you send me a small example of the
effect you have got?


------
Derek Parnell
Melbourne, Australia
"To finish a job quickly, go slower."

----- Original Message -----
From: <jstory at freenet.edmonton.ab.ca>
To: "EUforum" <EUforum at topica.com>
Sent: Saturday, June 30, 2001 2:49 PM
Subject: flicker problem


>
>
>   I gotta question.
> How do you get rid of flicker on list boxes when they are changing
> several times per second?
>
>   This, run several times per second, causes flicker:
>
> [example 1]
>
>     eraseItems(lstCity)
>     <begin loop>
>       addItem(lstCity,data)
>     <end loop>
>
>   What I would like to do is something like:
>
> [example 2]
>
>     eraseItems_without_redrawing(lstCity)
>     <begin loop>
>       addItem_without_redrawing(lstCity,data)
>     <end loop>
>     redraw(lstCity)
>
>   This would produce no flicker except the items that are changed, if any.
>
>   Is there any way in win32lib.ew to do this, or to fake it?
>
>
>        Jerry Story
>
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

6. Re: flicker problem

On Mon, 2 Jul 2001, Derek Parnell wrote:

> Jerry,
> I tried the "fix" of using WM_SETREDRAW to enclose the loading of the list
> box and only got a single flicker, no matter how many items I loaded in. Is
> this what you get? Is that a problem? Can you send me a small example of the
> effect you have got?

   I tried it.  It greatly reduced the flicker, down to where it is
probably acceptable.  I have a bunch of list boxes, and I applied
WM_SETREDRAW to all of them.  Sometimes one of them flickers.
  The list boxes are controlled by a timer.  When the timer ticks, all the
list boxes get fresh data.
  The program is developed to where it would no longer be a "small
sample", but maybe I'll make a small sample.

       Jerry Story

new topic     » goto parent     » topic index » view message » categorize

7. Re: flicker problem

On Mon, 2 Jul 2001, Derek Parnell wrote:

> Jerry,
> I tried the "fix" of using WM_SETREDRAW to enclose the loading of the list
> box and only got a single flicker, no matter how many items I loaded in. Is
> this what you get? Is that a problem? Can you send me a small example of the
> effect you have got?

  http://www.edmc.net/~jstory/BLINKING.ZIP

  It's not bad, but you can check it out anyway.

       Jerry Story

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu