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.
Unfortunately, activation email could not send to your email. Please try again.

GotFocus and LostFocus on ComboBoxAdv and ComboBoxBase

Thread ID:

Created:

Updated:

Platform:

Replies:

14547 May 28,2004 09:55 AM May 31,2004 01:45 AM Windows Forms 2
loading
Tags: Tools
Pedro Miguel Rodrigues
Asked On May 28, 2004 09:55 AM

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 02:48 PM

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 01:45 AM

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

CONFIRMATION

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.

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.

;