如何检查是否存在控件标签(没有错误处理程序)? [英] How to check for existence of a control label (without error handler)?

查看:54
本文介绍了如何检查是否存在控件标签(没有错误处理程序)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


现在我在尝试检查循环中的所有控件标签时遇到了一些性能问题(表单花了大约2秒钟检查)。目前我的代码是:

Hello,

Right now I''m having some performance issues (forms taking 2 or so seconds to check) when trying to check for all control labels in a loop. Currently the code I have is this:

展开 | 选择 | Wrap | 行号

推荐答案

这适用于什么?我以为所有控件都有.Name?这告诉你关于控件的内容是什么?


Jim
This works for what? I thought all controls had a .Name? What is this telling you about a control?

Jim


是的,以前我使用的是控件的名称,但这不是与标签标题相同,所以我会得到像txtSomeControl,cboSomeControl等东西。这不是优选的,因为不知道控制箱名称的用户不会总是知道这涉及什么控制。


如果您或其他人可以告诉我如何在没有错误处理程序的情况下检查控件是否有标签,我们将不胜感激。


谢谢。
Yes, previously I was using the name of the control, but this is not the same as the label caption, so I would get stuff like txtSomeControl, cboSomeControl, and so on. This is not preferred since the user who doesn''t know control box names won''t always know what control this refers to.

If you or somebody else can tell me how to check if a control has a label or not without an error handler it would be much appreciated.

Thanks.


您是否试图询问如何确定指定的控件是否是否为标签?
Are you trying to ask how to determine if a specified control is a label?


这篇关于如何检查是否存在控件标签(没有错误处理程序)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