xBrowse record selector color

Post Reply
Natter
Posts: 1235
Joined: Mon May 14, 2007 9:49 am

xBrowse record selector color

Post by Natter »

Hi,

Is it possible to change the record selector color for the current row (i.e. use :nResSelColor as a code block) ?
User avatar
Iris Gesser
Posts: 38
Joined: Fri Apr 22, 2016 10:19 pm
Been thanked: 1 time

Re: xBrowse record selector color

Post 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
Natter
Posts: 1235
Joined: Mon May 14, 2007 9:49 am

Re: xBrowse record selector color

Post by Natter »

That's a little off. :? I was interested in coloring the pseudo column RecordSelector.
User avatar
nageswaragunupudi
Posts: 10712
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: xBrowse record selector color

Post by nageswaragunupudi »

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
Post Reply