FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xbrowse and detached variables Mr Rao please Help
Posts: 670
Joined: Wed Oct 19, 2005 06:41 PM
xbrowse and detached variables Mr Rao please Help
Posted: Fri Aug 19, 2022 05:13 PM

good afternoon to all
the code don't work as expected for EDIT_LISTBOX
What are bad on the code ?
please help me

#include 'fivewin.ch'
#include 'xbrowse.ch'

function main()

    local aKeys   := {'pichincha','internacio'}
    local hBancos := { => }
    local hRow
    local aCols   := {}
    local oWnd
    local oBrw
    local i
    local oCol1
    local cDbf := '.\test1.dbf'
    local aDbf := { { 'codigo'     , 'C', 10, 0 } ,;
                    { 'pichincha'  , 'C', 15, 0 } ,;
                    { 'internacio' , 'C', 15, 0 } }

    hBancos ['pichincha']  = {}
    hRow = { 'numcuenta' => '1234567' }
    aadd( hBancos ['pichincha'], hRow )

    hBancos ['internacio']  = {}
    hRow = { 'numcuenta' => '890123' }
    aadd( hBancos ['internacio'], hRow )

    dbcreate( cDbf, aDbf )

    use ( cDbf ) new alias camello exclusive
    camello->( dbappend() )
    camello->codigo = '1'
    camello->( dbappend() )
    camello->codigo = '2'
    camello->( dbgotop() )


    DEFINE WINDOW oWnd

    @ 0,0 XBROWSE oBrw OF oWnd alias 'camello' fastedit

    oCol1             := oBrw:AddCol()
    oCol1:bEditValue  := { || ( oBrw:cAlias )->codigo }
    oCol1:cHeader     := "codigo"
    oCol1:cEditPicture:= "@!"
    oCol1:nEditType   := 0
    oCol1:nWidth      := 90
    aCols = {}
    for i = 1 to len( aKeys )
        aadd( aCols, oBrw:AddCol() )
        campotexto( oBrw, i+1, @aCols, i, hBancos, aKeys )
    next

    oBrw:CreateFromCode()


    ACTIVATE WINDOW oWnd





return nil


function campotexto( oBrw, i, aCols, n, hBancos, aKeys )

    local xValue
    local uRet
    local c
    local aRow
    local aEditListTxt
    local aEditListBound
    local j
    local hRow


    aRow                = hBancos[ aKeys[n] ]
    aEditListTxt        = {}
    aEditListBound      = {}
    for j = 1 to len( aRow )
        hRow = aRow[j]
        aadd( aEditListTxt  , hRow['numcuenta'] )
        aadd( aEditListBound, hRow['numcuenta'] )
    next

    c    = alltrim( lower( ( oBrw:cAlias )->( fieldname( i ) ) ) )

    aCols[ n ]:bEditValue       := { || ( oBrw:cAlias )->&( c ) }

    aCols[ n ]:cHeader          := c
    aCols[ n ]:cEditPicture     := "@!"
    aCols[ n ]:nEditType        := EDIT_LISTBOX
    aCols[ n ]:nWidth           := 120
    aCols[ n ]:aEditListTxt     := aEditListTxt   
    aCols[ n ]:aEditListBound   := aEditListBound 

    aCols[ n ]:bOnPostEdit      := { |o,v| ( oBrw:cAlias )->&( c )  := v }

 

return uRet

best regards
Wilson

Wilson 'W' Gamboa A
Wilson.josenet@gmail.com
Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM
Re: xbrowse and detached variables Mr Rao please Help
Posted: Sun Aug 21, 2022 07:50 AM

Wilson,

I'm not shure what your code is all doing, but it seems to be that you do things that Xbrowse can do automaticaly.

This sample uses the edit listbox and is easy, but different from your setup. Maybe It can help you.

function xbtest()

   local aStates
   local oDlg, oBrw, oFont

   RDDSETDEFAULT( "DBFCDX" )

   //aDbf := DIRECTORY( "c:\fwpic\*.jpg" )

   USE STATES SHARED
   aStates  := FW_DbfToArray()
   CLOSE STATES

