Page 1 of 1

xBrowse color (Solved)

PostPosted: Wed Jan 13, 2021 8:59 pm
by ctoas
Good afternoon.

How to set the xBrowse cell / line color when it is out of focus?

Thanks

Re: xBrowse color

PostPosted: Wed Jan 13, 2021 11:41 pm
by FranciscoA
bClrSel,; // default color pair for selected row
bClrSelFocus,; // default color pair for selected row when control has focus

Re: xBrowse color

PostPosted: Wed Jan 13, 2021 11:43 pm
by FranciscoA
Code: Select all  Expand view
local aGradBarSel:= { { 1, RGB(252,252,195)   , RGB(248,195, 134) } }
local aGradRowSel:= {{1, RGB(108,125, 184), RGB(241,222,088)}}

WITH OBJECT oBrw
      :bClrSel          := {|| { nRGB(  0,  0,  0), aGradRowSel } }  // para barra de linea selecc cuando el control no tiene el foco
      :bClrSelFocus    := { || { CLR_BLACK, aGradBarSel } }     // para barra de linea selecc cuando el control tiene el foco
 END

Re: xBrowse color

PostPosted: Thu Jan 14, 2021 12:56 am
by ctoas
Hello Francisco.

Mine is already like this, the question I want to solve is when it loses focus.

See the images.

with focus
Image

without focus
Image

Re: xBrowse color

PostPosted: Thu Jan 14, 2021 5:24 am
by Otto
Hello Christiano,
I like your design.
Best regards,
Otto

Re: xBrowse color

PostPosted: Thu Jan 14, 2021 4:27 pm
by ctoas
Thanks Otto

See the full image for viewing

Image

Re: xBrowse color

PostPosted: Thu Jan 14, 2021 4:59 pm
by nageswaragunupudi
I am not sure what exactly you are looking for.
Is this what you want?
Code: Select all  Expand view
oBrw:bClrStd    := { || { CLR_BLACK, If( GetFocus() == oBrw:hWnd, CLR_WHITE, CLR_HGRAY ) } }
 

Re: xBrowse color

PostPosted: Thu Jan 14, 2021 5:31 pm
by ctoas
Nages, the idea is this, but it would be in the color of the cell. He had already tried it, but without success.

Thanks

Re: xBrowse color

PostPosted: Thu Jan 14, 2021 5:46 pm
by ctoas
Question resolved!

The answer was in my face and I didn't see ...

Thank you all!

Code: Select all  Expand view
oBrw:bClrSel := {||{nRGB(255,255,255), nRGB(060,072,251)}}