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

GotFocus and LostFocus on ComboBoxAdv and ComboBoxBase

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

2 Replies

AD Administrator Syncfusion Team 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


PM Pedro Miguel Rodrigues 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

Loader.
Live Chat Icon For mobile
Up arrow icon