I am strugling to return a row value from a simple array in xbrowse .. Just running into a roadblock converting the old listbox code .. Here is whe screen shot and code .. I need to return the value from the array element that has the xbrowse pointer.
- Code: Select all Expand view
aSOURCE := { "COMMERCIAL ", "STATE " }
ASCAN( aSOURCE, cNAME )
DEFINE DIALOG oDlg RESOURCE "SOURSLCT" ;
COLOR "W+/W" ;
TITLE "Fuel Source Select" ;
REDEFINE xBROWSE oLBX ;
ARRAY aSOURCE ;
COLSIZES 250 ;
HEADERS "Fuel Select" ;
ID 111 of oDLG ;
AUTOSORT AUTOCOLS LINES CELL
// struggling here //
REDEFINE BUTTON oBTN1 ID 113 // ;
* ACTION( XNAME := AEVAL( aSOURCE ), mSGINFO( XNAME) )
/*
ACTION ( zG_SOURCE := cNAME, ;
lOK2 := .T., ;
oOBJ:ReFresh(), ;
oDLG:END() ) ;
DEFAULT
*/
REDEFINE BUTTON oBTN2 ID 112 ;
ACTION ( lOK2 := .F., oDlg:END() )
REDEFINE BUTTON oBTN3 ID 114 ;
ACTION NIL
ACTIVATE DIALOG oDlg ;
ON INIT( oLbx:SetFocus(), .F. )
IF lOK2 = .F.
zG_SOURCE = SPACE(15)
oOBJ:ReFresh()
ENDIF
SysReFresh()
RETURN( .T.)
Thanks
Rick Lipkin