/*
    Now aStates is 2-dimentional array.
    1st column is State Code
    2nd column is State name

    Customer.dbf has a field "STATE". This is State Code
    We want to display State Name in the browse listbox
    When user selects a State Name, we want to store State Code in the DBF
    XBrowse does this automatically
    PLEASE NEVER NEVER USE BONPOSTEDIT(). This is depricated many years back.

*/

   USE CUSTOMER SHARED
   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
   DEFINE DIALOG oDlg SIZE 700,400 PIXEL TRUEPIXEL FONT oFont

   @ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
      DATASOURCE "CUSTOMER" ;
      COLUMNS "First", "City", "State" ;
      CELL LINES NOBORDER FASTEDIT

   WITH OBJECT oBrw
      :nEditTypes    := EDIT_GET
      WITH OBJECT :State
         :nEditType     := EDIT_LISTBOX
         :aEditListTxt  := aStates
      END
      //
      :CreateFromCode()
   END

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return nil

and here some code that I use as a kind off standard setup :

Code (fw): Select all Collapse
   local aGroepen:={ "BEDRIJVEN","ZELFSTANDI","VERENIGING","SCHOOLTURN","SCHOOLTECH","SCHOOLZORG","SCHOLEN","HORECA","GEMEENTEN","INSTELLING"}

   aVelden :=  { ;
   { "email"      , "Email"         ,nil, 150 }, ; // 7
   { "klantcode"  , "Klant"         ,nil,  45 }, ; // 1
   { "naam"       , "Naam"          ,nil, 100 }, ; // 1
   { "Groep"      , "Groep"         ,nil,  95 }, ; // 4
   //  here was more ....
   { "optout"     , "Optout"        ,nil,  50 }, ; // 1
   { "mail005"    , "M5"            ,nil,  30 }, ; // 6
   { "mail006"    , "M6"            ,nil,  30 }, ; // 6
   { "mail007"    , "M7"            ,nil,  30 }}   // 19

   @ 70,10 XBROWSE oBrw size 1400,500 PIXEL OF oDlg font oFont ;
      DATASOURCE "mailbulk";
      COLUMNS aVelden;
      AUTOSORT CELL LINES NOBORDER FOOTERS
      //FASTEDIT

     oBrw:nEditTypes = EDIT_GET
     oBrw:lF2KeyToEdit := .t.  // Edit when F2 is pressed
     oBrw:bRClickHeaders := { || XbrColSelector( oBrw ) }

     oBrw:SetChecks()
     oBrw:bKeyDown := {|nkey| iif(nkey=VK_ADD,  iif(oBrw:sel:VALUE=.t.,oBrw:sel:VarPut( .F. ),oBrw:sel:VarPut( .t. ))  ,)}

     oBrw:bron:bClrStd := { || showcolors(oBrw:bron:Value)  }

     for n := 1 to Len( oBrw:aCols )
       WITH OBJECT oBrw:aCols[ n ]
          if :cDataType != 'L'
            :uBarGetVal    := uValBlank( :Value )
            :cBarGetPic    := :cEditPicture
          endif
       END
     next

     WITH OBJECT oBrw


      WITH OBJECT:Groep
       :nEditType     := EDIT_LISTBOX
       :aEditListTxt  := aGroepen
      END


      :SetGroupHeader( "Mailings", oBrw:oCol("M1"):nCreationOrder, oBrw:oCol("M7"):nCreationOrder )
      :bRClicked        := {|nRow, nCol| MenuPop( nRow,nCol, oBrw ),oBrw:refresh() }

      :nFreeze:=4
      :lSeekbar   := .T.

      :lFooter          := .t.
      :email:bFooter    := { | oCol | Len( oBrw:aSelected ) }

      :bRecSelHeader    := { || "RowNo" }
      :bRecSelData      := { |o| o:KeyNo }
      :bRecSelFooter    := { |o| o:nLen }
      :oRecSelFont      := oFont  // optional
      :nRecSelWidth     := "999999" // required size

      //:SetGroupHeader( 'Omzet', 5, 6, oBold )
      //:SetGroupHeader( 'Aanmaningen', 9, 11, oBold )

      //:nStretchCol   := 10

      //:lDisplayZeros    := .f.
      //:nStretchCol      := 4

      :bClrEdits        := { || { CLR_BLACK, CLR_YELLOW }}
      :bClrRowFocus     := { || { CLR_BLACK, RGB(185,220,255) } }


      :nColDividerStyle := LINESTYLE_LIGHTGRAY
      :nRowDividerStyle := LINESTYLE_LIGHTGRAY
      :bClrRowFocus     := { || { CLR_BLACK, RGB(185,220,255) } }
      :nMarqueeStyle    := MARQSTYLE_HIGHLROWMS


      //:lIncrFilter   := .t.
      //:lSeekWild     := ( nWild == 2 )
      //:cFilterFld    := "naam"
      //:bFooters         := { |oCol| If( Empty( oCol:cOrder ), "", oBrw:cSeek("") ) }
      //:oSeek            := TSeek():New( oBrw )

   END

   BrwBarBtns( oBar, oBrw )
   oBrw:CreateFromCode()
