var PropInfo:PPropInfo;
PropInfo:=GetPropInfo(controls[i].ClassInfo,'Text');
if (PropInfo<>nil) then
SetStrProp(controls[I], PropInfo, Sstr)
else
begin
PropInfo:=GetPropInfo(controls[i].ClassInfo,'Lines'); //这里是Memo控件,就不知道怎么写
if (PropInfo<>nil) then
begin
PropInfo:=GetPropInfo(GetObjectProp(controls[i],'Lines',Tstrings).classinfo,'Text');
if (PropInfo<>nil) then
SetStrProp(controls[I], PropInfo, Sstr);
end;
end;GetPropInfo 函数判断传回值是否为 nil 来决定是否有这个属性.但是MEMO控件LINE属性下有TEXT,上面这样写有问题,应该怎么写呢?谢谢!~
PropInfo:=GetPropInfo(controls[i].ClassInfo,'Text');
if (PropInfo<>nil) then
SetStrProp(controls[I], PropInfo, Sstr)
else
begin
PropInfo:=GetPropInfo(controls[i].ClassInfo,'Lines'); //这里是Memo控件,就不知道怎么写
if (PropInfo<>nil) then
begin
PropInfo:=GetPropInfo(GetObjectProp(controls[i],'Lines',Tstrings).classinfo,'Text');
if (PropInfo<>nil) then
SetStrProp(controls[I], PropInfo, Sstr);
end;
end;GetPropInfo 函数判断传回值是否为 nil 来决定是否有这个属性.但是MEMO控件LINE属性下有TEXT,上面这样写有问题,应该怎么写呢?谢谢!~
解决方案 »
- delphi 取地址问题?????????
- Delphi 2006-03专家榜(这次估计正确了)
- 有问题绝对有问题
- delphi7编程 , 几个WAV 文件。我把把它存到资源文件里,为什么调用wav时,只是我本机能听到,放到别的机器上就听不到
- 如何读取dbf中的字段类型和字段长度?
- 请问如何为Adoquery动态创建永久字段?
- 树型结构和grid结合的控件!
- 关于delphi7访问sqlserver的菜鸟问题
- 了解C++Builder、现在用Delphi搞开发的朋友请进来座座
- 如何打开加了密码的ACCESS数据库,在线等待!100分
- 100分Webbrowser1.Navigate的问题,如何屏蔽这样的弹出提示。
- 在delphi程序里用TadoStoreproc控件调用oracle存储过程碰到的怪问题
PropInfo:=GetPropInfo(controls[i].ClassInfo,'Text');
if (PropInfo<>nil) then
SetStrProp(controls[I], PropInfo, Sstr)
else
begin
PropInfo:=GetPropInfo(controls[i].ClassInfo,'Lines'); //这里是Memo控件,就不知道怎么写
if (PropInfo<>nil) then
begin
PropInfo:=GetPropInfo(GetObjectProp(controls[i],'Lines',Tstrings).classinfo,'Text');
if (PropInfo<>nil) then
//SetStrProp(controls[I], PropInfo, Sstr);
TStrings(GetObjectProp(controls[I], 'lines')).text := Sstr; //改成这个
end;
end;