组合框控件 - 哪个事件 [英] combo box control - which event

查看:72
本文介绍了组合框控件 - 哪个事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想设置这样一段代码,当点击一个组合框上的下拉箭头时,会执行一段代码



control 。目前,该部分代码驻留在组合框控件的OnGetFocus

事件中,这似乎有效...我是

猜测因为无法点击在组合框的下拉箭头

框控件上没有首先让组合框控件获得焦点。

但是我注意到代码在点击任何地方时被触发了

组合框控件......不只是在向下箭头上。这不是问题,

但是我想知道代码是否可以驻留在另一个事件中

的组合框控件...这个事件一个人点击就会点火

向下箭头...不仅仅是当一个人点击控件中的某个地方时。

是否有这样的事件,如果有的话,那是什么?活动名称?


谢谢。

I want to set things up such that a section of code will have been
executed by the time one clicks on the drop down arrow on a combo box
control. Currently, that section of code resides in the OnGetFocus
event of the combo box control, and this appears to work...I''m
guessing because one cannot click on the drop down arrow of a combo
box control without first having the combo box control receive focus.
But I noticed that the code gets fired when one clicks anywhere in the
combo box control...not just on the down arrow. That''s not a problem,
but I''m wondering whether the code could reside in a different event
of the combo box control...an event that fires as one is clicking on
the down arrow...not just when one clicks somewhere in the control.
Is there such an event, and if so what is the name of the event?

Thank you.

推荐答案

mi ************ @ yahoo.com

新闻中写道: f6c16c2d-765b-41d9-a031-3b08aeab10f7

@ e23g2000prf.googlegroups.co

m:
mi************@yahoo.com wrote in
news:f6c16c2d-765b-41d9-a031-3b08aeab10f7
@e23g2000prf.googlegroups.co
m:

我想要的设置这样一段代码将在点击组合

框控件上的下拉箭头时执行

。目前,那段代码驻留在组合框控件的

OnGetFocus事件中,这看起来好像是
工作......我猜是因为一个人无法点击关于下拉

组合框控件的箭头,没有第一个组合框

控件获得焦点。但是我注意到代码在

点击组合框控件中的任何地方时被触发...而不仅仅是在

向下箭头上。这不是问题,但我想知道

代码是否可以驻留在组合框的不同事件中

控制......这是一个事件。点击向下点击向下箭头......不仅仅是当一个人点击控件中的某个地方时。

有这样的事件,如果有的话,活动的名称是什么?


谢谢。
I want to set things up such that a section of code will have been
executed by the time one clicks on the drop down arrow on a combo
box control. Currently, that section of code resides in the
OnGetFocus event of the combo box control, and this appears to
work...I''m guessing because one cannot click on the drop down
arrow of a combo box control without first having the combo box
control receive focus. But I noticed that the code gets fired when
one clicks anywhere in the combo box control...not just on the
down arrow. That''s not a problem, but I''m wondering whether the
code could reside in a different event of the combo box
control...an event that fires as one is clicking on the down
arrow...not just when one clicks somewhere in the control. Is
there such an event, and if so what is the name of the event?

Thank you.



您正在使用最好的活动。控件'的Enter事件

首先出现,然后是On Focus事件。鼠标悬停事件可以是

用于确定光标是否在向下箭头上方,而不是在文本框区域上方,但这对代码来说是痛苦的,主题

计时错误(如果用户足够快地移动光标,可能会错过

事件),即使向下箭头不是,也会触发

点击需要额外的代码..


我的好奇心对我有好处,我无法想象一个情况

当用户需要做什么的时候点击下拉

列表当用户实际输入

组合框时不需要做什么,当用户放下列表时你在做什么?



-

Bob Quintal


PA我已经改变了我的电子邮件地址。


-

通过 http://www.teranews.com

You are using the best event available. The control''s Enter event
occurs first, then the On Focus event. The mouseover event could be
used to determine if the cursor was above the down Arrow as opposed
to over the textbox area, but that''s painful to code, subject to
timing errors (if the user moves the cursor quickly enough, the
event might be missed), and fires even if the down arrow is not
clicked requiring additional code..

My Curiosity has got the better of me, I cannot imagine a situation
where something needs doing when the user clicks to dropdown the
list that doesn''t need doing when the user actually enters the
combobox, what are you doing when the user drops the list?


--
Bob Quintal

PA is y I''ve altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

12月26日上午8:29,mirandacasc ... @ yahoo.com写道:
On Dec 26, 8:29 am, mirandacasc...@yahoo.com wrote:

我想设置一个这样的东西在单击组合框上的下拉箭头

控件时,代码段将被执行


I want to set things up such that a section of code will have been
executed by the time one clicks on the drop down arrow on a combo box
control.



已经选择了CDMA的2007年最奇怪的请求

奖品的候选人。我们应该考虑2008年吗?

It''s too bad that the candidates for CDMA''s 2007 "Strangest Request"
prize have already been selected. Shall we consider this for 2008?


2007年12月26日星期三06:47:51 -0800(太平洋标准时间),lyle< ly ******* *****@gmail.com写道:
On Wed, 26 Dec 2007 06:47:51 -0800 (PST), lyle <ly************@gmail.comwrote:

> 12月26日上午8:29,mirandacasc ... @ yahoo.com写道:
>On Dec 26, 8:29 am, mirandacasc...@yahoo.com wrote:

>我想进行设置,以便在单击组合框上的下拉箭头时执行一段代码控制。
>I want to set things up such that a section of code will have been
executed by the time one clicks on the drop down arrow on a combo box
control.


已经选择了CDMA的2007年Strangest Request奖项的候选人,这太糟糕了。我们要在2008年考虑这个吗?


It''s too bad that the candidates for CDMA''s 2007 "Strangest Request"
prize have already been selected. Shall we consider this for 2008?



但是Lyle,这是最奇怪的要求,你经常提供最有价值的b $ b b。有趣的建议。 :)

Wayne Gillespie

Gosford NSW Australia

But Lyle, it is to the strangest requests that you often supply the most
intriguing suggestions. :)
Wayne Gillespie
Gosford NSW Australia


这篇关于组合框控件 - 哪个事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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