Page 1 of 1
Bug in combobox
Posted: Sun Nov 11, 2007 6:22 pm
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
Posted: Sun Nov 11, 2007 8:14 pm
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.
Posted: Mon Nov 12, 2007 12:23 am
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 ), ) }
Posted: Mon Nov 12, 2007 12:28 am
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
Posted: Mon Nov 12, 2007 1:39 am
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
Posted: Mon Nov 12, 2007 8:48 am
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 ?
Posted: Mon Nov 12, 2007 9:09 am
by Antonio Linares
Stefan,
Lines 247 and 320
Posted: Tue Nov 13, 2007 8:23 am
by StefanHaupt
Ok, thanks