在 StringGrid 中不知能不能实现的一个问题,试了多次,仍然无果,高手请看~~~~~

LngDotin 2007-01-02 09:57:45
在 StringGrid 中行数是通过
StringGrid->RowCount+=1;
动态增加的,在增加过程中,我想让焦点放在最后增加的那行中,大体像 ListView 中的:
ListView1->Items->Item[ListView1->Items->Count-1]->MakeVisible(true);
即最后一行的数据有 StringGrid 的焦点,StringGrid 的竖向滚动条在表格的最底部。

具体要求也可见附图:
http://www.100road.com/img/Image00000.gif
...全文
230 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
aidiannao 2007-06-15
  • 打赏
  • 举报
回复
同意
loujing 2007-01-02
  • 打赏
  • 举报
回复
StringGrid1.RowCount := StringGrid1.RowCount + 1;
StringGrid1.Row := StringGrid1.RowCount - 1;
StringGrid1.Col := 1;
StringGrid1.SetFocus;
samchoy 2007-01-02
  • 打赏
  • 举报
回复
void __fastcall TForm1::Button1Click(TObject *Sender)
{
StringGrid1->RowCount = StringGrid1->RowCount + 1;
StringGrid1->Row = StringGrid1->RowCount - 1;
}

13,826

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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