colorize Header and selector

colorize Header and selector

Postby Silvio.Falconi » Tue Oct 22, 2024 7:55 am

Image
can I change the color of header of xbrowse and selector ?

I tried with :bClrHeader :=RGB(247,248,248) but make error

If I make :bClrHeader := {|| { RGB(247,248,248), CLR_BLACK } }

I have this

Image

I wish the color RGB(247,248,248) and the text black
Last edited by Silvio.Falconi on Wed Oct 23, 2024 7:32 am, edited 1 time in total.
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: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: colorize HEader and selector

Postby Silvio.Falconi » Tue Oct 22, 2024 8:21 am

perhps I found the solution for header

:SetStyle( 2013 )

Image

I wish the same color also for the selector column
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: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: colorize HEader and selector

Postby Marc Venken » Tue Oct 22, 2024 1:57 pm

oBrw:bClrHeader := { ||{ CLR_GRAY, nRGB( 242, 242, 242 ) } }

You need nRGB
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1434
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: colorize HEader and selector

Postby Silvio.Falconi » Wed Oct 23, 2024 7:28 am

Marc Venken wrote:oBrw:bClrHeader := { ||{ CLR_GRAY, nRGB( 242, 242, 242 ) } }

You need nRGB


Yes but I need selector column color
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: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: colorize Header and selector

Postby Cgallegoa » Wed Oct 23, 2024 3:29 pm

Silvio:

Image
Code: Select all  Expand view
#include "fivewin.ch"

function Main()

   local aData := FillArray()
   local oDlg, oBar, oBrw
   LOCAL nColorBkg := nRGB( 200, 225, 165 )

   DEFINE DIALOG oDlg SIZE 500,450 PIXEL TRUEPIXEL
   DEFINE BUTTONBAR oBar OF oDlg SIZE 60,32 2010

   @ 40, 10 XBROWSE  oBrw ;
      COLUMNS 1,2,3,4,5,6;
      HEADERS  "Puntata","Costo giocata","Spesa","Vincita","Utile","Utile%";
      ARRAY  aData ;
      SIZE -25,-50 PIXEL OF oDlg  NOBORDER

   oBrw:RecSelShowKeyNo()
   oBrw:nMarqueeStyle       := MARQSTYLE_HIGHLROW
   oBrw:nColDividerStyle    := LINESTYLE_LIGHTGRAY
   oBrw:lColDividerComplete := .t.
   oBrw:lHScroll            := .f.
   oBrw:nHeaderHeight       := 20
   oBrw:nRowHeight          := 20
   oBrw:SetStyle( 2018 )
   oBrw:SetStyle( 0 )
   oBrw:bRecSelHeader       := { || " " }
   oBrw:nRecSelWidth        := "999"
   oBrw:lRecordSelector     := .t.

   oBrw:bClrHeader          := {|| { CLR_BLACK, nColorBkg } }
   oBrw:nRecSelColor        := nColorBkg

   oBrw:CreateFromCode()

   ACTIVATE DIALOG oDlg CENTERED

return nil


static function FillArray()

   local aData := Array( 16, 7 )
   local aRow

   for each aRow in aData
      AEval( aRow, { |u,i| aRow[ i ] := HB_RandomInt( 1,9999 ) * 0.01 } )
   next

return aData
Saludos,

Carlos Gallego

*** FWH-24.07, xHarbour 1.3.1 Build 20240624, Borland C++7.70, PellesC ***
Cgallegoa
 
Posts: 492
Joined: Sun Oct 16, 2005 3:32 am
Location: Quito - Ecuador

Re: colorize Header and selector

Postby Silvio.Falconi » Wed Oct 23, 2024 6:13 pm

thanks Not found the variables into xbrowse class
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: 7061
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 82 guests