Scripting of buttonproducing field to give buttons backgroundBehavior

Bob Hartley rev at
Sun Jan 23 06:32:57 EST 2005

At 01:16 23/01/2005, you wrote:

>I have met with the problem, that the handler of a field, which shall 
>enable user to produce pre-scripted buttons, is able to produce the 
>buttons with the scripts required, and place them where they shall be 
>placed, - but all attempts  to, after "group"  "set  backgroundBehavior to 
>true" is failing. Best would be, if they could be set to include 
>themselves, as they are produced - now and then-by the user, in one big 
>shared group. Anybody have a solution?

Hi there

You could always make a button on one stack that groups all buttons on 
"yourStack" and sets the background to true using this script.

on mouseUp
   repeat with i=1 to the number of controls of card 1 of stack "yourStack"
   put the long ID of control i of cd 1 of  stack "yourStack"&&"and"&space 
after theControls
end repeat
delete word -1 of theControls
put "group"&&theControls into toDoList
do toDoList
set the backgroundbehavior of the last group of cd 1 of stack "yourStack" 
to true
end mouseUp

If you wanted the button on the same stack then you could always set that 
button to hide after execution.

see revonline - user - nijinsky - and the stack "group all fields via button"


No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.2 - Release Date: 21/01/2005

More information about the Use-livecode mailing list