stringGrid如何取出选中的cell的坐标,即选中的cell的rect的坐标

bw1996 2003-07-03 01:18:56
条件是使用基本控件
...全文
158 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
haoco 2003-07-03
  • 打赏
  • 举报
回复
StringGrid1.CellRect(StringGrid1.Col,StringGrid1.Row).Left
StringGrid1.CellRect(StringGrid1.Col,StringGrid1.Row).Top
haoco 2003-07-03
  • 打赏
  • 举报
回复
取得选定单元的TRect:
StringGrid1.CellRect(StringGrid1.Col,StringGrid1.Row)

这个取得后应该懂得坐标了吧?
bw1996 2003-07-03
  • 打赏
  • 举报
回复
是cell.left cell.top
bw1996 2003-07-03
  • 打赏
  • 举报
回复
我说的坐标是相对于stringgrid的坐标,不是说它是第几行第几列
fengjn 2003-07-03
  • 打赏
  • 举报
回复
还有col,row本身就是TCellRect的坐标
IwantFlay 2003-07-03
  • 打赏
  • 举报
回复
忘了说了,是在点击事件中,
col,row是你中的单元格的列号和行号
stringgrid.col,stringgrid.row
IwantFlay 2003-07-03
  • 打赏
  • 举报
回复
stringGrid.cell[col,row].rect.top;
stringGrid.cell[col,row].rect.left;

5,386

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