Alternating Column Colors?

Phil Davis revdev at pdslabs.net
Mon Jan 31 16:03:24 EST 2011


I don't think so - the fields don't exist until you put some data into the grid.
Phil


On 1/31/11 8:51 AM, Bob Sneidar wrote:
> Wait, you can do this even if there is no data if the data grid?
>
> Bob
>
>
> On Jan 29, 2011, at 11:25 AM, Phil Davis wrote:
>
>> Scott,
>>
>> Each cell in a data grid is a field, so it seems like it should be doable.
>>
>> I created a DG and put some data in it. Then I did this from msg:
>>
>> put the number of flds in selobj -- DG was selected
>> -->  57
>>
>> put the name of fld 44 of selobj
>> -->  field "Status 0008"
>>
>> My DG has a column named "Status".
>>
>> After further poking around, I see:
>> - each DG cell is a field
>> - the number of fields is related to the display rect of the DG, not to the number of lines of data in it
>> - fields are recreated when the DG's data is changed
>> - every field in the DG has a style of 'transparent'
>> - you can set a field's style to opaque and then any backColor you apply to it will show up
>> - the style changes you make seem to stick until the DG data is changed
>>
>> Maybe some of the above will help you on your way.
>>
>> Phil
>>
>>
>>
>> On 1/28/11 3:54 PM, Bob Sneidar wrote:
>>> Oh cool! Then you could make a chess or checkers game! I get it!
>>>
>>> I read the API and none of the properties suggests you can do this. I think you will have to find the part of the parent script that draws the cells and change the background color on each one individually for odd or even rows.
>>>
>>> The problem will then become, what happens if there is no data? Rows get colored even if there is no data, but no actual cells (cloned fields) get created until there is data.
>>>
>>> I tried to edit the row template and put a colored square over the gray bar, but mine is a table not a form. You might be able to do it in a form, I'm not sure. At any rate it didn't work for me.
>>>
>>> Bob
>>>
>>>
>>> On Jan 28, 2011, at 1:55 PM, Scott Rossi wrote:
>>>
>>>> Hi List:
>>>>
>>>> The data grid nicely incorporates alternating line colors.  But does anyone
>>>> know if it's possible to make alternating column colors or cell colors?
>>>>
>>>> I'm building a control that has a horizontal scrolling data grid with only
>>>> one row.  I'd like to be able to set alternating colors for cells or columns
>>>> in the row.  Possible?
>>>>
>>>> Thanks&   Regards,
>>>>
>>>> Scott Rossi
>>>> Creative Director
>>>> Tactile Media, UX Design
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>> -- 
>> Phil Davis
>>
>> PDS Labs
>> Professional Software Development
>> http://pdslabs.net
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>

-- 
Phil Davis

PDS Labs
Professional Software Development
http://pdslabs.net





More information about the use-livecode mailing list