What I did I anchored the control so it resizes when the form resizes. I
resized the form and as a matter of fact I can see some hardly noticable
flickering on the elements on the top, but nothing so drastic, but yes there
is some filickering. I find it strange that on my test only the first
element in the lisbox flickers - not the first visible, but the first in the
list. There are some thinks that looks like reduce the flicker, but doesn't
get rid of it completely:
1. Set IntegralHeight to *false* it looks like there is some problem and the
control height changes without visible reason as the list box resizes.
2. Try to double buffer the control. I'd expect this to remove the
flickering, but it looks like it only reduces it a bit. To do that you need
to inherit from the control and in the constructor to set DoubleBuffered
protected property to *true*.
If this doesn't give you good result trye using ListView. I haven't tried,
but as a more complex control it may behave better.
--
HTH
Stoitcho Goutsev (100)
This flickering can be removed if I inherit from the listbox and make it
double buffered.
<ni***********@gmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
hi,
You might have kept a listbox on a form. Thats fine. Please run the
application and try to resize the form. When you resize the form all
the contents of the listbox reloads and gives ample amount of
flickering.
Is there any solution to this problem.
Thanks & Regards
Nirdesh
Stoitcho Goutsev (100) wrote:
>Nirdesh,
When does the control flicker. I created a test application with listbox
containing 100 strings and I don't see any flickering. Either I don't
reproduce your case correctly or you have something esle going on in your
application. Can you post simple, but compilable sample that demonstrates
your problem.
--
Stoitcho Goutsev (100)
<ni***********@gmail.comwrote in message
news:11**********************@e3g2000cwe.googlegr oups.com...
Hi,
I have added a simple listbox in windows form under c# 2.0. It contains
a collection of approx 10 strings as list items. Now when i resize the
form whole listbox flickers.
Please tell me any feasible solution, i need to use a checked listbox
which also has same flickering problem on resize.
Thanks & Regards
Nirdesh Dabas
ni***********@gmail.com