|
|
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Deactivate and Focus problem
Deactivate and Focus problem [message #4825] |
Wed, 23 August 2006 09:52 |
|
Hi!
I start with describing example:
There is droplist control which is child of arrayctrl. It is added as edit control to arrayctrl (arr.AddColumn().Edit(dl)).
After double clik on array row droplist is activated and ready to use. Now the problem. When I click drop button popup with items appears. If I select item or press ESC popup is closed and focus is restored in droplist (if DropFocus() method is used). But if I instead of selecting item or pressing ESC push the drop button again the focus is moved outside arrayctrl (or to other edit control) - not restored in droplist. This is wrong IMO.
The same situation is with my datetimectrl (and gridctrl or arrayctrl).
I tried to move focus back to edit control (parent of calendar) in Deactivate method:
void Calendar::Deactivate()
{
Close();
parent->IgnoreMouseClick();
parent->SetFocus()
}
but it didn't help. It seems that after calling Deactivate upp core engine move focus further, somewhere else.
If I call Deactivate() manually as a reaction on pressing ESC everything is ok, parent has focus.
Changing this is imprtant. If for example in array control you have edit for each column and after doubleclicking on row all controls are shown, you can move among them using tab key. But if one of that control is control with popup window and user press drop button and he press it again to close the popup he won't be able to move to the next edit with tab anymore.
Of course user can close popup with esc (if implemented) but IMO all "closing ways" should behave similar.
[Updated on: Wed, 23 August 2006 09:52] Report message to a moderator
|
|
|
|
Re: Deactivate and Focus problem [message #4839 is a reply to message #4829] |
Wed, 23 August 2006 12:46 |
|
luzr wrote on Wed, 23 August 2006 05:11 | Hopefuly fixed - the problem was that at the Deactivate, focus was already moved to DropList's PopUp. I have added GotFocus/ChildGotFocus to TopWindow to store focused Ctrl into activefocus.
I ask for patience with uvs2 sync however. I am in the middle of wince port, code base is in sad state right now
Mirek
|
Thanks Mirek!
|
|
|
Goto Forum:
Current Time: Sun May 05 02:58:20 CEST 2024
Total time taken to generate the page: 0.02902 seconds
|
|
|