Is this the expected behavior ?
In the sample, left click in 16 and after that type 11.
Harbour 3.1.0dev (Rev. 17102)
FiveWin Harbour October 2011
- Code: Select all Expand view
- #INCLUDE "FIVEWIN.CH"
FUNCTION MAIN()
GenerateTestFile()
cCodigo := " "
DEFINE WINDOW oDlg FROM 1,1 TO 20,60
@ 1,5 GET oGetCodigo VAR cCodigo OF oDlg VALID( V_Codigo() ) SIZE 90, 22
oBrw := TWBrowse():New( 5,5,400,150,,,,oDlg,,,,,,,,,,,,, "TESTBRW" )
oBrw:SetCols( {{ || TESTBRW->CODIGO }}, {"Produto"}, {260} )
ACTIVATE DIALOG oDlg
RETURN
/************************************************/
STATIC FUNCTION V_Codigo()
/************************************************/
IF ! EMPTY(cCodigo) .AND. TESTBRW->( DBSEEK( cCodigo ) )
ALERT( Recno() )
oBrw:Refresh()
ALERT( Recno() )
ENDIF
oGetCodigo:cText( " " )
RETURN( .F. )
/************************************************/
STATIC FUNCTION GenerateTestFile()
/************************************************/
aSTRU := { { "CODIGO", "C", 2, 0 } }
DBCREATE( "TESTBRW.DBF", aSTRU )
USE TESTBRW EXCLUSIVE
INDEX ON FIELD->CODIGO TAG "COD"
FOR I := 10 TO 25
DBAPPEND()
FIELD->CODIGO := STR(I,2)
NEXT
TESTBRW->( DBGOTOP() )
RETURN( .F. )
[[]] Maurício Ventura Faria