Changing Properties of All Fields in a Group

Steven Axtell saxtell at neb.rr.com
Mon Jun 2 22:48:40 EDT 2008


Ken,

Thanks for the help.  I'll check it out.

Steve

>
> The answer is "yes", and "sort of". Rev uses an inheritance model for
> properties, so if you set a property of an object to empty, it will 
> inherit
> the property setting from its container.
>
> So in order to do this, you'd need to have all the fields in the group 
> have
> *no* textColor, and then set the textColor of the group. However keep in
> mind that this will affect the group itself as well, so if you're showing
> the name of the group as well, it will also change to the same textColor.
>
> You can test this in a sample stack by dragging out two fields, set their
> contents (but *not* their text color), grouping them, and then setting the
> foreground color of the group to red - you'll see the text in the fields
> turn red.
>
> If you've already assigned text colors to a field, you can empty it out 
> and
> inherit from its container by clicking the "clear" button in the Inspector
> palette next to "Text".
>
> One final thing - if you need to find out in script what text color is in
> use in the field, you can't just do:
>
>  put the textColor of <fieldDescriptor> into tMyVar
>
> because this will set tMyVar to empty (""). In order to find out what it
> inherited, you need to use the "effective" keyword:
>
>  put the effective textColor of <fieldDescriptor> into tMyVar
>
> Of course, if you can't use inheritance in your specific instance, there 
> is
> no single way to set the textColor for multiple fields; you'd need to use 
> a
> repeat loop.
>
> HTH,
>
> Ken Ray
> Sons of Thunder Software, Inc.
> Email: kray at sonsothunder.com
> Web Site: http://www.sonsothunder.com/
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 





More information about the use-livecode mailing list