Setting fonts

Ken Ray kray at sonsothunder.com
Thu Jul 7 15:04:48 EDT 2005


>> I have successfully used a frontScript that would trap preOpenCard
>> and then
>> repeat through all of the fields and set their text attributes to a
>> known
>> common value, but also checking a custom property of the fields to
>> see if
>> special handling should occur for a particular field. It works
>> really fast,
>> and isn't too many lines of code.
>> 
> 
> Cool. But (1) what about "special handling" that affects not a whole
> field but some chunks within the field? And (2) doesn't this approach
> take an awful lot of (that is, potentially a noticeable amount of) time?

Well, (1) if you needed to do that, you'd have to store the chunk you wanted
to affect and how you wanted to affect it, like a custom property with:

  1,5,bold
  6,20,italic

which would make the first 5 chars bold and the next 15 chars italic (I
know, a bad example, but you know what I mean).

(2) No, it doesn't (surprisingly). I have screens with a hundred+ objects on
it and executing even something that repeats through the fields and sets
their text attributes is very fast. Rev is well-suited to do this kind of
stuff, it seems.








More information about the use-livecode mailing list