Page 1 of 1
xBrowse record selector color
Posted: Thu Jan 30, 2025 4:32 pm
by Natter
Hi,
Is it possible to change the record selector color for the current row (i.e. use :nResSelColor as a code block) ?
Re: xBrowse record selector color
Posted: Thu Jan 30, 2025 10:28 pm
by Iris Gesser
Dear Natter,
I am not sure if this is what you need.
Mr. Rao once helped me with the colors in xbrowse.
Code: Select all | Expand
Function MyColors( oBrw )
local aColors := { , }
If (cust->resstatus = "###Cancelled" .and. cust->BOOKINGOK = " ")
aColors := { CLR_BLACK, CLR_STORNO }
else
if ((cust->resstatus = "Waitlisted" .or. cust->resstatus = "Reserved" ).and. cust->BOOKINGOK = " ")
aColors := {CLR_BLACK, CLR_BUCHUNG}
else
aColors := { CLR_BLACK,CLR_WHITE }
endif
endif
Return aColors
//-----------------------
Function MyColors_Focus( oBrw )
local aColors := { , }
If (cust->resstatus = "###Cancelled" .and. cust->BOOKINGOK = " ")
aColors := { CLR_WHITE, CLR_STORNO_FOKUS }
else
if ((cust->resstatus = "Waitlisted" .or. cust->resstatus = "Reserved" ).and. cust->BOOKINGOK = " ")
aColors := {CLR_WHITE, CLR_BUCHUNG_FOKUS}
else
aColors := { CLR_BLACK,CLR_WHITE }
endif
endif
Return aColors
and then this for xbrowse
Code: Select all | Expand
WITH OBJECT oBrw
:MakeTotals()
:lFooter := .T.
:l2007 := .f.
:lRecordSelector := .F.
:nMarqueeStyle := MARQSTYLE_HIGHLROW
:bClrStd := { || MyColors( oBrw ) } //{ || { CLR_GREEN, CLR_WHITE } }
:bClrSelFocus := { || MyColors_Focus( oBrw ) } //{ CLR_WHITE, RGB( 0x33, 0x66, 0xCC ) } }
:bClrSel := { || MyColors_Focus( oBrw ) } //{ CLR_WHITE, RGB( 0x33, 0x66, 0xCC ) } }
:SetColor( CLR_BLUE, CLR_WHITE) //@IA 20200819
:nRowHeight := 80
// :oFont := oFntFocus
:CreateFromCode()
END
//------------
Kind regards
Iris
Re: xBrowse record selector color
Posted: Fri Jan 31, 2025 7:42 am
by Natter
That's a little off.
I was interested in coloring the pseudo column
RecordSelector.
Re: xBrowse record selector color
Posted: Fri Jan 31, 2025 8:32 am
by nageswaragunupudi
At present, XBrowse does not provide this facility.
We will keep your requirement in mind and try to provide this feature soon.