0
Reply

ListView Columns Problem

williamsp2

williamsp2

Jul 23 2004 11:27 AM
1.5k
I have a ListView without any columns on my form that was created with the designer. I dynamically add the columns to the ListView with a width of -1. If I add them in the MainForm() function, everything works ok. But if I move them to another function that is called based on an event, the width stays at 0 even though I have told it -1. I also add the data to the ListView in the respective functions. I use ListView::BeginUpdate() and ListView::EndUpdate(). It is the identical code, I just copied and pasted from one location to the other. What am I doing wrong? Any help is appriciated.