Bug in combobox

Post Reply
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Bug in combobox

Post by Enrico Maria Giordano »

In the following sample it's impossible to move the focus from the combobox using TAB o ENTER:

Code: Select all

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg

    LOCAL cVar := SPACE( 20 )

    DEFINE DIALOG oDlg

    @ 1, 1 COMBOBOX cVar;
           ITEMS { "First", "Second", "Third" };
           STYLE CBS_DROPDOWN

    @ 3, 1 BUTTON "&Close" ACTION oDlg:End()

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL
EMG
User avatar
driessen
Posts: 1239
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Post by driessen »

Enrico,

Indeed, and it is not the only one.

In the FWH version prior to 7.09, one could choose an item in a combobox, using the first character. In your example, choosing used to be possible by typing a "F", "S" or "T".

Since FWH version 7.09, that isn't possible anymore. Therefor I still use the combobox class of FWH 7.04.

Maybe Antonio can use both our problems.

Thanks.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Enrico,

Fixed, several changes are required:

Class TGet Method KeyChar:

Code: Select all

   if ::bKeyChar != nil
      if Eval( ::bKeyChar, nKey, nFlags, Self ) == 0
         return 0
      endif   
   endif   
Class TComboBox:

Code: Select all

      ::oGet:bKeyChar = { | nKey | If( nKey == VK_TAB .or. nKey == VK_RETURN,;
      	                               ( ::oWnd:GoNextCtrl( ::hWnd ), 0 ), ) }
regards, saludos

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

Post by Antonio Linares »

Michel,

The problem is that following the advise of a FW user, incremental search was implemented on comboboxes and that browse backwards compatibility.

Should we avoid the incremental search feature and restore Windows default behavior there ? Or allow the incremental search as an optional clause ?
http://fivetechsoft.com/forums/viewtopi ... ncremental
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Post by nageswaragunupudi »

My personal opinion is that by default we should provide Windows default behavior. That is how generally users expect any windows software to behave.

Incremental search has its own benefits and can be offered as an option.

For consideration
Regards

G. N. Rao.
Hyderabad, India
StefanHaupt
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Post by StefanHaupt »

Antonio,

I agree with nageswaragunupudi, windows standard behavior should be the standard of fivewin. Enhanced incremental search should be optional, it can be a very useful feature.

In TCombobox, where must the patch be inserted ?
kind regards
Stefan
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Stefan,

Lines 247 and 320
regards, saludos

Antonio Linares
www.fivetechsoft.com
StefanHaupt
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Post by StefanHaupt »

Ok, thanks
kind regards
Stefan
Post Reply