如何得知控件属性在Loading阶段的读取顺序。

fj218 2004-10-17 05:59:23
如题
...全文
104 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
fj218 2004-11-07
  • 打赏
  • 举报
回复
测试了一下,好像是楼上所说的按发布顺序
肥仔胧 2004-11-05
  • 打赏
  • 举报
回复
根据定义的从上而下
ppayun 2004-11-05
  • 打赏
  • 举报
回复
这么怪的问题,说清楚你的意图再说.
zrpzf 2004-11-05
  • 打赏
  • 举报
回复
可能是按发布顺序吧,没测过
简单的办法,将一个组件的所有属性都改一改,然后后DFM中的内容
fj218 2004-11-04
  • 打赏
  • 举报
回复
up一下
WGYKING 2004-10-20
  • 打赏
  • 举报
回复
procedure TWriter.WriteProperties(Instance: TPersistent);
var
I, Count: Integer;
PropInfo: PPropInfo;
PropList: PPropList;
begin
Count := GetTypeData(Instance.ClassInfo)^.PropCount;
if Count > 0 then
begin
GetMem(PropList, Count * SizeOf(Pointer));
try
GetPropInfos(Instance.ClassInfo, PropList);
for I := 0 to Count - 1 do
begin
PropInfo := PropList^[I];
if PropInfo = nil then
Break;
if IsStoredProp(Instance, PropInfo) then
WriteProperty(Instance, PropInfo);
end;
finally
FreeMem(PropList, Count * SizeOf(Pointer));
end;
end;
Instance.DefineProperties(Self);
end;
Rail100 2004-10-20
  • 打赏
  • 举报
回复
这个估计要追到源代码才知道了
victor_yang 2004-10-18
  • 打赏
  • 举报
回复
关注,但不知楼主想干什么呢?
fj218 2004-10-18
  • 打赏
  • 举报
回复
楼上的,我是说控件地published property属性在Loading时期的读入顺序,比如
published
property A:integer read FA write SetA;
property B:integer read FB write SetB;
我的问题是在Loading时期,也就是Loaded方法执行前,如何得知是SetA先执行,还是SetB先执行
Rail100 2004-10-18
  • 打赏
  • 举报
回复
在同一个FORM里面,Components[i]的i就应该代表先后顺序吧

5,392

社区成员

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

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