Marc Venken

Using: FWH 23.08 with Harbour
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: xbrowse and detached variables Mr Rao please Help
Posted: Sun Aug 21, 2022 09:11 AM

Dear Marc,

Thank you so much for your help

I have added your example to FWH provided examples as marc.prg

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 670
Joined: Wed Oct 19, 2005 06:41 PM
Re: xbrowse and detached variables Mr Rao please Help
Posted: Sun Aug 21, 2022 07:02 PM

Dear Marc many thanks for your help
but unfortunately does;n solve my problem
I prepare better example if I don't use detached locals work Well like the column tipo_docu1
In real life we need fields like pichincha an internatio as a result of data driven code because may have 2 columns or 3 or more columns and need an listbox asociatted to every column but xbrowse don't work this kind of column but work well in ocol4 column as your example

#include 'fivewin.ch'
#include 'xbrowse.ch'

function main()

    local aKeys   := {'pichincha','internacio'}
    local hBancos := { => }
    local hRow
    local aCols   := {}
    local oWnd
    local oBrw
    local i
    local oCol1
    local oCol4
    local cDbf := '.\test1.dbf'
    local aDbf := { { 'codigo'     , 'C', 10, 0 } ,;
                    { 'pichincha'  , 'C', 15, 0 } ,;
                    { 'internacio' , 'C', 15, 0 } ,;
                    { 'tipo_docu1' , 'C', 02, 0 } }

    hBancos ['pichincha']  = {}
    hRow = { 'numcuenta' => '1234567' }
    aadd( hBancos ['pichincha'], hRow )

    hBancos ['internacio']  = {}
    hRow = { 'numcuenta' => '890123' }
    aadd( hBancos ['internacio'], hRow )

    dbcreate( cDbf, aDbf )

    use ( cDbf ) new alias camello exclusive
    camello->( dbappend() )
    camello->codigo = '1'
    camello->( dbappend() )
    camello->codigo = '2'
    camello->( dbgotop() )


    DEFINE WINDOW oWnd

    @ 0,0 XBROWSE oBrw OF oWnd alias 'camello' fastedit



    oCol1             := oBrw:AddCol()
    oCol1:bEditValue  := { || ( oBrw:cAlias )->codigo }
    oCol1:cHeader     := "codigo"
    oCol1:cEditPicture:= "@!"
    oCol1:nEditType   := 0
    oCol1:nWidth      := 90
    aCols = {}
    for i = 1 to len( aKeys )
        aadd( aCols, oBrw:AddCol() )
        campotexto( oBrw, i+1, @aCols, i, hBancos, aKeys )
    next

    oCol4                   := oBrw:AddCol()
    oCol4:bEditValue        := { || ( oBrw:cAlias )->tipo_docu1 }
    oCol4:cHeader           := "Tipo1"
    oCol4:cEditPicture      := "@!"
    oCol4:nEditType         := EDIT_LISTBOX
    oCol4:nWidth            := 80
    oCol4:aEditListTxt      := {'deposito','anticipo'}
    oCol4:aEditListBound    := {'DP','AN'}
    oCol4:bOnPostEdit       := { |o,v| ( oBrw:cAlias )->tipo_docu1 := v }

    //oBrw:nEditTypes    := EDIT_GET

    oBrw:CreateFromCode()

    ACTIVATE WINDOW oWnd

return nil

