在vb中如何获取listview中某一单元格的left和top的值呢 ?求高手指教 在线等

2025-02-23 11:31:23
推荐回答(2个)
回答1:

如果是想获取鼠标下某项的文本建议你搜索msdn中有关List-View Controls 控件的消息处理,而且代码量不少。
List-View Item Position

Every list-view item has a position and size, which you can retrieve and set
using messages. You can also determine which item, if any, is at a specified
position. The position of list-view items is specified in view
coordinates, which are client coordinates offset by the scroll position.

To retrieve and set an item's position, use the LVM_GETITEMPOSITION and
LVM_SETITEMPOSITION messages. LVM_GETITEMPOSITION works for all
views, but LVM_SETITEMPOSITION works only for icon and small icon
views.......

回答2:

用msflexgrid 吧,这个功能全,能实现你说的.