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

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Lagi Pittas
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 366
Joined: Mon Jun 10, 2013 1:32 pm

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

Post by Lagi Pittas » Wed Feb 04, 2015 8:05 pm

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
Last edited by Lagi Pittas on Thu Feb 05, 2015 1:19 am, edited 1 time in total.

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Setting the field Background color in a datgrid

Post by Klaus » Wed Feb 04, 2015 10:07 pm

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

Lagi Pittas
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 366
Joined: Mon Jun 10, 2013 1:32 pm

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

Post by Lagi Pittas » Thu Feb 05, 2015 12:05 am

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

Post Reply