本文整理自网络,侵删。
界面中有dbgrd和StringGrid,做“清空”操作,需求中要求清空信息包括清空所有的下拉列表、文本框以及dbgrd和StringGrid。
//文本框
edt1.Text := '';
//下拉列表
cbb1.ItemIndex:=-1;
//清空dbgrd
dbgrd1.DataSource.DataSet.Close;
dbgrd1.Refresh;
//清空StringGrid
for i:=1 to strngrd1.rowcount dobegin for j:=1 to strngrd1.colcount do strngrd1.cells[j-1,i-1]:='';
end;
――――――――――――――――原文链接:https://blog.csdn.net/camillect/article/details/81033657
相关阅读 >>
Delphi application.messagebox 详解
Delphi10.3通过json.serializers单元对大量数据序列化
更多相关阅读请进入《Delphi》频道 >>