Delphi's TListView control displays a list of items in columns with column headers and sub-items, or vertically or horizontally, with small or large icons.
Delphi的 TListView控件在具有列标题和子项目的列中显示项目列表,或者在垂直或水平方向上显示带有小图标或大图标的项目列表。
As do most Delphi controls, the TListView exposes the OnClick and OnDblClick (OnDoubleClick) events.
与大多数Delphi控件一样,TListView公开OnClick和OnDblClick (OnDoubleClick)事件。
Unfortunately, if you need to know what item was clicked or double clicked you cannot simply handle the OnClick / OnDblClick events to get the clicked item.
不幸的是,如果您需要知道单击或双击了哪个项目,则不能简单地处理OnClick / OnDblClick事件来获取被单击的项目。
The OnClick (OnDblClick) event for the TListView is fired whenever the user clicks the control - that is whenever the "click" occurs somewhere inside the client area of the control.
每当用户单击控件时,即在控件的客户区域内某处发生“单击”时,都会触发TListView的OnClick(OnDblClick)事件。
The user can click inside the list view, BUT "miss" any of the items. What's more, since list view can change its display depending on the ViewStyle property, the user might have clicked on an item,