Page 1 of 1

Datagrid, color a line without using backgroundcolor[SOLVED]

Posted: Tue May 20, 2014 10:06 am
by Nicke
Hi,

I posted about my issue in the beginners forum (http://forums.runrev.com/viewtopic.php?f=7&t=20320) but I didn't get an answer if it is possible in LC to do what I want.

Can I change the backgroundcolor of a line in a datagrid in the same way that "Alternate Row Colors" does? If I use backgroundcolor I can not see when I choose the row "hilite" because the hilite is not visible (probably because opaque is true).

I'm making an interface for a playout server and I want to show the line that is currrently playing to be marked with a darker red color so that the user can see it but still be able to scroll up/down in the datagrid (with the hilite on the chosen line).

Code: Select all

on mouseUp
   repeat with x = 1 to 4
      set the opaque of field ("Col" && x &&  "0002") of grp "DG1" to true
      set the backgroundColor of field ("Col" && x &&  "0002") of grp "DG1" to "green"
   end repeat
end mouseUp
BR Nicke

Re: Datagrid, color a line without using backgroundcolor

Posted: Tue May 20, 2014 5:22 pm
by dunbarx
Hi.

Does the topic on p. 165 of the DG user guide help?

Craig Newman

Re: Datagrid, color a line without using backgroundcolor

Posted: Wed May 21, 2014 4:09 pm
by Nicke
Craig,

not really since it only colors the text. I want to change the backgroundcolor and opacity so that it looks like "Alternate Row Colors" but with an other color.

Is it possible or should I forget about LC in cases like this and return to python/Qt?

BR Nicke

Re: Datagrid, color a line without using backgroundcolor

Posted: Wed May 21, 2014 11:33 pm
by Simon
Hi Nicke,
I've just had a thought :idea:
In the template row wouldn't you just add another graphic on top of the background?

Simon

Re: Datagrid, color a line without using backgroundcolor

Posted: Thu May 22, 2014 8:32 pm
by Nicke
Hi Simon,

I have to look into that. Looked at a few tutorials about customizing the template row and it might be the right way to go. Datagrids are so hard to understand...

Thanks!

Re: Datagrid, color a line without using backgroundcolor

Posted: Thu May 22, 2014 9:17 pm
by bangkok
Have a look at the enclosed stack.

It uses this lesson :
http://lessons.runrev.com/m/datagrid/l/ ... -to-a-cell

And changes the DGhilite.

Re: Datagrid, color a line without using backgroundcolor

Posted: Fri May 23, 2014 7:49 am
by Nicke
Yes, that was the way to do it! Thanks bangkok!!!