我做的一个小程序中我点一下确定 生成6个数字
分别放在 6个Label中
现在我像要吧着6个Label.caption的值存到文本文件中
但是要求他们在一行 数与数之间留 一个空格 就像这样 10 12 13 14 15 17
这样要怎么弄啊
向高手请教
分别放在 6个Label中
现在我像要吧着6个Label.caption的值存到文本文件中
但是要求他们在一行 数与数之间留 一个空格 就像这样 10 12 13 14 15 17
这样要怎么弄啊
向高手请教
解决方案 »
- 急!TBitmap的SaveToFile函数保存大图片时出问题!
- ShockwaveFlash的播放问题
- 請熟悉Delphi BPL包的朋友給我一些幫助.
- 简单问题,快来抢分,请问如果把一个16进制数转化为整型?并打印出结果。
- 急,急,急,不够再加分!我做通过mscomm与考勤机进行通讯,把一个tmp表中的数据写入考勤机中,第一次下传是成功的,第二次下传后,考勤
- flatstyle7这个第三方插件怎么安装?在Delphi 7 上。
- Delphi程序员请关注一下------在线等待
- 100分求教怎样统计英文单词数?
- 求救!谁有MSCOMM.LIB或知道怎样生成该文件
- 紧急求助!毕业设计问题哦
- DELPHI7中的WEBBROWSER的BUG?
- 高分求esc/pos打印指令的delphi列子
var
i: integer;
f: textfile;
tmp: string;
begin
tmp := '';
for i:=1 to 6 do
begin
if (FindComponent(Format('Label%d',[i]))<>nil) and (FindComponent(Format('Label%d',[i])) is TLabel) then
tmp := tmp+TLabel(FindComponent(Format('Label%d',[i]))).Caption+' ';
end;
tmp := LeftStr(tmp,Length(tmp)-1); //去掉最后一个多余空格
assignfile(f,'c:\aa.txt');
rewrite(f);
write(f,tmp);
closeFile(f);
i: integer;
f: textfile;
tmp: string;
begin
tmp := '';
for i:=1 to 6 do
begin
if (FindComponent(Format('Label%d',[i]))<>nil) and (FindComponent(Format('Label%d',[i])) is TLabel) then
tmp := tmp+TLabel(FindComponent(Format('Label%d',[i]))).Caption+' ';
end;
tmp := LeftStr(tmp,Length(tmp)-1); //去掉最后一个多余空格
assignfile(f,'c:\aa.txt');
rewrite(f);
write(f,tmp);
closeFile(f);