c++ vcl TListView Column Header not drawn at onShow

174 Views Asked by At

Intro: I want to use a TListView for displaying a table. For editing purposes I made a subclass of vcl's TListview, but didn't change much beside clicking on cells. More importantly, I didn't change any draw events for the TListView class.

The Problem: When I open the form, the table's header get only drawn... half:
enter image description here

After clicking into the header, minimizing the window or opening a different dialog first, the header appears again:
enter image description here

Attempts: I tried calling Update(), Redraw() and Invalidate() on FormShow, but nothing seems to change. I also set DoubleBuffered=true for the ListView. I also tried setting fixed widths as well as autosize (width=-1 and -2)

Question: Is there a way to force especially the columns to get drawn? What did I do wrong so they would behave like this?

0

There are 0 best solutions below