Setting visible of control within group to false
James Hurley
jhurley0305 at sbcglobal.net
Sun Oct 2 16:24:19 EDT 2011
Scott,
Thanks for your reply.
My mistake. It is not removed from the group. What happens is that the dimensions of the group change when an outside control is made invisible.
My script did something line this:
--With the outside button invisible
set the visible of button "myButton" to true -- this is an outside button
put the loc of group "myGroup" into tGroupLoc
--do some stuff
set the visible of button "myButton" to false --This is an outside button
set the loc of group "myGroup" to tGroupLoc -- And this is a NEW location due to the shrinkage of the group size.
This is remedied by including everything within a rectangle (of zero line size). This way the dimensions of the group remain intact.
Another alternative, I see, would be to set the visible to false AFTER reseting the group location--reverse the order of the last two steps. This expands the group size to include the now visible button.
Jim
> Jim:
>
> Are you sure the control gets physically placed outside the group? Are you
> using any scripts to manipulate object layers?
>
> Doing a quick test here with a single object in a group, I don't see your
> result (v4.6.4). The rect of a group does indeed "collapse" to encompass
> only its visible contents, but the hidden object/s should continue to remain
> part of the group. If you're seeing something else, it would be good know
> what the circumstances are.
>
> Regards,
>
> Scott Rossi
> Creative Director
> Tactile Media, UX Design
>
>> Recently, James Hurley wrote:
>>
>> Is this supposed to happen? When I set the visible of a control within a group to false, it is removed from the group.
>>
>> As a work-around I find that if I include a rectangle that physically
>> encompasses everything in the group and THEN set the visible of a control within the rectangle to false, it remains in the group.
>>
>> >
>> Jim
>>
More information about the use-livecode
mailing list