if Self.Components[i] is TcxMemo then
begin
cArrCtlName[0]:=TcxMemo(Self.Components[i]).Name;
end
else if Self.Components[i] is TcxLabel then
begin
cArrCtlName[0]:=TcxLabel(Self.Components[i]).Name;
end
else if Self.Components[i] is TMemo then
begin
cArrCtlName[0]:=TMemo(Self.Components[i]).Name;
end;
.....
这里cArrCtlName是一个数组,这里如何才能简化掉代码,否则如果我要判断几十个控件,难不成要写几十个if else?想听听高人的意见。
begin
cArrCtlName[0]:=TcxMemo(Self.Components[i]).Name;
end
else if Self.Components[i] is TcxLabel then
begin
cArrCtlName[0]:=TcxLabel(Self.Components[i]).Name;
end
else if Self.Components[i] is TMemo then
begin
cArrCtlName[0]:=TMemo(Self.Components[i]).Name;
end;
.....
这里cArrCtlName是一个数组,这里如何才能简化掉代码,否则如果我要判断几十个控件,难不成要写几十个if else?想听听高人的意见。
解决方案 »
- 已知X,y坐标和里面的圆弧曲线怎么求曲线的方程式
- 怎样使程序在系统启动时自动启动,而且最好不能被用户取消?
- 如何在父窗口嵌入编译成dll或插件的子窗口
- TImage数组如果赋值?
- 为什么我的程序在98下运行一段时间后会挂掉?????
- 新年问题:如何得到字符的ASCII码。
- delphi5+paradox7的问题
- 新手上路:三层结构中客户端根据参数从服务器端动态获得数据问题,诚心请教,可能问题很菜,见笑了!
- 帮忙啊,谁用过TChart控件。。。
- 不满意delphi自带的quickrep控件进来吧,决对让受益,再也不会对编写打钱程序为难。
- 请教个问题!
- Frm_Login 是其中一个单元名,但是我在uses中引用却是用的Login 把Frm_给去掉了,这是为什么
...对。用.tag。每个控件都有一个vcl控件都有一个.tag属性。可写可读的。