In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

How to change Browse Header Foreground and Background Color

Xailer English public forum
Milan Mehta
Posts: 112
Joined: Sun Dec 27, 2009 9:54 am

How to change Browse Header Foreground and Background Color

Postby Milan Mehta » Tue Sep 17, 2019 3:52 pm

I have set the background and foreground color of the Browse.
However I could not change the same of the Header. It remains Black and white.
How to change it ?

Moreover I wish to highlight some cell. I could achieve the same using OnDrawCell event.
But even after setting lHighLite to .T., I could not make it Bold. How can I make it Bold ?

TIA
Milan.
User avatar
ignacio
Site Admin
Posts: 8559
Joined: Mon Apr 06, 2015 8:00 pm
Location: Madrid, Spain
Contact:

Re: How to change Browse Header Foreground and Background Color

Postby ignacio » Tue Sep 17, 2019 7:12 pm

Code: Select all

//------------------------------------------------------------------------------

METHOD ArrayBrowse1Column1DrawCell( oSender, cText, nClrText, nClrPane, lHighLite, hDC, aRect ) CLASS TForm1

   SelectObject( hDC, ::oFontBold:Handle )

RETURN Nil

//------------------------------------------------------------------------------

METHOD FormInitialize( oSender ) CLASS TForm1

   ::oFontBold := ::oFont:Clone()
   ::oFontBold:lBold := .T.

RETURN Nil

//------------------------------------------------------------------------------

METHOD FormDestroy( oSender ) CLASS TForm1
   ::oFontBold:End()
RETURN Nil


I'm afraid Header colors can not be set. Is a limitation of the Win32 API control used (THeader).

Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info

Return to “English”