Combobox in Folder

Combobox in Folder

Postby Marco Turco » Thu Dec 15, 2005 8:41 pm

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
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Postby Antonio Linares » Fri Dec 16, 2005 12:25 am

Marco,

Just add this method to Class TComboBox:

Code: Select all  Expand view
METHOD KeyChar( nKey, nFlags ) CLASS TComboBox

   if nKey == VK_RETURN
      ::oWnd:GoNextCtrl( ::hWnd )
   endif
   
return nil     
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Marco Turco » Fri Dec 16, 2005 8:24 am

Yes, runs fine.
Thanks for your quick reply.

Best Regards,

Marco
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London


Postby James Bott » Fri Dec 16, 2005 11:59 pm

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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Enrico Maria Giordano » Sat Dec 17, 2005 9:03 am

I already tried to convice him but there is no hope. :-)

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Marco Turco » Sat Dec 17, 2005 9:05 am

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
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Postby RAMESHBABU » Sun Dec 18, 2005 8:45 am

If the application is a orginally developed for the 1st time in Windows
( not migrated from any DOS based application ), Mr.James statement is
correct. But in other case I agree with Mr.Marco.

- Ramesh Babu
User avatar
RAMESHBABU
 
Posts: 624
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 80 guests

cron