textColor not working in DataGrid?

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
snm
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 253
Joined: Fri Dec 09, 2011 11:17 am

textColor not working in DataGrid?

Post by snm » Sun Nov 17, 2013 7:31 pm

I'm trying to set colour of the text in DataGrid in FillInData handler, and it doesn't work. In the same handler I can change the style of text in DataGrid:

Code: Select all

on FillInData pData
   set the uText of me to pData
   set the text of me to the uText of me
   set the textStyle of me to "bold"         --> working
   set the textColor of me to 0,255,0        --> doesn't work
   set the textColor of me to "red"          --> doesn't work
   TruncateTail the short id of me, "..."
end FillInData
Is it the bug, or I do some mistake?

Marek

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: textColor not working in DataGrid?

Post by Simon » Sun Nov 17, 2013 8:55 pm

Hi Marek,
Here is the datagrid lesson for color text:
http://lessons.runrev.com/s/lessons/m/d ... in-a-table
Is that what you are looking for?

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

snm
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 253
Joined: Fri Dec 09, 2011 11:17 am

Re: textColor not working in DataGrid?

Post by snm » Sun Nov 17, 2013 9:33 pm

Hi Simon,

No, I'm not so lazy :wink:

I know tis lesson. It shows how to change ALL the row of table to red colour using'line has error". I need to set the textColor to particular cells and to particular colours. Can't find the solution. I can only change the textStyle (it's working as expected). Both properties should work in FillInData handler of "custom column behavior", as it's addressed to field as control (me).

I hope it's only bug, not missing future. I'm working on Mac 10.8, LC 6.1.3

Marek

snm
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 253
Joined: Fri Dec 09, 2011 11:17 am

[Solved]: textColor not working in DataGrid?

Post by snm » Sun Nov 17, 2013 10:59 pm

Working :D

After rewriting the script started to work. Strange.

Marek

Post Reply