How to return an array value from xbrowse

How to return an array value from xbrowse

Postby Rick Lipkin » Fri Jul 16, 2010 9:13 pm

To All

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.

Image

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
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: How to return an array value from xbrowse

Postby fraxzi » Sat Jul 17, 2010 2:50 am

Dear Mr. Rick,

Try oLbx:aRow, an array of rows

Code: Select all  Expand view

     REDEFINE BUTTON oBTN1 ID 113;
                    ACTION MsgInfo( oLbx:aRow[1] + CRLF +  oLbx:aRow[2])
 



Regards,
Frances
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: How to return an array value from xbrowse

Postby nageswaragunupudi » Sat Jul 17, 2010 4:11 am

Code: Select all  Expand view
REDEFINE BUTTON oBTN1 ID 113  ACTION( XNAME := oLbx:aRow, mSGINFO( XNAME) )
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10628
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: How to return an array value from xbrowse

Postby Rick Lipkin » Sat Jul 17, 2010 12:56 pm

Rao

Again THANKS ... right on target

Rick
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 79 guests

cron