FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse record selector color
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
xBrowse record selector color
Posted: Thu Jan 30, 2025 04:32 PM
Hi,

Is it possible to change the record selector color for the current row (i.e. use :nResSelColor as a code block) ?
Posts: 38
Joined: Fri Apr 22, 2016 10:19 PM
Re: xBrowse record selector color
Posted: Thu Jan 30, 2025 10:28 PM
Dear Natter,

I am not sure if this is what you need.
Mr. Rao once helped me with the colors in xbrowse.
  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
   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
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: xBrowse record selector color
Posted: Fri Jan 31, 2025 07:42 AM
That's a little off. :? I was interested in coloring the pseudo column RecordSelector.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse record selector color
Posted: Fri Jan 31, 2025 08:32 AM

At present, XBrowse does not provide this facility.

We will keep your requirement in mind and try to provide this feature soon.

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion