Table Field

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

bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Table Field

Post by bogs » Mon Mar 30, 2020 11:48 am

Not sure I get the problem then, they look individually colored to me :?:
Image

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: Table Field

Post by richmond62 » Mon Mar 30, 2020 11:53 am

bogs wrote:
Mon Mar 30, 2020 11:48 am
Not sure I get the problem then, they look individually colored to me :?:
Ah, but the idea of my script was JUST to colorise item 1 of row 1.

bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Table Field

Post by bogs » Mon Mar 30, 2020 12:01 pm

And... ? If you can color any other cell individually, then you can color any specific cell individually, I still don't get the problem.
Image

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: Table Field

Post by richmond62 » Mon Mar 30, 2020 12:10 pm

Well . . .

Code: Select all

on mouseUp
   put empty into fld "tf"
   set the itemDelimiter to TAB
   ------
   set the backGroundColor of item 1 of line 1 of fld "tf" to red
   put "be" into item 2 of line 2 of fld "tf"
   put "completely" into item 3 of line 3 of fld "tf"
   put "bonkers" into item 4 of line 4 of fld "tf"
   put "!!!!!!!!!!" into item 5 of line 5 of fld "tf"
end mouseUp
I wrote set the backGroundColor of item 1 of line 1 of fld "tf" to red so why did the script set ALL of the
items' backGroundColor to red?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7392
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Table Field

Post by jacque » Mon Mar 30, 2020 6:38 pm

BackgroundColor needs a character reference.

Code: Select all

set the backGroundColor of char 1 to -1 of item 1 of line 1 of fld "tf" to red
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: Table Field

Post by richmond62 » Mon Mar 30, 2020 10:19 pm

BackgroundColor needs a character reference.
Thanks. :)

Post Reply