function campotexto( oBrw, i, aCols, n, hBancos, aKeys )

    local xValue
    local uRet
    local c
    local aRow
    local aEditListTxt
    local aEditListBound
    local j
    local hRow

    aRow                = hBancos[ aKeys[n] ]
    aEditListTxt        = {}
    aEditListBound      = {}
    for j = 1 to len( aRow )
        hRow = aRow[j]
        aadd( aEditListTxt  , { hRow['numcuenta'], hRow['numcuenta'] } )
        aadd( aEditListBound, { hRow['numcuenta'], hRow['numcuenta'] } )
    next

    c    = alltrim( lower( ( oBrw:cAlias )->( fieldname( i ) ) ) )

    aCols[ n ]:bEditValue       := { || ( oBrw:cAlias )->&( c ) }

    aCols[ n ]:cHeader          := c
    aCols[ n ]:cEditPicture     := "@!"
    aCols[ n ]:nEditType        := EDIT_LISTBOX
    aCols[ n ]:nWidth           := 120
    aCols[ n ]:aEditListTxt     := aEditListTxt

    //aCols[ n ]:bOnPostEdit      := { |o,v| ( oBrw:cAlias )->&( c )  := v }

return uRet

Many Thanks for your time and help

Wilson 'W' Gamboa A
Wilson.josenet@gmail.com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xbrowse and detached variables Mr Rao please Help
Posted: Mon Aug 22, 2022 05:32 PM

Mr. Wilson
I see your point.
Please let me know the FWH version you are using.

Regards



G. N. Rao.

Hyderabad, India
Posts: 514
Joined: Sun Oct 16, 2005 03:32 AM
Re: xbrowse and detached variables Mr Rao please Help
Posted: Mon Aug 22, 2022 09:15 PM

Hi Mr. Rao

I have version FWH 20.07 with the same and other problems in xBrowse. Is there a corrected version of xBrowse for FWH 20.07 ?

Thanks for your help,

Regards,

Saludos,



Carlos Gallego



*** FWH-25.12, xHarbour 1.3.1 Build 20241008, Borland C++7.70, PellesC, ADS 11.1***

Posts: 670
Joined: Wed Oct 19, 2005 06:41 PM
Re: xbrowse and detached variables Mr Rao please Help
Posted: Mon Aug 22, 2022 10:06 PM

dear master

┌────────────────────────────────────────────────────────────────────────────┐
│ FiveWin for Harbour 19.09 - Sep. 2019           Harbour development power  │▄
│ (c) FiveTech 1993-2019 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8/10 │█
└────────────────────────────────────────────────────────────────────────────┘█
  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Compiling...
Harbour 3.2.0dev (r1909261630)
Copyright (c) 1999-2019, https://harbour.github.io/
Compiling 'xbrowse.prg' and generating preprocessed output to 'xbrowse.ppo'...
Lines 5333, Functions/Procedures 2
Generating C source output to 'xbrowse.c'... Done.
Embarcadero C++ 7.00 for Win32 Copyright (c) 1993-2015 Embarcadero Technologies,
 Inc.
xbrowse.c:
Turbo Incremental Link 6.70 Copyright (c) 1997-2014 Embarcadero Technologies, In
c.
Fatal: Could not open xbrowse.exe (program still running?)

many thanks for your time
regards
Wilson

Wilson 'W' Gamboa A
Wilson.josenet@gmail.com
Posts: 670
Joined: Wed Oct 19, 2005 06:41 PM
Re: xbrowse and detached variables Mr Rao please Help
Posted: Thu Aug 25, 2022 04:50 PM

Dear Master Rao, any News ?
best regards
Wilson

Wilson 'W' Gamboa A
Wilson.josenet@gmail.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: xbrowse and detached variables Mr Rao please Help
Posted: Thu Aug 25, 2022 06:35 PM

Estimado Wilson,

Le acabo de escribir al Sr. Rao para que lo revise cuanto antes.

Te pedimos disculpas por el retraso

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 670
Joined: Wed Oct 19, 2005 06:41 PM
Re: xbrowse and detached variables Mr Rao please Help
Posted: Thu Aug 25, 2022 07:37 PM

Gracias Antonio en verdad estoy necesitando ese tema para terminar un proyecto
saludos

