通过类触发控件的输入字段行为 [英] Trigger Enter field behaviour through class for a control

查看:43
本文介绍了通过类触发控件的输入字段行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我提出了查询,现在可以按照David Zemens的说明和BrakNicku的指导进行操作.

I raised a query which now works as per David Zemens' instructions and BrakNicku guidance.

问题是我要使用的事件之一,输入.在课堂上,我没有获得此活动的选项.有没有一种方法可以将其添加到类中或以某种方式触发控件的 Enter 事件?

Problem is one of the events I want to use is Enter. Within the class, I don't get the option for this event. Is there is a way to add this to the class or trigger an Enter event for the control somehow?

我尝试了该类中可用的大多数事件,但没有一个行为符合我需要的方式.

I tried most of the events available within the class but none of them behave the way I need them to.

快速背景:我使用 Enter 事件为 focus 中的字段设置帮助文本.因此,每次用户输入字段时,我都会有一个帮助文本框,其中填充有帮助文本.

A quick background: I use Enter event to set help text for the field in focus. So every time a user enters a field, I have a help textbox that gets populated with help text.

我无法共享工作簿.

推荐答案

所以我采用的方法是:我已经具有捕获Change事件的类模块(

So the approach I went with was: I already had Class Module that was trapping Change event (can be seen here). As i didnt have access to Enter event in my class, I used the KeyUp and MouseDown events in this class to set help for each control. This way user can get to a field by clicking on it or tabbing to it: help is displayed for the selected control

这篇关于通过类触发控件的输入字段行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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