DbSelectArea( "bp" )
bp->( OrdSetFocus( "bpopen" ) ) // it's a conditional index created with FOR ...
bp->( ordScope( 0, topValue ) )
bp->( ordScope( 1, bottomValue ) )
@ 1, 1 LISTBOX oLbx FIELDS aHBitmaps[ Max( 1, Clientes->Nivel ) ],;
Clientes->Nombre, Clientes->Direccion,;
Clientes->Telefono, ;
Str( Clientes->Edad, 3 ) ;
HEADERS "Lev.", "Name", "Address", "Phone", "Age" ;
FIELDSIZES 34, 240, 310, 114, 24 ;
SELECT Nombre FOR "Laureano" TO "Paco" ;
SIZE 284, 137 OF oDlg
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg, oBrw
LOCAL aArray := { { "Test1_1", "Test1_2" },;
{ "Test2_1", "Test2_2" },;
{ "Test3_1", "Test3_2" } }
LOCAL nCur := 1
DEFINE DIALOG oDlg;
TITLE "Browsing array";
SIZE 800, 600
@ 0, 0 LISTBOX oBrw FIELDS IF( EMPTY( aArray ), "", aArray[ nCur, 1 ] ),;
IF( EMPTY( aArray ), "", aArray[ nCur, 2 ] );
SIZE 200, 200;
HEADERS "Test1", "Test2"
oBrw:bLogicLen = { || Len( aArray ) }
oBrw:bGoTop = { || nCur := 1 }
oBrw:bGoBottom = { || nCur := Len( aArray ) }
oBrw:bSkip = { | nSkip | Skipper( aArray, @nCur, nSkip ) }
oBrw:cAlias = "ARRAY"
ACTIVATE DIALOG oDlg;
ON INIT oDlg:SetControl( oBrw );
CENTER
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
Len( aArray )
Len( aArray[ 1 ] )
Return to FiveWin for Pocket PC
Users browsing this forum: No registered users and 10 guests