Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
>>>Other than explicitly setting focus elsewhere or user input, like clicking or moving off the object, what could cause an object to lose focus? Are there certain events that take the focus away? Thanks!
>>
>>Activating another form.
>>
>>Are you seeing a specific issue?
>
>Yes, but I didn't want to be in poor form by posting another message so related to other recent ones I've written regarding focus issues. They all come back to the fact that I have a combobox, with extensive code in the class, that will not keep the focus without manually clicking or tabbing into. I have event-tracked, coverage-profiled and stepped-through so much I think the code is actually beginning to deteriorate... :)
>
>The best I can tell, when the combobox gets the focus it immediately spits it out to the next object in the tab order. I guess a better question would be: What events for a combobox fire following the GotFocus method? I have looked on MSDN and Wiki, but could not find anything.
>
>My next step is to start breaking apart the combobox class, but this will be an effort as it was initially built from someone else's class and modified to work in my particular situation. I was hoping by understanding what might cause an object to lose focus I could limit the scope of my troubleshooting.
>
>Renoir
It may not be the GotFocus of the parent class, it may be the Init for example. If the offending code is on the Init, try setting a Nodefault in your subclass. At least you may be able to narrow it down to one method.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement