对面的大虾看过来!!GoGoGo!

xyxx 2002-03-28 10:14:32
怎么一次实现把窗体中的可填写的控件的内容全部清空,有memo,edit,combobox……!谢了!
...全文
26 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
Larky 2002-03-28
  • 打赏
  • 举报
回复
吧他们的默认值设为空,然后free掉form 在重建form就可以了:)
为什么非要一次!
LXJ2001 2002-03-28
  • 打赏
  • 举报
回复

for i:=0 to componentcout-1 do
begin
if (components[i] is Tmemo)
then (components[i] as TMemo).text = ''
...
end;
xyxx 2002-03-28
  • 打赏
  • 举报
回复
这个我知道,有选定全部的吗,一次性的!谢了
Liujc 2002-03-28
  • 打赏
  • 举报
回复
for i:= 0 to componentcount-1 do
begin
if components[i] is Tedit then
TEdit(components[i]).text := ''
else if components[i] is TMemo then
TMemo(Components[i]).text := ''
else ...
end ;

5,386

社区成员

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

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