Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General 2 / January 2004



Tip: Looking for answers? Try searching our database.

Column Headers in Listview keep doubling

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Valiz - 29 Jan 2004 00:26 GMT
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
Norman Yuan - 29 Jan 2004 02:59 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.