Thanks, but no, I can't do that. lock messages will prevent the
"resizeControl" being fired for any sub-groups whose co-ordinates get
changed, so it would prevent proper layout for them. 'lock messages' is
good if you have all your controls directly re-positioned within your
resize handler - but disallows hierarchy (which is the feature I'm
trying to take advantage of here).
lock screen is of course a good optimization - thanks.
Alex.
On 03/05/2020 15:26, ha...@exformedia.se wrote:
You probably need to lock messages in the beginning of your
resizeControl. Otherwise the group will adapt to your resizing of your
controls. I usually begin with both lock messages and lock screen, but
the last is more for optimization.
Håkan
On 3 May 2020, 16:22 +0200, Alex Tweedly via use-livecode
<use-livecode@lists.runrev.com>, wrote:
I realized after the discussion last week about resizing that I was
missing the benefits of "resizeControl" being sent to each group, so I
changed one of my resize handlers to make use of groups (adding a few
groups along the way).
And it all went wrong :-(
Eventually I traced it down to the following ... and don't know if I'm
missing something or if I've bumped into a bug.
The resize handler is
on resizeControl
set the width of field "list titles" of me to the width of me - 20
put "B" && the rect of me && the bottom of me &CR after msg
set the left of field "list titles" of me to 10
put "C" && the rect of me && the bottom of me &CR after msg
local tR
put 10, the top of me, the right of me -10, the bottom of me-10
into tR
set the rect of fld "List" of me to tR
end resizeControl
Note the two "put ... msg" statements. - for no reason I can figure out,
the "bottom of me" changes between these two statements. Here's the
output from the message box:
B 5,32,331,468 468
C 6,32,325,2618 2618
B 5,32,331,471 471
C 5,32,320,2622 2622
B 5,32,331,473 473
C 5,32,320,2626 2626
If I comment out that "set the left of ..." statement, all apparently
works as expected.
Why should setting the 'left' of a control change the bottom of its
enclosing group ?
And why change it to an apparently silly value ?
-- Alex.
_______________________________________________
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
_______________________________________________
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