Wilson 'W' Gamboa A
Wilson.josenet@gmail.com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xbrowse and detached variables Mr Rao please Help
Posted: Fri Aug 26, 2022 12:18 PM

Mr. Wilson

Please try this sample and let me know if it serves your purpose.

#include 'fivewin.ch'

function main()

   local aKeys   := {'pichincha','internacio'}
   local hBancos := { => }
   local hRow
   local aCols   := {}
   local oWnd
   local oBrw
   local i
   local oCol1
   local cDbf := '.\test1.dbf'
   local aDbf := { { 'codigo'     , 'C', 10, 0 } ,;
                   { 'pichincha'  , 'C', 15, 0 } ,;
                   { 'internacio' , 'C', 15, 0 } }

   hBancos ['pichincha']  = {}
   hRow = { 'numcuenta' => '1234567' }
   aadd( hBancos ['pichincha'], hRow )

   hBancos ['internacio']  = {}
   hRow = { 'numcuenta' => '890123' }
   aadd( hBancos ['internacio'], hRow )

   dbcreate( cDbf, aDbf )

   use ( cDbf ) new alias camello exclusive
   camello->( dbappend() )
   camello->codigo = '1'
   camello->( dbappend() )
   camello->codigo = '2'
   camello->( dbgotop() )

   // REVISED CODE BEGIN
   //-------------------

   aCols := { "codigo" }
   AEval( aKeys, { |c| AAdd( aCols, c ) } )

   DEFINE WINDOW oWnd

   @ 0,0 XBROWSE oBrw OF oWnd DATASOURCE "CAMELLO" ;
      COLUMNS aCols FASTEDIT

   WITH OBJECT oBrw
      for i := 1 to 2
         WITH OBJECT oBrw:aCols[ i + 1 ]
            :nWidth        := 120
            :nEditType     := EDIT_LISTBOX
            :aEditListTxt  := {}
            AEval( hBancos[ :cExpr ], { |hRow| AAdd( :aEditListTxt, hRow['numcuenta'] ) } )
         END
      next
      :CreateFromCode()
   END

   ACTIVATE WINDOW oWnd CENTERED

return nil
Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xbrowse and detached variables Mr Rao please Help
Posted: Fri Aug 26, 2022 12:19 PM
Cgallegoa wrote:Hi Mr. Rao

I have version FWH 20.07 with the same and other problems in xBrowse. Is there a corrected version of xBrowse for FWH 20.07 ?

Thanks for your help,

Regards,


Can you please let me know your other problems?
Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xbrowse and detached variables Mr Rao please Help
Posted: Fri Aug 26, 2022 02:16 PM

Mr. Wilson

Your way of creating columns using oBrw:AddCol()

#include 'fivewin.ch'

function main()

    local aKeys   := {'pichincha','internacio'}
    local hBancos := { => }
    local hRow
    local aCols   := {}
    local oWnd
    local oBrw
    local i
    local oCol1
    local cDbf := '.\test1.dbf'
    local aDbf := { { 'codigo'     , 'C', 10, 0 } ,;
                    { 'pichincha'  , 'C', 15, 0 } ,;
                    { 'internacio' , 'C', 15, 0 } }


    hBancos ['pichincha']  = {}
    hRow = { 'numcuenta' => '1234567' }
    aadd( hBancos ['pichincha'], hRow )

    hBancos ['internacio']  = {}
    hRow = { 'numcuenta' => '890123' }
    aadd( hBancos ['internacio'], hRow )

    dbcreate( cDbf, aDbf )

    use ( cDbf ) new alias camello exclusive
    camello->( dbappend() )
    camello->codigo = '1'
    camello->( dbappend() )
    camello->codigo = '2'
    camello->( dbgotop() )

    DEFINE WINDOW oWnd

    @ 0,0 XBROWSE oBrw OF oWnd alias 'camello' fastedit

    oCol1             := oBrw:AddCol()
    oCol1:bEditValue  := { || ( oBrw:cAlias )->codigo }
    oCol1:cHeader     := "codigo"
    oCol1:cEditPicture:= "@!"
    oCol1:nEditType   := 0
    oCol1:nWidth      := 90

    for i = 1 to len( aKeys )
      CreateColumn( oBrw, aKeys[ i ], hBancos )
    next

    oBrw:CreateFromCode()

    ACTIVATE WINDOW oWnd

