What do you mean columns doubling? Do you mean that you want 4 columns, but
you get 8 instead? ListView does not automatically create columns, you code
does. You need show more details and/or your code.
> I am writing an application in VB6 using ListView and the column
> headers of the four columns keep doubling every time I click on the
> button to show contents of the listview. Is there any way to get rid
> of the this problem? Any help would be greatly appreciated.
> Thanks,
> Valiz
Sparky - 30 Jan 2004 22:58 GMT
Assuming the previous post was correct, then it sounds like your
"Columnheader setting-up code" is in the button click event. Instead, I
would recommend moving it to the Form_Load event, so that it only happens
once. Then the button click only has to load the list (remember to
listview.clear it first if you're not already).
If you're really bothered about having the button create the columns, then
put an "if" statement around the bit of code that does so, and check "if
listview.columnheaders.count = 0" first.
Sparky.
> What do you mean columns doubling? Do you mean that you want 4 columns, but
> you get 8 instead? ListView does not automatically create columns, you code
[quoted text clipped - 6 lines]
> > Thanks,
> > Valiz