FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse color (Solved)
Posts: 115
Joined: Wed Oct 26, 2005 02:38 PM
xBrowse color (Solved)
Posted: Wed Jan 13, 2021 08:59 PM

Good afternoon.

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

Thanks

Christiano Augusto Silveira
christiano.silveira@gmail.com

MaxxTech Soluções em TI
http://www.maxxtech.com.br
Posts: 2170
Joined: Fri Jul 18, 2008 01:24 AM
Re: xBrowse color
Posted: Wed Jan 13, 2021 11:41 PM

bClrSel,; // default color pair for selected row
bClrSelFocus,; // default color pair for selected row when control has focus

Francisco J. Alegría P.

Chinandega, Nicaragua.



Fwxh-MySql-TMySql
Posts: 2170
Joined: Fri Jul 18, 2008 01:24 AM
Re: xBrowse color
Posted: Wed Jan 13, 2021 11:43 PM
Code (fw): Select all Collapse
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
Francisco J. Alegría P.

Chinandega, Nicaragua.



Fwxh-MySql-TMySql
Posts: 115
Joined: Wed Oct 26, 2005 02:38 PM
Re: xBrowse color
Posted: Thu Jan 14, 2021 12:56 AM
Hello Francisco.

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

See the images.

with focus


without focus
Christiano Augusto Silveira
christiano.silveira@gmail.com

MaxxTech Soluções em TI
http://www.maxxtech.com.br
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: xBrowse color
Posted: Thu Jan 14, 2021 05:24 AM

Hello Christiano,
I like your design.
Best regards,
Otto

Posts: 115
Joined: Wed Oct 26, 2005 02:38 PM
Re: xBrowse color
Posted: Thu Jan 14, 2021 04:27 PM
Thanks Otto

See the full image for viewing

Christiano Augusto Silveira
christiano.silveira@gmail.com

MaxxTech Soluções em TI
http://www.maxxtech.com.br
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse color
Posted: Thu Jan 14, 2021 04:59 PM
I am not sure what exactly you are looking for.
Is this what you want?
Code (fw): Select all Collapse
oBrw:bClrStd    := { || { CLR_BLACK, If( GetFocus() == oBrw:hWnd, CLR_WHITE, CLR_HGRAY ) } }
Regards



G. N. Rao.

Hyderabad, India
Posts: 115
Joined: Wed Oct 26, 2005 02:38 PM
Re: xBrowse color
Posted: Thu Jan 14, 2021 05:31 PM

Nages, the idea is this, but it would be in the color of the cell. He had already tried it, but without success.

Thanks

Christiano Augusto Silveira
christiano.silveira@gmail.com

MaxxTech Soluções em TI
http://www.maxxtech.com.br
Posts: 115
Joined: Wed Oct 26, 2005 02:38 PM
Re: xBrowse color
Posted: Thu Jan 14, 2021 05:46 PM
Question resolved!

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

Thank you all!

Code (fw): Select all Collapse
oBrw:bClrSel := {||{nRGB(255,255,255), nRGB(060,072,251)}}
Christiano Augusto Silveira
christiano.silveira@gmail.com

MaxxTech Soluções em TI
http://www.maxxtech.com.br

Continue the discussion