listview

  • Thread starter Thread starter :\\\\derian
  • Start date Start date
D

:\\\\derian

I'm sure you guys have heard this time and time again but here is 1 more
time

How can i rapidly update a listview w/o that constant flicker?
I've researched this issue before and have tried countless solutions like
subclassing the control, locking the line, creating a new line in the
background and replacing it with the current line after the update is
complete... they all seem to be useless! Is there any possible way to fix
this issue or is there maybe a <free> 3rd party control i could incorporate
into my project?

all suggestions welcome
:\\derian
 
Hi Derian,

How did you get on with the chess? I didn't get a reply. :-(

Regards,
Fergus
 
You actually remembered eh...
well all the coding is done for a 2 player network game. I'm in the process
of commenting the code but its coming slowly b/c i work 8-6 developing
software and it would look really bad if I were coding games while i was
supposed to be coding something else. I'm just not quite as motivated to
comment now that the real coding is complete.

Ideally, i'd like to get some form of AI for the human vs computer match.
That is much further down the road.

Back to my listview question... Any ideas?
 
You should be able to double-buffer all controls in windoze forms.
Something like:


Public Class ListViewDblBuffer
Inherits ListView

Public Sub New()

MyBase.New()
Me.SetStyle(ControlStyles.DoubleBuffer, True)
Me.SetStyle(ControlStyles.Opaque, True)

End Sub
End Class
 
Having said that - I've double bufferred my list view and list box controls
and I don't see any whoppy-do-dah flicker freeness. I even went as far as
to write my own double bufferring for my list box items (which are custom
drawn anyway). I don't know - there isn't a whole lot of documentation
about windows forms double bufferring anyway. Seems to me like a pretty
important feature.
 
Hi Robin, How did you double-buffer your listbox items? A ListBox item isn't
derived from control...

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit

" System.Reflection Master "

==== Converting to 2002 ====
Remove inline declarations
 
No it isn't. I'm handling the "DrawItem" event in the list box and
rendering my list item to a backbuffer, then blitting it to the Graphics
context "DrawItem" gives me with e.Graphics.DrawImage(backBuffer,
e.Bounds.X, e.Bounds.Y). Create a backbuffer as large as the list item (I'm
creating it in the "DrawItem" event, but it would be quicker to maintain one
outside I suppose), do all your drawing to that and then just blit.

So everything gets drawn to the backBuffer image context. My list items
contain text, images and other stuff (and are quite large). This has
reduced flicked quite a bit. The control as a whole still flickers somewhat
though, but I'm not going to look at that until I've finished this project
(it isn't that bad - could do with some optimisations here and there I
suppose).
 
No cigar... the flickering was reduced by about 20% but its still noticable
enough to be annonying as all hell... any other suggestions?
 
Hi Herfried,

!! ListBox? ListView? List***?

There's no need for swearing, surely!?

;-))

Regards,
Fergus
 
Hi Robin, I see. Nice :-)

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit

" System.Reflection Master "

==== Converting to 2002 ====
Remove inline declarations
 
Back
Top