TComoBox.Prg
- Code: Select all Expand view
DATA lAutoOpen AS LOGICAL INIT .F. //-- Open the combo when focused
DATA nKeyCharInterval AS NUMERIC INIT 0 //-- Clean search Buffer
METHOD GotFocus() CLASS TComboBox
::cSearchKey := ""
if ::lAutoOpen //-- Open the combo when focused
::Open()
end
return Super:GotFocus()
METHOD KeyChar( nKey, nFlags ) CLASS TComboBox
local nNewAT := 0, nOldAT := ::nAT, uItem
if Len( ::aItems ) == 0
return 0
endif
//-- Clean search buffer after 1 second
if (GetTickCount() - ::nKeyCharInterval) > 1000
::cSearchKey := ''
end
::nKeyCharInterval := GetTickCount()
...
In the next posts I'll post some changes made in Get, Xbrowse, etc...