Problem with resizeControl

Richard Gaskin ambassador at fourthworld.com
Sat Nov 19 12:05:18 EST 2011


One thing I've found making custom controls from groups in LC is a bit 
non-obvious but makes sense one you use it:

on resizeControl
   -- do stuff

   -- then:
   set the boundingRect of me to the rect of me
end resizeControl

The boundingRect property determines the working space of the group, 
initially added so you could define the amount of scrolling area a group 
may have independently of its internal controls.

During resize operations, in which I'm moving stuff around inside of a 
group while the group is being resized, I find it helps keep things from 
getting squirrelly.

Seems silly to have that extra line, but in many cases here it's made 
the interaction beautifully smooth.

Also, as Scott noted, you'll want to have the margins set to 0.

--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  LiveCode Journal blog: http://LiveCodejournal.com/blog.irv




More information about the use-livecode mailing list