[WD18] - Setting a table column background colour

Startbeitrag von JP am 17.03.2014 16:39

Hi All

I can set the background (brushcolor) of a table cell easily by referencing it as per:

TABLE_Name[ nRow_Number ].COL_Name..BrushColor = rgb( n,n,n)

However, is there a way to set the entire column in one go without having to reference each individual row ?




I would try Col_Name..Brushcolor=value

Best regards

von Fabrice Harari - am 17.03.2014 18:36
Thanks for the response, Fabrice, but sadly this does not seem to work. Using the COL control on its own or referenced via the table parent control seems to have no effect. No error is generate but also the table does not change the columns background colour.

Is there perhaps a specific place this line must be issued from? I have tried in the init code as well as after the table has been populated but no luck.

von JP - am 17.03.2014 19:12
Hello JP

I normally use the column number to set the colour as :

table[table][1]..brushcolor = ILghtRed

You can also put code into the column init section as:
Myself..brushcolor = ILghtRed


von Al - am 17.03.2014 21:22
Hello JP,

try this in the Intializing of the column
MySelf..BrushColor = RGB(123,226,244)


von DW - am 17.03.2014 21:24
Thanks Al and DW, your solutions both work.

It seems I got lost in the fog of war coding yesterday because this below (Fabrice's original suggestion) also works although I was sure I had tried it before asking:

TABLE_Name.COL_Name..BrushColor = rgb( n,n,n)

Guess the day was getting too long :)

Thanks everyone!

von JP - am 18.03.2014 07:21
Hi Fabrice, apologies but your solution does work. I dont know why it didnt seem to work for me yesterday, maybe too tired or got distracted or some other thing. Thanks anyway.

von JP - am 18.03.2014 07:42
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.