symbol € on xbrowse

User avatar
anserkk
Posts: 1280
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: symbol € on xbrowse

Post by anserkk »

Did you miss my post ?
anserkk wrote: Please check whether you have missed oBrw:SetRDD() in your code.

For eg.

Code: Select all

oBrw:SetRDD()
oBrw:MakeTotals()
Regards
Anser
If you have decided not to use the xBrowse via xBrowse command syntax, then please use oCol:cEditPicture instead of Transform(). I have changed your code to use cEditPicture. Inserted the missing oBrw:SetRDD() in your code. The below given code is working fine for me. :)

Code: Select all

Function Main()

    Local oDlg,oBrw,aBrowseRb,i

    RddSetDefault( "DBFCDX" )

    Crea_dbf()   //create and popolate dbf

    DEFINE DIALOG oDlg TITLE "Testing xBrowse"

    @0,0 XBROWSE oBrw SIZE 0,0 PIXEL OF oDlg ALIAS "RB";
         CELL LINES FOOTERS NOBORDER FASTEDIT


    aBrowseRb   := { { { || RB->CodArt }, i18n("Codice"), 40, },;
                     { { || RB->Articolo}, i18n("Articolo"),140, },;
                     { { || RB->Misura}, i18n("Unità"), 50, },;
                     { { || RB->Quantita}, i18n("Qt."), 30,'@99999' },;
                     { { || RB->Iva}, i18n("Iva"), 30, },;
                     { { || RB->Unitario}, i18n("Unitario"), 80,'@ €999,999.99' },;
                     { { || RB->Totale}, i18n("Totale"), 90,'@ €999,999.99' } }

    FOR i := 1 TO Len(aBrowseRb)
        oCol := oBrw:AddCol()
        oCol:bEditValue := aBrowseRb[ i, 1 ] // Changed to bEditValue from bStrData
        oCol:cHeader  := aBrowseRb[ i, 2 ]
        oCol:nWidth   := aBrowseRb[ i, 3 ]
        if !Empty(aBrowseRb[ i, 4 ])
            oCol:cEditPicture:=aBrowseRb[ i, 4 ]
        Endif
    NEXT

    WITH OBJECT oBrw:aCols[ 1 ]
       :cFooter:="Total"
    END

     WITH OBJECT oBrw:aCols[ 4 ]
        :nEditType := EDIT_GET
        :lTotal:=.T.
        :nTotal:=0.00
     END

     For i:=6 to 7
         WITH OBJECT oBrw:aCols[ i ]
            :nEditType := EDIT_GET
            :lTotal:=.T.
            :nTotal:=0.00
        END
     Next

    oBrw:SetRDD()
    oBrw:nStretchCol  := STRETCHCOL_WIDEST
    oBrw:MakeTotals()
    oBrw:CreateFromCode()

    ACTIVATE DIALOG oDlg CENTERED
    Close All
Return
Regards
Anser
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: symbol € on xbrowse

Post by Silvio »

Now run also here
Perhaps Nages tell me once to rem setrdd() I don't Know why...
thanks
Best Regards, Saludos

Falconi Silvio
User avatar
anserkk
Posts: 1280
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: symbol € on xbrowse

Post by anserkk »

If you utilise xBrowse command style syntax then you don't have to provide oBrw:SetRDD() and xBrowse will do the required setups automatically. Please see the code (2nd one) which I have posted in this topic. http://forums.fivetechsupport.com/viewt ... 58#p111886 There I have NOT used SetRDD(). If you are using command syntax, this is automatically taken care of.

Code: Select all

@0,0 XBROWSE oBrw SIZE 0,0 PIXEL OF oDlg ALIAS "RB";
    COLUMNS 'CodArt','Articolo','Misura','Quantita','Iva','Unitario','Totale' ;
    COLSIZES 40,140,50,30,40,80,90 ;
    HEADERS i18n("Codice"),i18n("Articolo"), i18n("Unità"),i18n("Qt."),i18n("Iva"),i18n("Unitario"),i18n("Totale") ;
    PICTURES ,,,,,'@ €99,999.99','@E 999,999.99' ;
    CELL LINES FOOTERS NOBORDER FASTEDIT
 
Regards
Anser
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: symbol € on xbrowse

Post by Silvio »

ok
Best Regards, Saludos

Falconi Silvio
Post Reply