colors in a xbrowse

colors in a xbrowse

Postby Silvio » Sun Nov 15, 2009 2:02 pm

I created a xbrowse from array
I want insert colors for each cell

Code: Select all  Expand view
Local aDatiDisp[10,6]
   Local aDatiDisp_colore[10,6]


 aData := { {aOrario[1], aDatiDisp[1][1],aDatiDisp[1][2],aDatiDisp[1][3],aDatiDisp[1][4],aDatiDisp[1][5],aDatiDisp[1][6]},;
              {aOrario[2], aDatiDisp[2][1],aDatiDisp[2][2],aDatiDisp[2][3],aDatiDisp[2][4],aDatiDisp[2][5],aDatiDisp[2][6]},;
              {aOrario[3], aDatiDisp[3][1],aDatiDisp[3][2],aDatiDisp[3][3],aDatiDisp[3][4],aDatiDisp[3][5],aDatiDisp[3][6]},;
              {aOrario[4], aDatiDisp[4][1],aDatiDisp[4][2],aDatiDisp[4][3],aDatiDisp[4][4],aDatiDisp[4][5],aDatiDisp[4][6]},;
              {aOrario[5], aDatiDisp[5][1],aDatiDisp[5][2],aDatiDisp[5][3],aDatiDisp[5][4],aDatiDisp[5][5],aDatiDisp[5][6]},;
              {aOrario[6], aDatiDisp[6][1],aDatiDisp[6][2],aDatiDisp[6][3],aDatiDisp[6][4],aDatiDisp[6][5],aDatiDisp[6][6]},;
              {aOrario[7], aDatiDisp[7][1],aDatiDisp[7][2],aDatiDisp[7][3],aDatiDisp[7][4],aDatiDisp[7][5],aDatiDisp[7][6]},;
              {aOrario[8], aDatiDisp[8][1],aDatiDisp[8][2],aDatiDisp[8][3],aDatiDisp[8][4],aDatiDisp[8][5],aDatiDisp[8][6]},;
              {aOrario[9], aDatiDisp[9][1],aDatiDisp[9][2],aDatiDisp[9][3],aDatiDisp[9][4],aDatiDisp[9][5],aDatiDisp[9][6]},;
              {aOrario[10], aDatiDisp[10][1],aDatiDisp[10][2],aDatiDisp[10][3],aDatiDisp[10][4],aDatiDisp[10][5],aDatiDisp[10][6]};
              }




    aHead := {"ORE","LUNEDI","MARTEDI","MERCOLEDI","GIOVEDI","VENERDI","SABATO" }

DEFINE DIALOG oDlg  size 400,450  TITLE cTitle



  @ 1,1 XBROWSE oBrw  ;
             COLUMNS "ORE","LUNEDI","MARTEDI","MERCOLEDI","GIOVEDI","VENERDI","SABATO";
             COLSIZES 100, 150, 150, 150,150,150,150 OF oDlg ;
             SIZE 280,200 PIXEL AUTOCOLS


   oBrw:nMarqueeStyle              := 1
   oBrw:nRowHeight                 := 40
   oBrw:nHeaderHeight              := 60
   oBrw:SetArray(aData )
   oBrw:lRecordSelector := .f.
 * oBrw:lAdjustLastCol             := .t.


   for nI = 1 to len( aHead )
      oBrw:aCols[ nI ]:cHeader   = aHead[ nI ]
   next




 oBrw:CreateFromCode()



   ACTIVATE DIALOG oDlg CENTERED ON INIT oDlg:Resize()




 return nil

 




the colors is aDatiDisp_colore[n_giorno][n_ora]:=classi->colore


how I can to insert this color on eac cell ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 82 guests