Is possible to browse arrays?
Best Regards.
Claudio
Browsing arrays
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Browsing arrays
Hi Claudio, I'm happy to see you here! This is a working sample:
EMG
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
- claudio.driussi
- Posts: 18
- Joined: Fri Nov 11, 2005 4:46 pm
Re: Browsing arrays
Thanks, i try immediatly.EnricoMaria wrote:Hi Claudio, I'm happy to see you here! This is a working sample:
[snip]
EMG
I'm here because our frend Andrea convinced me , i'm happy too.
Claudio.