Solved

Preventing listView from flickering

Posted on 2007-04-10
3
810 Views
Last Modified: 2012-06-27
Hello,

I'm adding a lot of items to a listView in a loop.

How can I prevent it from flickering?

Thank you.
0
Comment
Question by:i950
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 11

Accepted Solution

by:
Babycorn-Starfish earned 500 total points
ID: 18885529
Hi,

try calling BeingUpdate() before you start adding the items and then EndUpdate() once you've finised.
0
 
LVL 9

Expert Comment

by:ripahoratiu
ID: 18897962
SuspendLayout()
Resume or PerformLayout()
DoubleBuffered = true or
SetStyle() and check for ControlStyles that may help (AllPaintingInWmPaint, OptimizedDoubleBuffer )
0
 
LVL 1

Expert Comment

by:Manjesh
ID: 18937195
LockWindowUpdate(Listbox.handle); // from GDI   use PInvoke
....
update
.....
LockWindowUpdate( NULL );
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question