暂定静态文本控件的name为:t_zdy
第一步:在数据窗的doubleclicked事件中添加如下代码
string ls_newlabel
if dwo.name='t_zdy' then
... //这段代码打开一个response类型窗口来让用户输入自己义的控件名称
ls_newlabel=message.stringparm
//通过数据窗语法来改变静态控件的值
this.modify('t_zdy.text="'+ls_newlabel+'"')
//保存数据窗语法,怎么写文件如果不知道自己去搜一下
f_blob_to_file(blob(this.object.syntax),this.dataobject+'.txt')
end
第二步
在数据窗的constructor(或其他事件、方法中)事件中添加如下代码
string ls_file
ls_file=this.dataobject+'.txt'
if fileexists(ls_file) then
//从读取数据窗语法
this.create(string(f_file_to_blob(ls_file)))
end