error on Xbrowse

error on Xbrowse

Postby Silvio.Falconi » Mon Oct 21, 2024 7:10 am

Image

on First column see the data why ?

I made

Code: Select all  Expand view
@ oBar:nbottom+6, 10 XBROWSE  oBrw ;
        COLUMNS 1,2,3,4,5,6;
        HEADERS  "Puntata","Costo giocata","Spesa","Vincita","Utile","Utile%";
        ARRAY  aData ;
        SIZE nCol-25,oDlg:nBottom-50 PIXEL OF oDlg  NOBORDER
        oBrw:RecSelShowKeyNo()
       oBrw:nMarqueeStyle       := MARQSTYLE_HIGHLROW
   oBrw:nColDividerStyle    := LINESTYLE_LIGHTGRAY
   oBrw:lColDividerComplete := .t.
   oBrw:lRecordSelector     := .f.
   oBrw:lHScroll             := .f.
   oBrw:nHeaderHeight       := 20
   oBrw:nRowHeight          := 20
   oBrw:SetStyle( 2018 )
    oBrw:bRecSelHeader    := { || " " }
    oBrw:nRecSelWidth     := "999"
    oBrw:lRecordSelector     := .t.
     oBrw:CreateFromCode()



Before was

@ oBar:nbottom+6, 10 XBROWSE oBrw ;
SIZE nCol-25,oDlg:nBottom-50 PIXEL OF oDlg NOBORDER
oBrw:SetArray(aData,,,.F.)

SetupBrowserProgressioni(oBrw,aHeaders)

Code: Select all  Expand view
 Function SetupBrowserProgressioni(oBrw,aHeaders)
    local nColorFrequenze := nRgb(145,255,172)
    local nColorRitardi   := nRgb(255,168,168)
    local nColorStorici   := nRgb(255,130,130)
    local nColorAlternate := nRgb(240,250,255)
    local nColorLinee     := nRgb(211,211,211)
    local nColorBorder    := nRgb(165,165,165)
    local nColorHeader    := nRgb(165,165,165)
    local nColorHeader2    := CLR_WHITE


    ADD COLUMN TO oBrw HEADER aHeaders[1] DATA {|v,oCol| oCol:oBrw:aArrayData[oCol:oBrw:nArrayAt,1] } CENTER
    ADD COLUMN TO oBrw HEADER aHeaders[2] DATA {|v,oCol| oCol:oBrw:aArrayData[oCol:oBrw:nArrayAt,2] } CENTER
    ADD COLUMN TO oBrw HEADER aHeaders[3] DATA {|v,oCol| oCol:oBrw:aArrayData[oCol:oBrw:nArrayAt,3] } CENTER
    ADD COLUMN TO oBrw HEADER aHeaders[4] DATA {|v,oCol| oCol:oBrw:aArrayData[oCol:oBrw:nArrayAt,4] } CENTER
    ADD COLUMN TO oBrw HEADER aHeaders[5] DATA {|v,oCol| oCol:oBrw:aArrayData[oCol:oBrw:nArrayAt,5] } CENTER
    ADD COLUMN TO oBrw HEADER aHeaders[6] DATA {|v,oCol| oCol:oBrw:aArrayData[oCol:oBrw:nArrayAt,6] } CENTER

    WITH OBJECT oBrw
       :RecSelShowKeyNo()

      :nRowHeight    := 30
      :nHeaderHeight   := 25
      :nClrBorder := nColorBorder //CLR_GRAY
      :lDrawBorder := .f.
      :nColorBox := nColorFrequenze//CLR_HRED
      :nMarqueeStyle       := 3

      :lHscroll            := .F.
      :lVscroll            := .T.
      :l2007               := .F.
      :l2015               := .T.

      :lAllowRowSizing     := .F.
      :lAllowColSwapping   := .F.
      :lAllowColHiding     := .F.
      :lRecordSelector     := .t.

      :lAllowSizings       := .F.
       //  :lAutoSaves       := .t.


      :nColDividerStyle    := LINESTYLE_LIGHTGRAY
      :nRowDividerStyle    := LINESTYLE_LIGHTGRAY
      :lDisplayZeros       := .f.

      :nClrBorder := CLR_GRAY
        :nRowDividerStyle    := LINESTYLE_LIGHTGRAY
        :nColDividerStyle    := LINESTYLE_LIGHTGRAY

      :bClrStd:= { || { CLR_BLACK, If( oBrw:aArraydata[ oBrw:nArrayAt ][7]=="REC" ,rgb(255,192,203),nColorAlternate ) } }

      :bClrSelFocus := { || {nColorStorici,nColorFrequenze}}
      :bClrRowFocus := { || {nColorFrequenze, nColorStorici }}
     * :aCols[ 1 ]:bClrStd := { || { ,nColorRitardi  } }
      :bClrHeader := { || {nColorHeader,nColorHeader2}}

      :bRecSelHeader    := { || " " }
      :nRecSelWidth     := "999"

      :SetStyle( 2018 )
      :CreateFromCode()




  end with
Return nil


I not change adata

adata have 7 fields But i show only six

Code: Select all  Expand view
  AAdd(aData, { nTicketPrice, nTicketPrice, nSpent, Round(nNetWin, 2), nUtile, nUtilePercentual, "Game" })
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: error on Xbrowse

Postby nageswaragunupudi » Tue Oct 22, 2024 2:29 am

Your same code, it is working correctly for me.

This is the exact code I tested
Code: Select all  Expand view
#include "fivewin.ch"

function Main()

   local aData := FillArray()
   local oDlg, oBar, oBrw

   DEFINE DIALOG oDlg SIZE 500,450 PIXEL TRUEPIXEL
   DEFINE BUTTONBAR oBar OF oDlg SIZE 60,32 2010

   @ 40, 10 XBROWSE  oBrw ;
      COLUMNS 1,2,3,4,5,6;
      HEADERS  "Puntata","Costo giocata","Spesa","Vincita","Utile","Utile%";
      ARRAY  aData ;
      SIZE -25,-50 PIXEL OF oDlg  NOBORDER

   oBrw:RecSelShowKeyNo()
   oBrw:nMarqueeStyle       := MARQSTYLE_HIGHLROW
   oBrw:nColDividerStyle    := LINESTYLE_LIGHTGRAY
   oBrw:lColDividerComplete := .t.
   oBrw:lRecordSelector     := .f.
   oBrw:lHScroll            := .f.
   oBrw:nHeaderHeight       := 20
   oBrw:nRowHeight          := 20
   oBrw:SetStyle( 2018 )
   oBrw:bRecSelHeader       := { || " " }
   oBrw:nRecSelWidth        := "999"
   oBrw:lRecordSelector     := .t.
   oBrw:CreateFromCode()

   ACTIVATE DIALOG oDlg CENTERED

return nil

static function FillArray()

   local aData := Array( 16, 7 )
   local aRow

   for each aRow in aData
      AEval( aRow, { |u,i| aRow[ i ] := HB_RandomInt( 1,9999 ) * 0.01 } )
   next

return aData


Image
Regards

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

Re: error on Xbrowse

Postby Silvio.Falconi » Tue Oct 22, 2024 6:40 am

thank now run ok
perhaps there was in obj last compilation bad
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 36 guests