xbrowses color

xbrowses color

Postby Silvio.Falconi » Wed Nov 08, 2017 3:57 pm

I tried to insert the color of row with a condition but I not have success

Image

I wish change color all lines have V at seven column

I made



oLbx:bClrStd := {|| { IIF(oLbx:aArrayData[1][7]="V", CLR_GRAY,CLR_BLUE),CLR_WHITE } }

or

cColor1:= CLR_GRAY
cColor2:= CLR_BLUE

AEval( oLbx:aCols, {|oCol|oCol:bClrStd := { || { CLR_WHITE, If(oLbx:aArrayData[1][7]="V", cColor1, cColor2 ) } }



Then I tried
oLbx:bClrStd := {|| { IIF(arrayTicket[oLbx:nArrayAt,7]="V",CLR_GREEN,CLR_RED),CLR_WHITE } }

Image

but it write the text and not the background

where is the error ?
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: 7088
Joined: Thu Oct 18, 2012 7:17 pm

Re: xbrowses color

Postby nageswaragunupudi » Wed Nov 08, 2017 4:26 pm

Code: Select all  Expand view  RUN
oLbx:bClrStd := {|| { IIF(oLbx:aRow[7]="V", CLR_GRAY,CLR_BLUE),CLR_WHITE } }
Regards

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

Re: xbrowses color

Postby Silvio.Falconi » Wed Nov 08, 2017 4:53 pm

I wish the background with color and the text on white
TYPE
oLbx:bClrStd := {|| { IIF(oLbx:aRow[7]="V", CLR_GRAY,CLR_BLUE),IIF(oLbx:aRow[7]="V",RGB( 220, 235, 252 ) ,CLR_WHITE) } }
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: 7088
Joined: Thu Oct 18, 2012 7:17 pm

Re: xbrowses color

Postby Otto » Wed Nov 08, 2017 5:42 pm

Hello Silvio,
please try to insert :value.
oLbx:bClrStd := {|| { IIF(oLbx:aRow[7]:value="V", CLR_GRAY,CLR_BLUE),CLR_WHITE } }

I would suggest you to switch to Fivedit.
Have you seen the video.
Best regards,
Otto


Image

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6353
Joined: Fri Oct 07, 2005 7:07 pm

Re: xbrowses color

Postby Silvio.Falconi » Wed Nov 08, 2017 8:47 pm

Otto, for now I use xmate ... In Italy there is a adage...."Who leaves the old road for the new knows that what he leaves does not know what he finds."
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: 7088
Joined: Thu Oct 18, 2012 7:17 pm

Re: xbrowses color

Postby Otto » Wed Nov 08, 2017 10:02 pm

Hello Silvio,
does you program work with
oLbx:bClrStd := {|| { IIF(oLbx:aRow[7]:value="V", CLR_GRAY,CLR_BLUE),CLR_WHITE } }.


Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6353
Joined: Fri Oct 07, 2005 7:07 pm

Re: xbrowses color

Postby Silvio.Falconi » Thu Nov 09, 2017 7:53 am

The colors is good
only I have records link to another record
I explain you

I have a product : "Pizza Caprese"
and then I have variants of this product sample :
"Più Prosciutto"
"Più mozzarella"

I wish show a color with a link I not Know How make it :

2 "Pizza Caprese"
--------- "Più Prosciutto"
--------- "Più mozzarella"
1 " cocacola"
2 "Dessert"

the products must have different colors and his variant a color near to color's prduct
What I can build ?
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: 7088
Joined: Thu Oct 18, 2012 7:17 pm

Re: xbrowses color

Postby Marc Venken » Thu Nov 09, 2017 8:14 am

Maybe with a function call in the cell ?

oBrw[6]:T1:bClrStd := { || showcolors(oBrw[6]:T1:Value) }
oBrw[6]:T2:bClrStd := { || showcolors(oBrw[6]:T2:Value) }
oBrw[6]:T3:bClrStd := { || showcolors(oBrw[6]:T3:Value) }

Code: Select all  Expand view  RUN
function showcolors(cVeld)
  local cKleur:=""
  local aColorPairs := { ;
  { CLR_BLACK, MY_LIGHTGREEN },;  //1
  { CLR_BLACK, MY_GREEN},;        //2
  { CLR_BLACK, MY_PAARS},;        //3
  { CLR_BLACK, MY_LIGHTYELLOW },; //4
  { CLR_BLACK, MY_YELLOW }}       //5

  do case
    case cVeld = "X"
       cKleur = aColorPairs[2]
    case cVeld = "K"
       cKleur = aColorPairs[3]
    case cVeld = "V"
       cKleur = aColorPairs[5]
    otherwise
       cKleur = aColorPairs[1]
  endcase
return cKleur
 
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1450
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: xbrowses color

Postby sreerajklm » Fri Nov 10, 2017 5:17 am

Are you looking like this,

Image

Code: Select all  Expand view  RUN
#Include "FiveWin.ch"

*-----------------------------------------*
Function Main()
*-----------------------------------------*
Local oWnd,oBrw
Local aArry:={{"Pizza Caprese","PIZCA","P"},;
              {"Più Prosciutto","PIZCB","V"},;
              {"Più mozzarella","PIZCC","V"},;
              {"Cocacola","COCAC","P"},;
              {"Cocacola One","COCAA","V"},;
              {"Cocacola Two","COCAB","V"}}

DEFINE WINDOW oWnd TITLE "Test"

@ 1, 1 XBROWSE oBrw SIZE 500, 230 OF oWnd ;
    ARRAY aArry ;
    HEADER "Item Name","Item Code","Item Level" ;
    COLUMNS 1,2,3 ;
    COLSIZES 250,140


    WITH OBJECT oBrw
        :nColDividerStyle = LINESTYLE_LIGHTGRAY
        :nRowDividerStyle = LINESTYLE_LIGHTGRAY 
        :ItemName:bindent:={ || If(Alltrim(oBrw:ItemLevel:Value) == "P" ,0,20 )}   
        :bClrStd  := { || IF( (oBrw:ItemLevel:Value) = "P" ,;
                                              { 16777215,RGB(248, 100, 12) },;
                                              { 16777215,RGB(154, 188, 49) } ) }   
                                               
        :CreateFromCode()                                  
    END

ACTIVATE WINDOW oWnd
Return Nil


Regards
Sreeraj
Last edited by sreerajklm on Fri Nov 10, 2017 8:25 am, edited 1 time in total.
sreerajklm
 
Posts: 6
Joined: Tue Sep 23, 2014 5:22 am
Location: Kochi, India

Re: xbrowses color

Postby Silvio.Falconi » Fri Nov 10, 2017 7:34 am

It can go good
but I have another structure

Image


USE CONSUM ALIAS CO
INDEX ON upper(NUMDOC)+Upper(numriga) TAG MESACON TO CONSUM for !deleted()
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: 7088
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 33 guests