Page 1 of 1

Group with controls including effects

Posted: Wed Apr 26, 2023 8:06 pm
by mhsu
Is there a way to get groups to consider the size of effects (eg Drop Shadow, OuterGlow, etc.) of controls?
Livecode groups will cut off the shadow effect if the group's margin isn't large enough, and groups don't take any effect size into account.

I see that there are a couple feature requests that look like they were not implemented:
#8688 and #10360

Barring that, is there a way to get the rect of a control including any effects ?
Both the rect and the effective rect of the control do not include any effects.

Re: Group with controls including effects

Posted: Wed Apr 26, 2023 8:31 pm
by richmond62
I am not sure what you mean: here are 2 groups that are exactly the same except in the lower one
the group's border is visible.

You will see that the outer glow effects of the images extend beyond the borders of the group
without any problems:
-
SShot 2023-04-26 at 22.29.58.png
-

Re: Group with controls including effects

Posted: Wed Apr 26, 2023 9:33 pm
by mhsu
In your example, the effects are applied to the group. I'm talking about when the controls have the effect, and the group itself does not.

This becomes an issue if you have a group that has some controls with a shadow effect, and others that don't have a shadow. In that case, you can't apply the shadow to the entire group, you have to apply it to the controls inside the group, but then you run into the issue where the group cuts off the shadow.

Re: Group with controls including effects

Posted: Wed Apr 26, 2023 11:23 pm
by bn
Hi mhsu,

You could try to set the "clipsToRect" property of the group to true and then manually adjust the dimensions of the group.
You can turn this property on in the Property Inspector for the group in the "Position" tab.

ClipsToRect is similar to "lockLoc" but you can change the dimensions of the group manually.

But this is not done automatically since drop shadow etc. are not part of any formatted width/height of a control.

Kind regards
Bernd

Re: Group with controls including effects

Posted: Wed Apr 26, 2023 11:50 pm
by mhsu
OK, yeah, I guess that's the only solution. Thanks!