Re: ListView ownerdrawn performance

Tech-Archive recommends: Speed Up your PC by fixing your registry




"Chris" <misterjingo@xxxxxxxxx> wrote in message
news:UVnwf.87094$D47.42430@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi all,
>
> I've been testing a listview control on an app I'm creating which is in
> 'details view' with 3 columns. It can contain string information from 4
> different objects (linked with Tag), each drawn with a unique colour. When
> I load in 2000 (or even as low as 500) objects the performance hit is
> quite bad, I had to derive a new control from ListView so I could enabled
> double buffering on the control. This stops the flickering, but there is a
> noticeable lag when scrolling the vertical bar up and down. Even having as
> few as 200 objects displayed creates a slight lag.
> At first I thought this might be due to me using many different colours,
> so I tried redrawing in just one colour and the same thing happens. What
> looks worse is minimising the form, and then restoring it, the listview
> doesn't draw (so the desktop can be seen through it) for a few seconds (I
> guess it's drawing the contents of the listview during that time).
> If I turn off ownerdrawn there is no lag on drawing even 2000 items,
> although there is a few second delay on loading the items.
> Is this performance hit normal for ownerdrawn listview controls? If not,
> any tips on removing it would be appreciated!
>
> Chris
>
>

Sorted it out, had an unnecessary loop in the draw routine :)

Chris


.



Relevant Pages

  • Cross-thread operation not valid questions
    ... A form containng several tabs, one of which contains a ListView ... all items in the ListView control on the main form. ... Dim lvwItem as ListViewItem ... unless I insert Application.Doeventsinto the loop. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: ListItem has it been replaced
    ... listview control. ... > Private a As Integer, ... The compile error was when the ListItem in the option ...
    (microsoft.public.access.forms)
  • ListView ownerdrawn performance
    ... I've been testing a listview control on an app I'm creating which is in ... I had to derive a new control from ListView so I could enabled double ... noticeable lag when scrolling the vertical bar up and down. ... Is this performance hit normal for ownerdrawn listview controls? ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: ListView control
    ... it's not possible to have checkbox in listview. ... "Ohad Young" wrote in message ... > So far the ListView control seems to be the ideal control to use. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: ListView Help!
    ... I just answered this in Chris' reply, ... I changed the HeaderStyle from None to Nonclickable, ... However, the ListView looks empty! ... I'm the one that has to die when it's time for me to die, ...
    (microsoft.public.pocketpc.developer)