[lazarus] Selected Item in ListView

Mattias Gaertner nc-gaertnma at netcologne.de
Sat Sep 14 06:27:11 EDT 2002


On Sat, 14 Sep 2002 11:57:32 +0200
"Vincent Snijders" <vslist at zonnet.nl> wrote:

> Attached is a patch for the ListView code.
> 
> In the beginning it was a bit confusing since the listview class reacts to
> CN_Notify message which is never send and the LM_NOTIFY message, which IS
> sent, is never reacted to. What is the difference between those messages and
> when is a CN_NOTIFY message sent by the interface object?

CN_NOTIFY and LM_NOTIFY messages are basically the same. Some Delphi components expect CN_NOTIFY. It's win32 specific, but because it can be achieved without any extra line of code, the LCL will do it the same.
I have changed the message ID in the gtk interface, instead of changing the TListView message ID.


> The Selected property can be used to get the selected listitem. After
> deletion of the selected listitem it is set to nil. I am not sure I put that
> code in the right place.

I think, it was the best place for that. :)


Mattias






More information about the Lazarus mailing list