开发者

How to implement a ListBox that doesn't take focus away from another control, but allows manipulation?

开发者 https://www.devze.com 2023-03-16 03:06 出处:网络
I\'m trying to make something similar to the intellisense auto-complete box that\'s available in Visual Studio. The box in VS leaves focus with the text editor, but when text is entered, the box\'s it

I'm trying to make something similar to the intellisense auto-complete box that's available in Visual Studio. The box in VS leaves focus with the text editor, but when text is entered, the box's items filter down. The selected item also remains as it is, with the same sty开发者_如何学Cles, even though the control doesn't have focus.

Thanks.


While you don't give it the focus it won't get the focus. About the functionality (up & down keys) you might have to handle that directly in your "text editor": if the auto-complete box is present then call the appropriate methods in your auto-complete box to simulate the "Up & Down" selection and, at the same time, you have avoid your "text editor" to react to this keys.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号