Board index » delphi » TListView OwnerDraw: how to layout text that doesn't fit

TListView OwnerDraw: how to layout text that doesn't fit

Hi,

I use a TListView component and I draw some entries in my own code.

How can you layout the text correctly if it doesn't fit in the space
supplied, or if the IconOptions.WrapText property is set? Are there
any API calls or VCL functions that can do the trick for me?

Thanks,

Jean-Marc van der Kolk

 

Re:TListView OwnerDraw: how to layout text that doesn't fit


Hi,

I use a TListView component and I draw some entries in my own code.

How can you layout the text correctly if it doesn't fit in the space
supplied, or if the IconOptions.WrapText property is set? Are there
any API calls or VCL functions that can do the trick for me?

Thanks,

Jean-Marc van der Kolk

Re:TListView OwnerDraw: how to layout text that doesn't fit


Hi,

I use a TListView component and I draw some entries in my own code.

How can you layout the text correctly if it doesn't fit in the space
supplied, or if the IconOptions.WrapText property is set? Are there
any API calls or VCL functions that can do the trick for me?

Thanks,

Jean-Marc van der Kolk

Re:TListView OwnerDraw: how to layout text that doesn't fit


Hi,

I use a TListView component and I draw some entries in my own code.

How can you layout the text correctly if it doesn't fit in the space
supplied, or if the IconOptions.WrapText property is set? Are there
any API calls or VCL functions that can do the trick for me?

Thanks,
Jean-Marc van der Kolk

Re:TListView OwnerDraw: how to layout text that doesn't fit


You can use the Windows API function DrawText

if you use the following flags, DT_END_ELLIPSIS or DT_PATH_ELLIPSIS, the
text will be drawn with ellipsis in the middle or at the end of the
string which represents that there is more data than is currenlty
displayable.

DrawText will wrap if you want it to, too.      

Jean-Marc van der Kolk wrote:

Quote

> Hi,

> I use a TListView component and I draw some entries in my own code.

> How can you layout the text correctly if it doesn't fit in the space
> supplied, or if the IconOptions.WrapText property is set? Are there
> any API calls or VCL functions that can do the trick for me?

> Thanks,

> Jean-Marc van der Kolk

Re:TListView OwnerDraw: how to layout text that doesn't fit


DrawText (win32 API) with DT_END_ELLIPSIS formate.

"Jean-Marc van der Kolk" <jeanm...@vanderkolk.net> wrote in message
news:39a672d3.188503143@newsgroups.borland.com...

Quote
> Hi,

> I use a TListView component and I draw some entries in my own code.

> How can you layout the text correctly if it doesn't fit in the space
> supplied, or if the IconOptions.WrapText property is set? Are there
> any API calls or VCL functions that can do the trick for me?

> Thanks,

> Jean-Marc van der Kolk

Other Threads