resizeControl wishes...

Paul Dupuis paul at researchware.com
Thu Nov 30 11:05:04 EST 2023


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)."

Does anyone else really really wish that resizeControl was set when the 
control's size is changed via script? I sure do!

For example, I have cards with multiple groups of objects on them. Each 
of my groups (and sometimes sub-groups) have resizeControl handlers that 
position everything in the groups appropriately. I do this for 
portability. If I copy the group to somewhere else, the handler 
(resizeControl) that knows how everything is to be moved and resized 
goes with the copied group.

My card script has a "resizeStack" handler that just sets the rects of 
the top level groups and dispatches resizeControl to each group on the 
card after changing its rect. I really wish I could eliminate these 
"dispatch" (or send) commands. I forget to include them some times, 
simple expecting (even though I know better) that if I change the size 
(rect) of a control with a "resizeControl" handler, that that 
resizeControl handler should execute!

Anyone else wish that resizeControl would get executed if a control's 
size is changed by script? It just seems counter-intuitive that it does not.



More information about the use-livecode mailing list