How to increase TListView row height

This is the forum for miscellaneous technical/programming questions.

Moderator: 2ffat

Post Reply
rajesh
Top Poster
Top Poster
Posts: 47
Joined: Mon Oct 26, 2009 1:25 am

How to increase TListView row height

Post by rajesh »

Hello ,
I am using the TListView , Now I want different row uses different height due to different font size . How to do this
HsiaLin
BCBJ Master
BCBJ Master
Posts: 331
Joined: Sun Jul 08, 2007 6:29 pm

Re: How to increase TListView row height

Post by HsiaLin »

If your listview uses a TImageList, you can set the imagelist Height property to whatever
you want the row height to be. If you don't use an imagelist, you`ll probably have to use the
CustomDraw method.
rlebeau
BCBJ Author
BCBJ Author
Posts: 1708
Joined: Wed Jun 01, 2005 3:21 am
Location: California, USA
Contact:

Re: How to increase TListView row height

Post by rlebeau »

rajesh wrote:I am using the TListView , Now I want different row uses different height due to different font size . How to do this
Are you using VCL or FMX?

Not sure about FMX's TListView, but VCL's TListView does not allow you to have rows with different heights. VCL's TListBox does, though, via its lbOwnerDrawVariable style and OnMeasureItem event.
HsiaLin wrote:If your listview uses a TImageList, you can set the imagelist Height property to whatever
you want the row height to be. If you don't use an imagelist, you`ll probably have to use the
CustomDraw method.
That doesn't allow different rows to have different heights from each other. You would have to use one max height for all of the rows, and then owner-draw items with varying text heights, which will leave extra whitespace for items with smaller text heights.
Remy Lebeau (TeamB)
Lebeau Software
Post Reply