Bug in combobox

Bug in combobox

Postby Enrico Maria Giordano » Sun Nov 11, 2007 6:22 pm

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

Code: Select all  Expand view
#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
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby driessen » Sun Nov 11, 2007 8:14 pm

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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Postby Antonio Linares » Mon Nov 12, 2007 12:23 am

Enrico,

Fixed, several changes are required:

Class TGet Method KeyChar:
Code: Select all  Expand view
   if ::bKeyChar != nil
      if Eval( ::bKeyChar, nKey, nFlags, Self ) == 0
         return 0
      endif   
   endif   

Class TComboBox:
Code: Select all  Expand view
      ::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: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Mon Nov 12, 2007 12:28 am

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
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby nageswaragunupudi » Mon Nov 12, 2007 1:39 am

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
User avatar
nageswaragunupudi
 
Posts: 10622
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby StefanHaupt » Mon Nov 12, 2007 8:48 am

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
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Postby Antonio Linares » Mon Nov 12, 2007 9:09 am

Stefan,

Lines 247 and 320
regards, saludos

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

Postby StefanHaupt » Tue Nov 13, 2007 8:23 am

Ok, thanks
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 63 guests

cron