Board index » delphi » Custom-drawn TListView : how to customize subitem hints ?

Custom-drawn TListView : how to customize subitem hints ?

Hello .

I have a TListView of style vsReport.

Subitems has "Name=Value" form, and I use "OnCustomDrawSubitem" handler to
output some conditional values into it. It works fine, but when mouse cursor
is
over subitem, the hint is displayed , showing actual "Name=Value" .
I need to customize these hints.
ShowHint property for Listbox is False.
OnInfoTooltip event does not fire. Which
How to catch the hints displayed over subitems ?

TIA,
Daniel.

 

Re:Custom-drawn TListView : how to customize subitem hints ?


if you turn on the show hint property, the OnInfoTooltip events happens. In
this event you have a Tlistitem and a InfoTip. With the TListitem you can
get the proper subitem and with the infotip you can set the hint. I think
you also have to set RowSelect to true.

Guido

Quote
"Danka" <dan...@yahoo.com> wrote in message news:3d21a3f8_1@dnews...
> Hello .

> I have a TListView of style vsReport.

> Subitems has "Name=Value" form, and I use "OnCustomDrawSubitem" handler to
> output some conditional values into it. It works fine, but when mouse
cursor
> is
> over subitem, the hint is displayed , showing actual "Name=Value" .
> I need to customize these hints.
> ShowHint property for Listbox is False.
> OnInfoTooltip event does not fire. Which
> How to catch the hints displayed over subitems ?

> TIA,
> Daniel.

Re:Custom-drawn TListView : how to customize subitem hints ?


Quote
"Sonic" <guidorob...@hotmail.com> wrote:
>if you turn on the show hint property, the OnInfoTooltip events happens. In
>this event you have a Tlistitem and a InfoTip. With the TListitem you can
>get the proper subitem and with the infotip you can set the hint. I think
>you also have to set RowSelect to true.

  Thank You for idea.

  OnInfoTooltip does not happen for each subitem.
InfoTip parameter in this event always contains hint
for ListItem itself, but not for subitems. After turning
ShowHint to True, I  see two (!) hints when mouse is
over any subitem. First , right over subitem (as before),
displaying subitem's "Name=Value" . Second, below mouse
cusror, always displaying Item's main hint. The
ShowHint property and OnInfoTooltip handler are definitely applicable to this second hint. And how to catch first one -
it seems to be independent from ShowHint and hints at all..

Re:Custom-drawn TListView : how to customize subitem hints ?


:(

Other Threads