On 30/11/2023 16:05, Paul Dupuis via use-livecode wrote:
resizeControl is sent "only sent when the user resizes a control by dragging its handles. It is not sent if a handler changes the size of a control by changing its properties (width, height, and so on)."

Basically, that dictionary entry is wrong.

If you *change* the size of a group by script, then that group *does* receive a resizeControl message.

Note that it does *not* receive a mesage just because the rect changes - only if the size changes.

So if you do something like

   repeat 10 times
       add 1 to X
       set the rect of grp "A" to X,Y, X+100, Y+100
   end repeat

then grp "A" will get either 0 or 1 message (from the first time through the loop).

If you do

   repeat 10 times
       add 1 to X
       set the rect of grp "A" to 100,Y, X+100, Y+100
   end repeat

it will receive either 9 or 10 messages.

So, essentially I think, your wish is already true :-)

Alex.

(Yes, tested pretty thoroughly in 10.0DP6 but I believe also true in earlier versions; I had to re-test this two days ago while playing with the recent benchmarking of groups vs cards).



_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to