xbrowser header

Post Reply
wartiaga
Posts: 83
Joined: Wed May 25, 2016 1:04 am

xbrowser header

Post by wartiaga »

Hi,

I have a xbrowse with a empty array.

When i put some elements in array and I do oBrw:SetArray(VetDup) my headers change to A, B, C , D, E.

What I do wrong?

Thanks!
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: xbrowser header

Post by Silvio.Falconi »

Code: Select all

function TestMain()

   local oWnd, oBar, oBrw

   DEFINE WINDOW oWnd TITLE "Arrays"

@ 0,0 XBROWSE oBrw OF oWnd               ;
      COLUMNS 1, 2, 3, 4                    ;
      HEADERS "a","b","tc","d"   ;
      COLSIZES 100, 100, 100, 100           ;
      ARRAY {} LINES FASTEDIT CELL


WITH OBJECT oBrw
        :CreateFromCode()
   END

 oWnd:oClient := oBrw

   ACTIVATE WINDOW oWnd

return nil
or easy

Code: Select all

LOCAL aFiles   := {}

@ 30, 10 XBROWSE  oLbx OF oDlg ;
      SIZE 185,100 PIXEL


    oLbx:SetArray(aFiles)

   oLbx:aCols[1]:cHeader  := i18n("Archivio")
   oLbx:aCols[1]:nWidth   := 110

   oLbx:aCols[2]:cHeader  := i18n("Dimensione")
   oLbx:aCols[2]:nWidth   := 100

  WITH OBJECT  oLbx
                   :CreateFromCode()
                  END
 
here run good

Image
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
wartiaga
Posts: 83
Joined: Wed May 25, 2016 1:04 am

Re: xbrowser header

Post by wartiaga »

Silvio.Falconi wrote:

Code: Select all

function TestMain()

   local oWnd, oBar, oBrw

   DEFINE WINDOW oWnd TITLE "Arrays"

@ 0,0 XBROWSE oBrw OF oWnd               ;
      COLUMNS 1, 2, 3, 4                    ;
      HEADERS "a","b","tc","d"   ;
      COLSIZES 100, 100, 100, 100           ;
      ARRAY {} LINES FASTEDIT CELL


WITH OBJECT oBrw
        :CreateFromCode()
   END

 oWnd:oClient := oBrw

   ACTIVATE WINDOW oWnd

return nil
or easy

Code: Select all

LOCAL aFiles   := {}

@ 30, 10 XBROWSE  oLbx OF oDlg ;
      SIZE 185,100 PIXEL


    oLbx:SetArray(aFiles)

   oLbx:aCols[1]:cHeader  := i18n("Archivio")
   oLbx:aCols[1]:nWidth   := 110

   oLbx:aCols[2]:cHeader  := i18n("Dimensione")
   oLbx:aCols[2]:nWidth   := 100

  WITH OBJECT  oLbx
                   :CreateFromCode()
                  END
 
here run good

Image
I will try, thank you!
Post Reply