I was experimenting with list view groups, and it turns out the control displays incorrectly when the application starts.

As soon as I resize the form it displays correctly:

I do not understand what is happening. Can anyone explain?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s a bug in the Delphi control which I have reproduced. I’m not sure yet what causes the bug. I have submitted this to Quality Central as QC#101104.
I found a simple workaround by adding the following code to the form’s
OnShowevent.The following DFM file is enough to demonstrate the problem:
It turns out that another way to resolve the problem is to move the
ViewStyleentry in the DFM file so that it appears before theItemsentry. So yet another workaround for the problem would be to add the items at runtime. In fact this probably explains why this bug has not been found since I bet that the overwhelming majority of list view code adds the items at runtime.