简体   繁体   English

如何从 swt.SelectionListener 中找到事件类型?

[英]How to find the event type from the swt.SelectionListener?

I have a scenario like in a CCombo box if we select the list option using UP and Down arrow keys then it should select the value and still in editing mode for confirmation until we click enter(This is acceptable for user).如果我们使用向上和向下箭头键 select 列表选项,那么我在 CCombo 框中有一个场景,那么它应该 select 值并且仍然处于编辑模式以进行确认,直到我们单击输入(这是用户可以接受的)。 Where if we select the list option using mouse click immediately it should confirm the vale without asking enter key.如果我们 select 立即使用鼠标单击列表选项,它应该在不询问输入键的情况下确认值。

Both the key and mouse click notifies the swt.SelectionListener.键和鼠标单击都会通知 swt.SelectionListener。 In this SelectionListener I need to find weather the selection is made from key or mouse click.在此 SelectionListener 中,我需要查找天气选择是通过键或鼠标单击进行的。 So trying to find the type from this SelectionEvent after widget selected, but unfortunately "type" is not available.因此,在选择小部件后尝试从此 SelectionEvent 中查找类型,但不幸的是“类型”不可用。

Could anyone help me out in this to find the type?任何人都可以帮助我找到类型吗? OR any other way to find the event type?或任何其他方式来查找事件类型?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM