We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GotFocus and LostFocus on ComboBoxAdv and ComboBoxBase

Thread ID:





14547 May 28,2004 01:55 PM UTC May 31,2004 05:45 AM UTC WinForms 2
Tags: Tools
Pedro Miguel Rodrigues
Asked On May 28, 2004 01:55 PM UTC

Hi I''m using Syncfusion''s tool to make a project in .NET. Currently, I need to create a ComboBoxAdv (or ComboBoxBase) and listen to its GotFocus and LostFocus events. The problem is, those events are never raised, as the ComboBox itself never gets the focus. I found that the component that actually gets the focus is the internal TextBox, but that won''t work, as I need to capture the "global" component''s events. The reason for this is because I have to make a framework that''s independent of the controls that are used. What I''m asking is, is there a way to raise the ComboBox''s GetFocus and LostFocusEvent without having to derive the class and create my own component? Is this a bug? I hope someone can help me. Pedro Rodrigues

Administrator [Syncfusion]
Replied On May 28, 2004 06:48 PM UTC

Pedro, Can you instead not listen to the Enter and Leave events? This is normally the recommended method of listening to a control getting activated and deactivated. Regards, -Praveen

Pedro Miguel Rodrigues
Replied On May 31, 2004 05:45 AM UTC

Yes, thanks, that worked. I never thought of using those events :) Anyway, now I have another problem... Whe the ComboBox gets the focus, it automatically selects the text. The thing is, my application requires that the ESC and ENTER keys be used to navigate between fields, but, when I press ESC inside the ComboBox, since the text is selected, what it does is deselect it, and only when I press ESC the second time does he actually move the focus. Is there any way to prevent the text from being selected? Thanks, Pedro Rodrigues


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon