It's the Folder time today ;- )
Well, another problem - simple, I hope.
When I have the focus on a combobox in a dialog
and I press the Enter key then the focus go to the next control (a get for example)
The problem is that it doesn't runs on a folder.
If I have the focus on a combobox in a folder
and I press the Enter key then the focus REMAINS ON THE COMBOBOX instead to go to the next control.
The self-contained at www.softwarexp.co.uk/beta/test.zip
show this problem.
I checked the folder,tcontrol and combobox class looking for a solution but unsuccesfully.
Any solution availables ?
Thanks in advance
Best Regards,
Marco
Combobox in Folder
- Marco Turco
- Posts: 858
- Joined: Fri Oct 07, 2005 12:00 pm
- Location: London
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Marco,
Just add this method to Class TComboBox:
Just add this method to Class TComboBox:
Code: Select all
METHOD KeyChar( nKey, nFlags ) CLASS TComboBox
if nKey == VK_RETURN
::oWnd:GoNextCtrl( ::hWnd )
endif
return nil
- Marco Turco
- Posts: 858
- Joined: Fri Oct 07, 2005 12:00 pm
- Location: London
- Contact:
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Marco,
Keep in mind that using the Enter key to move from field to field is DOS program behavior NOT Windows program behavior. Users expect the Enter key to trigger the default pushbutton (ususally OK). They will surprised and disappointed when it doesn't.
There is good reason to have it trigger the default pushbutton. This makes it easy to edit and save without having to use the mouse. If Enter moves to the next control then they have to go through all the controls to get to the button or use the mouse.
James
Keep in mind that using the Enter key to move from field to field is DOS program behavior NOT Windows program behavior. Users expect the Enter key to trigger the default pushbutton (ususally OK). They will surprised and disappointed when it doesn't.
There is good reason to have it trigger the default pushbutton. This makes it easy to edit and save without having to use the mouse. If Enter moves to the next control then they have to go through all the controls to get to the button or use the mouse.
James
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
- Marco Turco
- Posts: 858
- Joined: Fri Oct 07, 2005 12:00 pm
- Location: London
- Contact:
James,
you are right.
However about my specific situation my target was a quick migration to my customers from my old Clipper app to the new FWH app to avoid the costs of two platforms updates and I could make it immediatly leaving the same input process in the new Windows app.
Furthermore there still are a lot of customers coming from DOS , Windows "hibrid" and terminal mode apps so provide this input process still have a commercial advantages.
In a data insert dialog like:
>combobox
>combobox
>get
>get
>button (to write data)
the end user only need to press the same Enter key to complete the input sequence and write data on disk - like a DOS app - but can also work with mouse if it prefer.
Best Regards,
Marco
you are right.
However about my specific situation my target was a quick migration to my customers from my old Clipper app to the new FWH app to avoid the costs of two platforms updates and I could make it immediatly leaving the same input process in the new Windows app.
Furthermore there still are a lot of customers coming from DOS , Windows "hibrid" and terminal mode apps so provide this input process still have a commercial advantages.
In a data insert dialog like:
>combobox
>combobox
>get
>get
>button (to write data)
the end user only need to press the same Enter key to complete the input sequence and write data on disk - like a DOS app - but can also work with mouse if it prefer.
Best Regards,
Marco
- RAMESHBABU
- Posts: 591
- Joined: Fri Oct 21, 2005 5:54 am
- Location: Secunderabad (T.S), India