return nil

function CreateColumn( oBrw, cField, hBancos )

   local oCol, nFld

   WITH OBJECT ( oCol := oBrw:AddCol() )

      nFld           := ( oBrw:cAlias )->( FieldPos( cField ) )
      :cHeader       := cField
      :cExpr         := cField
      :bEditValue    := { || FieldGet( nFld ) }
      :bOnPostEdit   := { |o,x,n| If( n == VK_ESCAPE,,( oBrw:cAlias )->( FieldPut( nFld, x ) ) ) }
      :cEditPicture  := "@!"
      :nWidth        := 120

      :nEditType     := EDIT_LISTBOX
      :aEditListTxt  := {}
      AEval( hBancos[ cField ], { |hRow| AAdd( :aEditListTxt, hRow[ "numcuenta" ] ) } )

   END

return oCol

Please try this also.

Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xbrowse and detached variables Mr Rao please Help
Posted: Fri Aug 26, 2022 02:35 PM

Using fieldname macro, instead of FieldPut() and FieldGet() as in the sample you posted.

#include 'fivewin.ch'

function main()

    local aKeys   := {'pichincha','internacio'}
    local hBancos := { => }
    local hRow
    local aCols   := {}
    local oWnd
    local oBrw
    local i
    local oCol1
    local cDbf := '.\test1.dbf'
    local aDbf := { { 'codigo'     , 'C', 10, 0 } ,;
                    { 'pichincha'  , 'C', 15, 0 } ,;
                    { 'internacio' , 'C', 15, 0 } }


    hBancos ['pichincha']  = {}
    hRow = { 'numcuenta' => '1234567' }
    aadd( hBancos ['pichincha'], hRow )

    hBancos ['internacio']  = {}
    hRow = { 'numcuenta' => '890123' }
    aadd( hBancos ['internacio'], hRow )

    dbcreate( cDbf, aDbf )

    use ( cDbf ) new alias camello exclusive
    camello->( dbappend() )
    camello->codigo = '1'
    camello->( dbappend() )
    camello->codigo = '2'
    camello->( dbgotop() )

    DEFINE WINDOW oWnd

    @ 0,0 XBROWSE oBrw OF oWnd alias 'camello' fastedit

    oCol1             := oBrw:AddCol()
    oCol1:bEditValue  := { || ( oBrw:cAlias )->codigo }
    oCol1:cHeader     := "codigo"
    oCol1:cEditPicture:= "@!"
    oCol1:nEditType   := 0
    oCol1:nWidth      := 90

    for i = 1 to len( aKeys )
      CreateColumn( oBrw, aKeys[ i ], hBancos )
    next

    oBrw:CreateFromCode()

    ACTIVATE WINDOW oWnd

return nil

function CreateColumn( oBrw, cField, hBancos )

   local oCol

   WITH OBJECT ( oCol := oBrw:AddCol() )

      :cHeader       := cField
      :cExpr         := cField
      :bEditValue    := { || &( cField ) }
      :bOnPostEdit   := { |o,x,n| If( n == VK_ESCAPE,,( oBrw:cAlias )->&( cField ) := x ) }
      :cEditPicture  := "@!"
      :nWidth        := 120

      :nEditType     := EDIT_LISTBOX
      :aEditListTxt  := {}
      AEval( hBancos[ cField ], { |hRow| AAdd( :aEditListTxt, hRow[ "numcuenta" ] ) } )

   END

return oCol
Regards



G. N. Rao.

Hyderabad, India
Posts: 670
Joined: Wed Oct 19, 2005 06:41 PM
Re: xbrowse and detached variables Mr Rao please Help
Posted: Sat Aug 27, 2022 01:47 AM

Dear Master Rao
Hats Off !!!!!!!!!!!!!!!
all works fine
Many many thanks !!!
The code exceed my knowledge but xbrowse is great !!
I'll Continue with my project

Again
Many Thnaks
best regards
Wilson

Wilson 'W' Gamboa A
Wilson.josenet@gmail.com

Continue the discussion