自定义组合框聚焦问题 [英] Custom Combobox Focussing Problem

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

问题描述

大家好,

我已经使用Datagridview创建了一个自定义组合框.现在我的控件遇到了一个问题,我覆盖了combbox的OnkeyPress 事件以从datagrid中搜索用户输入项.它正在搜索中很好,但是输入后控件失去了对datagrid的关注第一个字符,因此我应该再次单击组合框以显示光标.我想在Datagridview中甚至将鼠标悬停在组合框上显示光标和fcous,或从Datagridview中选择一个项目(与普通组合框相同).

如果有人可以指导我解决此问题.

Hi All,

i have created a Custom Combobox with Datagridview.now i am facing one problem with my control,i override the OnkeyPress event of combbox for searching the user input item from the datagrid.it is searching fine but control lost focus to datagrid after inputting the first character ,so i should click again to the combobox for show the cursor.i want to show the cursor and fcous to combobox even mouse hover in the Datagridview or select an item from the Datagridview( same like normal combobox).

if anyone can guide me to solve this problem.

推荐答案

不要将其发布在快速解答"下-如果您从文章中获得了代码,则有一个该文章底部的新消息"按钮,这将导致向作者发送电子邮件.然后会通知他们您希望与他们交谈.
将其发布到此处依赖于他们的下落"并意识到它是针对他们的.
Don''t post this under Quick Answers - if you got the code from an article, then there is a "new message" button at the bottom of that article, which causes an email to be sent to the author. They are then alerted that you wish to speak to them.
Posting this here relies on them "dropping by" and realising it is for them.


这篇关于自定义组合框聚焦问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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