Page 1 of 1

Change Footer colors (xBrowse)

PostPosted: Thu Jan 26, 2023 10:06 am
by Natter
Is there any example of an interactive color change in Footer (xBrowse) ?

Re: Change Footer colors (xBrowse)

PostPosted: Thu Jan 26, 2023 4:00 pm
by FranciscoA
Did you already make a looking for "footer color"?
Regards

Re: Change Footer colors (xBrowse)

PostPosted: Sat Jan 28, 2023 4:39 am
by Willi Quintana
Hi,
Code: Select all  Expand view

                         oCol:bClrFooter    := {|| {IF(oBrw:oCol(9):nTotal > 0, CLR_RED, CLR_BLACK), }  }

 

Re: Change Footer colors (xBrowse)

PostPosted: Sat Jan 28, 2023 10:21 am
by Natter
Thank you for your help !
Of course, I immediately tried the construction of
aCols[cl]:bClrFooter:={||{RGB(...), RGB(...)}}
aCols[cl]:RefreshFooter()
But at the same time, only the font color changes, and the background color does not change :(

Re: Change Footer colors (xBrowse)

PostPosted: Sat Jan 28, 2023 12:44 pm
by nageswaragunupudi
return color pair { nClrText, nClrBack } when your bClrFooter is evaluated.

Re: Change Footer colors (xBrowse)

PostPosted: Sun Jan 29, 2023 8:54 am
by Natter
Sorry, I got it! Is the update method not enough aCols[cl]:RefreshFooter() ?

Re: Change Footer colors (xBrowse)

PostPosted: Mon Jan 30, 2023 12:51 pm
by Willi Quintana
Hi,
this code...

Code: Select all  Expand view

    oCol:bClrFooter    := {|| {IF(oBrw:oCol(9):nTotal > 0, CLR_RED, CLR_BLACK), CLR_YELLOW}  }
 

Re: Change Footer colors (xBrowse)

PostPosted: Mon Jan 30, 2023 2:08 pm
by Willi Quintana
hi Friends

Code: Select all  Expand view

   oCol:bClrFooter    := {|| {CLR_GREEN, CLR_BLUE}  }                    //  CLR_BLUE not working.........
 

Re: Change Footer colors (xBrowse)

PostPosted: Mon Jan 30, 2023 6:08 pm
by nageswaragunupudi
Code: Select all  Expand view
#include "fivewin.ch"

function Main()

   local aData    := { { "ONE  ", 2000 }, { "TWO  ", -5000 }, { "THREE", 2000 } }

   XBROWSER aData FASTEDIT SETUP BrwSetup( oBrw )

return nil

static function BrwSetup( oBrw )

   SetGetColorFocus()
   oBrw:lFooter := .t.
   oBrw:l2007   := .f.
   WITH OBJECT oBrw:aCols[ 2 ]
      :nFooterType   := AGGR_SUM
      :bClrFooter    := { || If( oBrw:oCol( 2 ):nTotal < 0, { CLR_WHITE, CLR_HRED }, { CLR_BLACK, CLR_HGREEN } ) }
   END
   oBrw:MakeTotals()

return nil
 


Image

Re: Change Footer colors (xBrowse)

PostPosted: Tue Jan 31, 2023 3:43 pm
by Horizon
Hi Mr. Rao,

Which application do you use to create gif files.

Thanks.

Re: Change Footer colors (xBrowse)

PostPosted: Wed Feb 01, 2023 7:13 am
by nageswaragunupudi
ScreenToGif