clipsToRect property (was Re: Instantiaing Grouped Controls - Templates - Responsive)
Monte Goulding
monte at appisle.net
Wed Jun 14 02:00:27 EDT 2017
> On 14 Jun 2017, at 3:21 pm, J. Landman Gay via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> I wonder why we have both lockUpdates and boundingRect. They seem very similar.
Lock updates is intended to avoid recalculation of group properties when child object properties are changed. The general idea is:
set the lockUpdates of group X to true
repeat
— lots of stuff modifying group content here
end repeat
set the lockUpdates of group X to false
It is not saved with the stack as it’s intended to be transient.
So if that’s not clear from the docs we probably have a docs bug.
I usually avoid boundingRect because you need to remember to update it if you change the group rect. clipsToRect is basically the same as:
on resizeControl
set the boundingRect of me to the rect of me
end resizeControl
Cheers
Monte
More information about the use-livecode
mailing list