place backgrounds with backgroundBehavior to existing cards
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
place backgrounds with backgroundBehavior to existing cards
Hei
how I can place backgrounds with backgroundBehavior to existing cards?
If I create new cards this backgrounds will be placed automatical to the new card and they have all the same ID.
As I created many cards with very different functionality but I would like to add new background with backgroundBehavior, it looks so that I need to create new card and copy all object and scripts to the new card ...
is ther no way to palce it easy to existing cards? any suggestions?
thanks
how I can place backgrounds with backgroundBehavior to existing cards?
If I create new cards this backgrounds will be placed automatical to the new card and they have all the same ID.
As I created many cards with very different functionality but I would like to add new background with backgroundBehavior, it looks so that I need to create new card and copy all object and scripts to the new card ...
is ther no way to palce it easy to existing cards? any suggestions?
thanks
ueliweb
-
- VIP Livecode Opensource Backer
- Posts: 3990
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: place backgrounds with backgroundBehavior to existing ca
Hei,
you can add manually backgrounds to existing cards by going to that card and then in the menu Object menuitem Place Group will be enabled. It offers you to place any of your backgrounds that are not already on the card.
Alternatively you can use the place command to add a background to an existing card
See "place" command in the dictionary.
Kind regards
Bernd
you can add manually backgrounds to existing cards by going to that card and then in the menu Object menuitem Place Group will be enabled. It offers you to place any of your backgrounds that are not already on the card.
Alternatively you can use the place command to add a background to an existing card
Code: Select all
on mouseUp
go card 3
place background "myBackGround" onto this card
go card 1
end mouseUp
Kind regards
Bernd
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: place backgrounds with backgroundBehavior to existing ca
Hi ueliweb
Salut Bernd,
work also
Best regards
Jean-Marc
Salut Bernd,
Code: Select all
place group "Mygrouo" onto cd 2
Best regards
Jean-Marc
Last edited by jmburnod on Thu Feb 16, 2012 10:20 am, edited 2 times in total.
https://alternatic.ch
Re: place backgrounds with backgroundBehavior to existing ca
Bernd,
Jean-Marc,
Thanks very much!
Just to now how the key word to find it.
Whereas I wrote 'place' in this topic I diden't searched with it befor
Now I found it also in the LC User Guide ...
Jean-Marc,
Thanks very much!
Just to now how the key word to find it.
Whereas I wrote 'place' in this topic I diden't searched with it befor
Now I found it also in the LC User Guide ...
Last edited by ueliweb on Thu Feb 16, 2012 11:50 am, edited 1 time in total.
ueliweb
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: place backgrounds with backgroundBehavior to existing ca
Hi ueliweb
Bernd is right (one more)
work if the group is not a background
but not if it is a background
Best regards
Jean-Marc
Bernd is right (one more)
Code: Select all
place group "Mygrouo" onto cd 2
but not if it is a background
Best regards
Jean-Marc
https://alternatic.ch
Re: place backgrounds with backgroundBehavior to existing ca
Bonsoir Jean-Marc,
no matter if "Mygroup" is a group or a (group with) background (behavior)!
The difference between "group" and "background" is just the way LiveCode sees and counts ALL groups!
If you:
you will get the number of groups of the CURRENT card where the script is executed!
If you:
you will get the number of ALL groups in the current stack where the script is executed, background behavior set or not!
Isn't it amazing?
Best
Klaus
yes, but this will work:jmburnod wrote:work if the group is not a backgroundCode: Select all
place group "Mygroup" onto cd 2
but not if it is a background
Code: Select all
place bg "Mygroup" onto cd 2
The difference between "group" and "background" is just the way LiveCode sees and counts ALL groups!
If you:
Code: Select all
put the number of groups
If you:
Code: Select all
put the number of backgrounds
Isn't it amazing?
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: place backgrounds with backgroundBehavior to existing ca
Guten Abend Klaus,
Yes, i tried that after my second post, but you're faster
Best from Geneva
Jean-Marc
Code: Select all
place bg "Mygroup" onto cd 2
Best from Geneva
Jean-Marc
https://alternatic.ch
-
- Posts: 38
- Joined: Mon Jan 03, 2011 5:42 pm
- Location: Switzerland, Burgdorf
Re: place backgrounds with backgroundBehavior to existing ca
Guten Tag Klaus
And why
place bg "mygroup" does function and place background "mygroup" does not?
Best, Fredi
And why
place bg "mygroup" does function and place background "mygroup" does not?
Best, Fredi
Re: place backgrounds with backgroundBehavior to existing ca
Hi Fredi,
If you mean the difference between "group" and "background", see my post above.
Best
Klaus
bg = background!?place bg "mygroup" does function and place background "mygroup" does not?
If you mean the difference between "group" and "background", see my post above.
Best
Klaus
-
- Posts: 38
- Joined: Mon Jan 03, 2011 5:42 pm
- Location: Switzerland, Burgdorf
Re: place backgrounds with backgroundBehavior to existing ca
Hi Klaus
Yes, when I write "bg" (for background) then it does function but when I write "background" it does not. But it does move the group to the new card and I like only to copy the group??? I have several different groups on a card "vorlagen". Then I add a new card and I want to copy one of the groups on this card (it depends the type of the card). How I have to made it? Thanks.
Regards, Fredi from Switzerland
Yes, when I write "bg" (for background) then it does function but when I write "background" it does not. But it does move the group to the new card and I like only to copy the group??? I have several different groups on a card "vorlagen". Then I add a new card and I want to copy one of the groups on this card (it depends the type of the card). How I have to made it? Thanks.
Regards, Fredi from Switzerland
Re: place backgrounds with backgroundBehavior to existing ca
Grüezi Fredi,
It is in fact the SAME group!
If you really want to copy a group, well then:
...
copy grp "xyz" of cd "vorlagen" to cd 2
...
should do the trick
Best
Klaus
Really??? Lazy moi alway uses the abbreviations, so I never noticed hisfredigertsch wrote:Hi Klaus
Yes, when I write "bg" (for background) then it does function but when I write "background" it does not.
It does not move the group! It is still on the original card but also on the new card where you placed it.fredigertsch wrote:...But it does move the group to the new card and I like only to copy the group?
It is in fact the SAME group!
You already mentioned it!fredigertsch wrote:I have several different groups on a card "vorlagen". Then I add a new card and I want
to copy one of the groups on this card (it depends the type of the card). How I have to made it? Thanks.
Regards, Fredi from Switzerland
If you really want to copy a group, well then:
...
copy grp "xyz" of cd "vorlagen" to cd 2
...
should do the trick
Best
Klaus
-
- Posts: 38
- Joined: Mon Jan 03, 2011 5:42 pm
- Location: Switzerland, Burgdorf
Re: place backgrounds with backgroundBehavior to existing ca
Thank you Klaus - you are right.