Hello,
Is it possible to search for characrters within a ComboBox for example, if user types chacters CT it move to CTN instead of moving to TUB (first item that begins with T). I tried the following code with no luck.
REDEFINE COMBOBOX aGet[5] VAR cUnit ID 105 ITEMS aUnit OF oDlg STYLE CBS_DROPDOWN <<<-------- I JUST ADDED THIS AND HAD NO EFFECT EITHER.
aGet[5]:oGet:bKeyDown = { | nKey | ComboSearchItem( nKey, aGet[5] ) }
//----------------------------------------------------------------------------//
function ComboSearchItem( nKey, oCbx )
local nAt
if Len( AllTrim( oCbx:oGet:GetText() ) ) == 1
if ( nAt := AScan( oCbx:aItems, { | c | Left( c, 1 ) == AllTrim( oCbx:oGet:GetText() ) } ) ) != 0
oCbx:oGet:SetText( oCbx:aItems[ nAt ] )
return 0
endif
endif
return nKey