delphic++builderdelphi-2009c++builder-2010

Increase space / height between TListView items (and TTreeView items) on Windows larger items selection


I use Borland C++ Builder 2009 (yet I assume the issue and solution is the same for Delphi) and right now I assume the answer I'm looking for is the same for both TListView items and TTreeView items. I may be wrong !?

I have noticed, on a smaller Win 8.1 laptop with Display setting 'Change the size of all items' set to 125% . That the items in both TreeView and ListView get closer to each other.

I haven't tested 150% yet, I assume it will be worse.

I would like to adjust for that if possible. I assume the same logic goes for when a larger sized font is chosen to display these items ?

  1. How would you test if the height of the items is 'too' big and the items need a bit more space between them ?

  2. And how would you increase the spacing between them ? Taking in account that my ListView implementation is virtual (ListView->OwnerData = true ;) !


Solution

  • TForm has Scaled property. If it is true, all components on a form should be resized automatically accordingly to font size. I cannot check right now if this works for TListView and TTreeView, but you should check this property anyway.