storing a group as a customProperty

Peter Brigham MD pmbrig at gmail.com
Mon Mar 23 15:06:40 EDT 2009


Fantastic! Cantselect -- I learn something new all the time....
Actually setting the cantselect of the group to true keeps all its  
component controls from being selected, so I don't even have to do  
them individually. Solves the problem nicely. Thanks, and thanks to  
Jacque, who responded with a briefer version of the same thing.

Peter M. Brigham
pmbrig at gmail.com

On 3/22/09, Terry Judd  wrote:

> If you set each of the controls' cantselect to true then you can  
> select the
> group but not the individual controls (even with the  
> selectgroupedcontrols
> set to true). So long as the cantdelete of the group is set to true  
> then the
> controls will be 'protected' from a delete.
>
> Terry...
>
>
> On 23/03/09 12:28 PM, "Peter Brigham MD" <pmbrig at gmail.com> wrote:
>
>> But if a group's cantDelete property is true, it protects the group
>> from being deleted but not its contents. Doing a "select all" and  
>> then
>> hitting the delete key deletes the objects themselves, no matter if
>> the group's cantDelete property is true or false. And in that case  
>> the
>> group is not deleted (no matter if the group's cantDelete property is
>> true or false) -- it just has no controls in it any more. There is no
>> cantDelete property for controls themselves.
>>
>> I'll have to store the group in a stack and store the stack in a
>> customProp.
>>
>> Peter M. Brigham
>> pmbrig at gmail.com
>>
>> On 3/22/09, Richard Gaskin  wrote:
>>
>>
>>> Peter Brigham wrote:
>>> Is there a way to store a background group of buttons as a
>>> customProperty of a stack? I am trying to cover the possibility  
>>> (in a
>>> utility) that a user in the IDE might do a "select all" and delete  
>>> all
>>> controls on a card, and I want to ensure that I can easily place the
>>> deleted buttons back on the card again as a background group. If
>>> there's a way to store the group as a customProp that would be the
>>> easiest way of preserving it -- then I could just retrieve the group
>>> and place it again.
>>>
>>> You should be able to prevent such deletion by setting the group's
>>> cantDelete property.
>>>
>>> --
>>> Richard Gaskin
>>> Fourth World



More information about the use-livecode mailing list