问一个StringGrid的简单问题?解决马上给分

yinzhiw 2004-07-13 01:06:08
如何通过程序来选中StringGrid中的某一行呢?
如我点button按钮让stringgrid的第三行被选中
...全文
152 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
lcxhjg 2004-07-13
  • 打赏
  • 举报
回复
将stringgride的option属性的
rowselect 改为true;
然后
self.stringgride1.row=2;
self.stringgride1.focused;

课定可以
我试了
yinzhiw 2004-07-13
  • 打赏
  • 举报
回复
Selected 属性更本就是没有的?
yinzhiw 2004-07-13
  • 打赏
  • 举报
回复
我想问问楼上的StringGrid的Row[i]有Selected么?
lcxhjg 2004-07-13
  • 打赏
  • 举报
回复
选择行:
self.StringGrid1.Row:=2;
self.StringGrid1.Focused;
选择列:(同上)

选择一格:
self.StringGrid1.Row:=2;
self.StringGrid1.col:=2;
self.StringGrid1.Focused;
cduck 2004-07-13
  • 打赏
  • 举报
回复
没错 问题因该解决了吧
ExSystem 2004-07-13
  • 打赏
  • 举报
回复
StringGridTest.Rows[3].Selected;
pilicat 2004-07-13
  • 打赏
  • 举报
回复
选择行:
stringgrid1.rows[i].selected;

选择列:
stringgrid1.cols[i].selected;
zhlwyy 2004-07-13
  • 打赏
  • 举报
回复
stringgrid1.cols[i].selected;

5,392

社区成员

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

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