Datagrid color woes

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10356
Joined: Wed May 06, 2009 2:28 pm

Datagrid color woes

Post by dunbarx » Wed Jun 13, 2012 5:32 am

Datagrids are great and powerful. Like Oz.

But I cannot get some to respond to commands that others do without issue. I have several datagrids in one stack, and a single DG in another. If, in the stack with one DG:

set the dgProp["hilite color"] of grp "queue1 to "red"

and then:

set the dghilitedLines of grp "queue1" to 1,

the first line in that DG turns red. Terrific.

But if I try the exact same commands to a similarly named DG in the other stack, the correct line indeed hilites, but in a dull grey. No red at all.

What am I doing wrong? It has to be some property that is getting in the way, or one not properly set. There are only about a milllion of them.

Thanks.

Craig Newman

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

Re: Datagrid color woes

Post by snm » Wed Jun 13, 2012 7:38 am

Check if the grey hilited line table is selected (focused). The color of line hilite is changing to another color if you unfocus the grid.

Marek

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10356
Joined: Wed May 06, 2009 2:28 pm

Re: Datagrid color woes

Post by dunbarx » Wed Jun 13, 2012 4:09 pm

Marek.

That was it. Thank you. I have to set the dgFocus under script control every time I want to hilite a row with a color.

I thought that since I could set the row hilite, though it was dimmed (yet another property), the DG must have had focus.

Craig Newman

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

Re: Datagrid color woes

Post by snm » Wed Jun 13, 2012 11:11 pm

Craig,

Pleasure on my side I could help this time.

Marek

Post Reply