PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → [WD18]  Change background color for a column caption
[WD18] Change background color for a column caption
Débuté par John Marrone Jr, 30 juil. 2014 14:55 - 7 réponses
Posté le 30 juillet 2014 - 14:55
Hi

I want to change the background color just for the column caption only, for a single column. I have tried myself.r1..caption..brushcolor which I knew would not work. Properties do not have properties. I have looked at the help and can not find any help on this. Maybe this can not be done in WinDev but I would think so.

If anyone could help me it would be great and you have my thanks. And if someone knows that it can not be done please let me know that if you would.
Posté le 30 juillet 2014 - 15:07
Hi John,

I think that you should try using dbackground, dpen and associated function on your caption.

Best regards
Posté le 30 juillet 2014 - 15:16
Hi Fabrice

I am talking about a columns caption in a table control. As far as I know the d????? funtions only work with an image control. The help also says this too. Am I wrong???
Posté le 30 juillet 2014 - 15:51
Hi John,

This might not be ideal, but you could give it a try :

Table1.ColumnABC..Caption = gBackground(iLightBlue)+ Table1.ColumnABC..Caption

Regards,
Bart
Posté le 30 juillet 2014 - 16:29
Hi John

If I remember correctly, you have to use the gxxx functions on the images, and the dxxx functions on the statics, lists, captions and other fields...

Now, in case it's the other way around, a 2 minutes test should solve the problem

Best regards
Posté le 30 juillet 2014 - 18:57
@Bart +1
You are correct, at least it is what I use.

Table_Adjuster.Forename..Caption = gPen(LightYellow)+Table_Adjuster.Forename..Caption Table_Adjuster.Forename..Caption = gBackground(DarkRed)+Table_Adjuster.Forename..Caption
gPen changes the colour of the caption text.
Posté le 31 juillet 2014 - 02:47
Hi

Thanks Bart, Fabrice, Derek. I got it done using the gxxx functions. I had no clue that you could use drawing functions on a table control. Thank you guys again so much.
Membre enregistré
68 messages
Posté le 31 juillet 2014 - 14:43
I had given up on coloring column headers.
Thanks for the answer! I never thought of trying graphic functions.