Set Line color in dG?

William Prothero waprothero at gmail.com
Tue Jun 16 19:08:09 EDT 2020


Zryp:
Ahhhhh, now I get it.  Thanks for your patience. 
Best,
Bill

William A. Prothero
https://earthlearningsolutions.org

> On Jun 16, 2020, at 2:11 PM, zryip theSlug via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Assuming the lesson you have taken in example is the following:
> http://lessons.livecode.com/m/datagrid/l/7332-how-can-i-colorize-individual-lines-in-a-table
> 
> Code for coloring rows is located in the button "My column default
> behavior".
> The code you shared is located in the "toggle line 3 color" but it is not
> enough for coloring a datagrid row. Having a row in color is not a standard
> datagrid feature. So that is the reason you have to change the  "default
> column" behavior script of your datagrid.
> 
> Do you have copied the  "My column default behavior" button in your project
> and if yes, do you have linked your datagrid to this button by using the
> code?
> 
> set the dgProp["default column behavior"] of grp "myDatagrid" to the long
> id of btn " My column default behavior " or what ever you named your column
> behavior script button.
> 
> where  "myDatagrid" is the name of your datagrid.
> 
> Hope I'm more clear in my explanation.
> 
> 
> Best Regards,
> 
> On Tue, Jun 16, 2020 at 10:08 PM Prothero-ELS via use-livecode <
> use-livecode at lists.runrev.com> wrote:
> 
>> Zryp,
>> Crap, accidentally sent the response without finishing.
>> 
>> I was checking that the code in my test button was actually talking to the
>> datagrid in question, and it returned the correct values, so I assumed it
>> was.
>> 
>> I don’t understand how “myBtn” would participate. I need to change colors
>> from some other script.
>> 
>> Best,
>> Bill
>> 
>> William Prothero
>> https://earthlearningsolutions.org
>> 
>>> On Jun 16, 2020, at 1:04 PM, Prothero-ELS <
>> prothero at earthlearningsolutions.org> wrote:
>>> 
>>> Zryp,
>>> What I wanted to do is make a distinction between data that was
>> retrieved from a database and data that was entered but not yet stored. A
>> datagrid is. Way overkill for what I’m doing, but .... the button that
>> accesses the datagrid data to get the specific line is for testing only.
>>> 
>>> William Prothero
>>> https://earthlearningsolutions.org
>>> 
>>>> On Jun 16, 2020, at 12:52 PM, zryip theSlug via use-livecode <
>> use-livecode at lists.runrev.com> wrote:
>>>> 
>>>> Bill,
>>>> 
>>>> The example you mention is probably using a custom column behavior
>> script
>>>> for accomplishing this.
>>>> Do you have copied the button in your project? The button must be
>> linked to
>>>> your datagrid by using the following code:
>>>> 
>>>> set the dgProp["default column behavior"] of grp "myDatagrid" to the
>> long
>>>> id of btn "myBtn"
>>>> 
>>>> 
>>>> Best Regards,
>>>> 
>>>> 
>>>>> On Tue, Jun 16, 2020 at 8:55 PM William Prothero via use-livecode <
>>>>> use-livecode at lists.runrev.com> wrote:
>>>>> 
>>>>> Folks:
>>>>> I’m having trouble getting the line color of a dataGrid to change. The
>>>>> lessons shows a very simple tutorial and the download example works.
>>>>> However, in my application, it doesn’t.
>>>>> 
>>>>> The code is:
>>>>> on mouseup
>>>>> 
>>>>>  put the dgDataOfLine[3] of group "meterReadings" of this cd into
>>>>> theDataA
>>>>> 
>>>>>  put not theDataA["line has error"] into theDataA["line has error"]
>>>>> 
>>>>>  set the dgDataOfLine[3] of group "meterReadings" of this cd to
>> theDataA
>>>>> 
>>>>> end mouseup
>>>>> 
>>>>> I get the expected values for the line shown on the datagrid, but the
>>>>> color doesn’t change. I’m running Catalina 10.15.5 on a pretty new Mac
>>>>> laptop. I’m using livecode 9.6.0 Business.
>>>>> 
>>>>> The mystery is that the downloaded example works as expected, but not
>> on
>>>>> my app.
>>>>> 
>>>>> Have I missed something?
>>>>> 
>>>>> Best,
>>>>> Bill
>>>>> 
>>>>> 
>>>>> William A. Prothero
>>>>> https://earthlearningsolutions.org
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> 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
>>>>> 
>>>> 
>>>> 
>>>> --
>>>> Zryip TheSlug
>>>> http://www.aslugontheroad.com
>>>> _______________________________________________
>>>> 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
>> 
> 
> 
> -- 
> Zryip TheSlug
> http://www.aslugontheroad.com
> _______________________________________________
> 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





More information about the use-livecode mailing list