Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2002-09

Selected Item in ListView

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mattias Gaertner
to Vincent Snijders: Attached is a patch for the ListView code. In the beginning it was a bit confusing since…
Show quoted text 6 lines
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

Reply by email

Vincent Snijders

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?

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.

Regards,
Vincent Snijders.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: zip00000.zip
Type: application/octet-stream
Size: 493 bytes
Desc: "Diff.zip"
Url : http://localhost/pipermail/lazarus/attachments/20020914/77ae0f2d/zip00000.obj

Reply by email