FIX: Adding Subitems To Hidden ListView Causes APP Error
Symptoms
A 32-bit Visual Basic application with a ListView control can generate anapplication error or incorrectly display the subitems if the subitems areadded to a ListView control that is hidden on a form.
Resolution
To eliminate this behavior, use one of the following methods:
If you want your ListView control in the form to be hidden when the formis shown, toggle the Visible property once before adding the subitems tothe ListView control. To toggle the Visible property, initially set theVisible property to True and then reset the Visible property to False.
-or-
At design time, set the ListView control Visible property to True. Then inthe first line of code in the form’s Load procedure, set the ListViewcontrol Visible property to False.

Leave a Reply