在vb中如何获取listview中某一单元格的left和top的值呢 ?求高手指教 在线等
2个回答
展开全部
如果是想获取鼠瞎厅标下某项的文本嫌腔建议你搜索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.......
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.......
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
用msflexgrid 吧,这个功能全,能实现你说的.
更多追问追答
追问
以前用过 现在要用这个 能解决不?
追答
当然能,给你点干货不废话
With flexgrid
单元格top = .Top + .CellTop + 20
For i = 0 To .Col - 1
单元格left =单元格left + .ColWidth(i)
Next i
End With
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询