Página 1 de 1

How to change Browse Header Foreground and Background Color

Publicado: Mar Sep 17, 2019 3:52 pm
por Milan Mehta
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.

Re: How to change Browse Header Foreground and Background Color

Publicado: Mar Sep 17, 2019 7:12 pm
por ignacio

Código: Seleccionar todo

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

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,