[原]UNIGUI中控件类名的变化

  • 主题发起人 SUNSTONE的Delphi笔记
  • 开始时间
S

SUNSTONE的Delphi笔记

Unregistered / Unconfirmed
GUEST, unregistred user!
今天一个朋友在使用UNIGUI碰到了问题,他要遍历窗体上的控件,然后根据类名进行相应控制。



原来的程序为:

procedure TMainForm.Fj_component;
var
i: Integer;
begin
for i := 0 to MainForm.ComponentCount - 1 do
begin
UniMemo1.Lines.Add(MainForm.Components.ClassName);
if MainForm.Components is TUniBitBtn then
begin
UniLabel1.Caption := 'found';
(MainForm.Components as TUniBitBtn).Enabled := false;

end;
end;
end;





这段程序无法运行,后来经过调试才发现TUniBitBtn在web网页中的类名已经更换为TUniExtBitBtn。

这说明web是在win32程序中重新转化成新的类。

作者:sunstone 发表于 2011/01/29 22:54:00 原文链接 https://blog.csdn.net/sunstone/article/details/6169279
阅读:2132 评论:1 查看评论

查看更多...
 

Similar threads

S
回复
0
查看
766
SUNSTONE的Delphi笔记
S
S
回复
0
查看
664
SUNSTONE的Delphi笔记
S
S
回复
0
查看
688
SUNSTONE的Delphi笔记
S
顶部