FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Change Footer colors (xBrowse)
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Change Footer colors (xBrowse)
Posted: Thu Jan 26, 2023 10:06 AM

Is there any example of an interactive color change in Footer (xBrowse) ?

Posts: 2170
Joined: Fri Jul 18, 2008 01:24 AM
Re: Change Footer colors (xBrowse)
Posted: Thu Jan 26, 2023 04:00 PM

Did you already make a looking for "footer color"?

Regards

Francisco J. Alegría P.

Chinandega, Nicaragua.



Fwxh-MySql-TMySql
Posts: 1054
Joined: Sun Oct 09, 2005 10:41 PM
Re: Change Footer colors (xBrowse)
Posted: Sat Jan 28, 2023 04:39 AM
Hi,
Code (fw): Select all Collapse
                         oCol:bClrFooter    := {|| {IF(oBrw:oCol(9):nTotal > 0, CLR_RED, CLR_BLACK), }  }
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Change Footer colors (xBrowse)
Posted: Sat Jan 28, 2023 10:21 AM
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 :(
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Change Footer colors (xBrowse)
Posted: Sat Jan 28, 2023 12:44 PM

return color pair { nClrText, nClrBack } when your bClrFooter is evaluated.

Regards



G. N. Rao.

Hyderabad, India
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Change Footer colors (xBrowse)
Posted: Sun Jan 29, 2023 08:54 AM

Sorry, I got it! Is the update method not enough aCols[cl]:RefreshFooter() ?

Posts: 1054
Joined: Sun Oct 09, 2005 10:41 PM
Re: Change Footer colors (xBrowse)
Posted: Mon Jan 30, 2023 12:51 PM
Hi,
this code...
Code (fw): Select all Collapse
    oCol:bClrFooter    := {|| {IF(oBrw:oCol(9):nTotal > 0, CLR_RED, CLR_BLACK), CLR_YELLOW}  }
Posts: 1054
Joined: Sun Oct 09, 2005 10:41 PM
Re: Change Footer colors (xBrowse)
Posted: Mon Jan 30, 2023 02:08 PM
hi Friends
Code (fw): Select all Collapse
   oCol:bClrFooter    := {|| {CLR_GREEN, CLR_BLUE}  }                    //  CLR_BLUE not working.........
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Change Footer colors (xBrowse)
Posted: Mon Jan 30, 2023 06:08 PM
Code (fw): Select all Collapse
#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
Regards



G. N. Rao.

Hyderabad, India
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: Change Footer colors (xBrowse)
Posted: Tue Jan 31, 2023 03:43 PM

Hi Mr. Rao,

Which application do you use to create gif files.

Thanks.

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Change Footer colors (xBrowse)
Posted: Wed Feb 01, 2023 07:13 AM

ScreenToGif

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion