I need to draw the SubItems of a listview manually. My Problem is, how to determine the leftposition of a subitem (i'm currently doing this with the columns-property of the listview).
Now, when the user resizes one of the columns, the width-property of the Column in Columns property is not updated and the Subitem (TextOut()) is drawn on a wrong position.

I'm using OnCustomDrawSubItem. Everything works except the drawing while the user resizes a column.

Please help!
Thanks, Bruno
Who is Participating?
fvaConnect With a Mentor Commented:
Looks like a bug in VCL. Try to avoid using the Columns when you need the width and use instead the LVM_GETCOLUMNWIDTH message like this:


brunoheAuthor Commented:
Get another 500 points for a helping answer.
brunoheAuthor Commented:

That's it, thanks for help! Great job!

cu, Grz, Brunohe
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.