script to place group into group

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
monki
Posts: 59
Joined: Tue Dec 13, 2011 10:56 pm

script to place group into group

Post by monki » Wed Mar 22, 2017 11:44 pm

The place command can place a group onto different cards, is there a similar command for placing a group into another group, something like: place "Group 2" into "Group B"?

Klaus
Posts: 14198
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: script to place group into group

Post by Klaus » Thu Mar 23, 2017 12:10 pm

Hi Monki,

no, unfortunately there isn't.

This should work, of my head, so better make a test first! :D

Code: Select all

...
## "group1" need to get into "group2"
lock screen
select grp "group1"
CUT
start editing group "group2"
PASTE
stop editing group "group2"
unlock screen
...
Best

Klaus

monki
Posts: 59
Joined: Tue Dec 13, 2011 10:56 pm

Re: script to place group into group

Post by monki » Thu Mar 23, 2017 4:31 pm

Klaus wrote:Hi Monki,

no, unfortunately there isn't.

This should work, of my head, so better make a test first! :D

Code: Select all

...
## "group1" need to get into "group2"
lock screen
select grp "group1"
CUT
start editing group "group2"
PASTE
stop editing group "group2"
unlock screen
...
Best

Klaus
Thanks, Klaus. That should work.

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: script to place group into group

Post by jmburnod » Thu Mar 23, 2017 7:15 pm

That should work.
Klaus's brain works like a charm
It tested (script, not Klaus's brains) and it works fine. 8)
I suggest to check if sharedbehavior or backgroundbehavior of groups = true
Best regards
Jean-Marc
https://alternatic.ch

Post Reply