拉下combobpx [英] pull down combobpx

查看:71
本文介绍了拉下combobpx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好:


如何激活空格键以拉下组合框?


例如,一旦标签停在组合框,假设我可以使用dnarrow

或F4下拉组合框来进行选择,但是我想用空格键代替这些2 / b
键,我可以吗那样做吗?


最好的rgds,

Ivan Vong

-

留言通过< a rel =nofollowhref =http://www.dotnetmonster.comtarget =_ blank> http://www.dotnetmonster.com

Hi All:

How can I activate the spacebar to pull down the combobox?

For instance, once the tab stopped at the combobox, suppose i can use dnarrow
or F4 to pull down the combobox to make selection, but instead of these 2
keys, I want to use spacebar, can I do that?

Best rgds,
Ivan Vong
--
Message posted via http://www.dotnetmonster.com

推荐答案

" Ivan V via DotNetMonster.com" < FO *** @ DotNetMonster.com> schrieb:
"Ivan V via DotNetMonster.com" <fo***@DotNetMonster.com> schrieb:
如何激活空格键以下拉组合框?
How can I activate the spacebar to pull down the combobox?




设置控件''''DroppedDown''属性到''真''。


-

MS Herfried K. Wagner

MVP< URL:http:/ /dotnet.mvps.org/>

VB< URL:http://classicvb.org/petition/>



Set the control''s ''DroppedDown'' property to ''True''.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


In文章< 52 *********** @ DotNetMonster.com>, fo***@DotNetMonster.com

说...
In article <52***********@DotNetMonster.com>, fo***@DotNetMonster.com
says...
大家好:

如何激活空格键以拉下组合框?
例如,一旦标签停在组合框上,假设我可以使用dnarrow
或F4下拉组合框进行选择,但是我想使用空格键而不是这些2键,可以我这样做?
Hi All:

How can I activate the spacebar to pull down the combobox?

For instance, once the tab stopped at the combobox, suppose i can use dnarrow
or F4 to pull down the combobox to make selection, but instead of these 2
keys, I want to use spacebar, can I do that?




我将继承常规组合框并处理OnKeyDown方法:


公共类MyComboBox

继承组合框


''抽象方法。只需调用基类方法

受保护覆盖​​Sub RefreshItem(ByVal索引为整数)

MyBase.RefreshItem(index)

End Sub


''抽象方法。只需调用基类方法

Protected Overrides Sub SetItemsCore(ByVal items As

System.Collections.IList)

MyBase.SetItemsCore(items)

结束子


受保护的覆盖Sub OnKeyDown(ByVal e As KeyEventArgs)

如果e.KeyCode = Keys.Space那么

Me.DroppedDown = Not Me.DroppedDown

e.Handled = True

结束如果

End Sub

结束班级


所有这一切都是当按下空格键时,它会将

下拉菜单切换为开启或关闭。


-

Patrick Steele

Microsoft .NET MVP
http://weblogs.asp.net/psteele


我做过尝试,但它不起作用!!!

-

消息通过 http://www.dotnetmonster.com
i did try, but it''s not working!!!
--
Message posted via http://www.dotnetmonster.com

这篇关于拉下combobpx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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