Page 1 of 1

[SOLVED]-Setting the field Background color in a datgrid

Posted: Wed Feb 04, 2015 8:05 pm
by Lagi Pittas
Hi

I have managed to change all but one of the properties of the fields/cells in a grid.

Basically using the "column name 000x" in a button

set the textalign of field "Col2 0003" of group "dg2" to "CENTER" <-- works
set the textcolor of field "Col2 0002" of group "dg2" to "RED" <-- works
set the hilitecolor of field "Col2 0004" of group "dg2" to "RED" <-- nope?
set the backcolor of field "Col2 0003" of group "dg2" to "RED" <-- Nope or even backgroundcolor

I have switched off alternate row colours just in casae and it still doesnt work. To save me another few hours of spelunking could anyone (Klaus are you listening? :P ) tell me if this is possible and what am i doing wrong?

I have of course managed to do it using standard fields with the field name name - set the backgroundcolor of field "anyfield" to "cyan"

Kinderst Regards Lagi

Re: Setting the field Background color in a datgrid

Posted: Wed Feb 04, 2015 10:07 pm
by Klaus
Hi Lagi,
Lagi Pittas wrote:Klaus are you listening? :P
yes, but I think it's a trap! :D

Since the "internals" (what exactly a datagrid group consists of) are not documented at all,
I never bothered to examnie how to address single objects in there, sorry.
Lagi Pittas wrote:...
set the textalign of field "Col2 0003" of group "dg2" to "CENTER" <-- works
set the textcolor of field "Col2 0002" of group "dg2" to "RED" <-- works
set the hilitecolor of field "Col2 0004" of group "dg2" to "RED" <-- nope?
set the backcolor of field "Col2 0003" of group "dg2" to "RED" <-- Nope or even backgroundcolor
...
## But try this, maybe the fields are transparent:
set the opaque of field "Col2 0003" of group "dg2" to true
...

Best

Klaus

[SOLVED] -Setting the field Background color in a datgrid

Posted: Thu Feb 05, 2015 12:05 am
by Lagi Pittas
Thanks Klaus

Setting the opaque to TRUE did the trick

oops! I typed false in the original post but am confirming that setting opaque to TRUE as Klaus suggested works.


Thanks again

Lagi