Browsing arrays
Posted: Fri Nov 11, 2005 5:07 pm
Is possible to browse arrays?
Best Regards.
Claudio
Best Regards.
Claudio
www.FiveTechSoft.com
http://forums.fivetechsoft.com/
Code: Select all
#include "Fwce.ch"
FUNCTION MAIN()
LOCAL oWnd, oBrw
LOCAL aArray := { "Test1", "Test2", "Test3" }
LOCAL nCur := 1
DEFINE WINDOW oWnd;
TITLE "Browsing array"
@ 0, 0 LISTBOX oBrw FIELDS aArray[ nCur ];
HEADERS "Test data"
oBrw:bLogicLen = { || Len( aArray ) }
oBrw:bGoTop = { || nCur := 1 }
oBrw:bGoBottom = { || nCur := Len( aArray ) }
oBrw:bSkip = { | nSkip | Skipper( aArray, @nCur, nSkip ) }
oBrw:cAlias = "ARRAY"
oBrw:SetFocus()
ACTIVATE WINDOW oWnd
RETURN NIL
STATIC FUNCTION SKIPPER( aArray, nCur, nSkip )
LOCAL nOld := nCur
nCur += nSkip
IF nCur > LEN( aArray ); nCur = LEN( aArray ); ENDIF
IF nCur < 1; nCur = 1; ENDIF
RETURN nCur - nOld
Thanks, i try immediatly.EnricoMaria wrote:Hi Claudio, I'm happy to see you here! This is a working sample:
[snip]
EMG