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.

TBrowseMod group header text color

Xailer professional forum in English
Responder
Timm
Mensajes: 130
Registrado: Lun Jun 21, 2010 11:01 am

TBrowseMod group header text color

Mensaje por Timm »

Hi!

How can I change the text color of TBrowseMod group headers?

Best regards, Timm
Pedro Gil
Mensajes: 100
Registrado: Lun Ene 15, 2007 7:46 pm

Re: TBrowseMod group header text color

Mensaje por Pedro Gil »

Hi!

I'm not sure if I understood your question correctly but you have the following properties in the TBrowseMod class:

PROPERTY nClrHeaderPane
PROPERTY nClrHeaderText
PROPERTY nClrHeaderDivider
PROPERTY nClrHeaderHotPane
PROPERTY nClrHeaderHotText
PROPERTY nClrHeaderSelPane
PROPERTY nClrHeaderEditText
PROPERTY nClrHeaderEditPane
PROPERTY nClrHeaderEditTextFocus
PROPERTY nClrHeaderEditPaneFocus

Greetings!
Timm
Mensajes: 130
Registrado: Lun Jun 21, 2010 11:01 am

Re: TBrowseMod group header text color

Mensaje por Timm »

Hi Pedro,

many thanks for your answer!

I am searching for something like nClrGroupHeaderEditText in order to change the color of this text:

2023-11-10 08_00_40-COPPIO.png
2023-11-10 08_00_40-COPPIO.png (23.5 KiB) Visto 226 veces

I tried it with this:

Código: Seleccionar todo

METHOD BrwArtikelDrawGroupHeader( oSender, oSt, cGroup, nRecord, hDC, aRect ) CLASS TForm1

   SetTextColor( hDC, RGB( 47, 53, 65 ) )   // this does not work
   SelectObject( hDC, ::oFontBold:Handle )

RETURN Nil
Best regards, Timm
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9218
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: TBrowseMod group header text color

Mensaje por ignacio »

Hello,

Try manipulating oBrowseMod:oSupra. Is TheaderMod control.

Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Timm
Mensajes: 130
Registrado: Lun Jun 21, 2010 11:01 am

Re: TBrowseMod group header text color

Mensaje por Timm »

Hi,

manipulating oBrowseMod:oSupra did not work so I modified this:

Código: Seleccionar todo

METHOD PaintGroupHeader( hDC, nItem, aRect, nRecord ) CLASS XBrwModGrid
...
         nClrT := ::nClrText
         nClrP := ::nClrPane
         lRet  := :OnDrawGroupHeader( oSt, @cGrp, nRecord, hDC, aTmp, @nClrT, @nClrP )
...
RETURN NIL
The event OnDrawGroupFooter already has the parameters nClrText and nClrPane.
Perhaps you can add them also to OnDrawGroupHeader?

Best regards, Timm
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9218
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: TBrowseMod group header text color

Mensaje por ignacio »

Sorry. My mistake, I thought you were referring to column groupings.

I did not include those parameters on the header because I thought there were not necessary. But, no problem to include them. BTTW I prefer that hDC and aRect continue to be the last parameters even if it brakes some code (that surely will not happen). So, this will be the way that is already modified in the source code:

EVENT OnDrawGroupHeader( oSender, oSt, BYREF cGroup, nRecord, BYREF nClrText, BYREF nClrPane, hDC, aRect )

Regards
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Timm
Mensajes: 130
Registrado: Lun Jun 21, 2010 11:01 am

Re: TBrowseMod group header text color

Mensaje por Timm »

Thank you, Ignacio!
Responder