How to add a second Background to lots of cards?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
MouseUp
Posts: 41
Joined: Sun Feb 14, 2010 3:41 pm

How to add a second Background to lots of cards?

Post by MouseUp » Fri Feb 26, 2010 4:05 am

Another simple stupid question...

I want to add an additional separate background to a stack with lots of existing cards. I want this new background to be on all the cards (not just new ones I create later).

I cannot figure out how to do this. Grrrr. Please help!
Thanks,

MouseUp

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

Re: How to add a second Background to lots of cards?

Post by Klaus » Fri Feb 26, 2010 11:21 am

Hi mouseup,

write a simple repeat loop to "place" the new bg "onto" all of your cards.

Code: Select all

...
repeat with i = 1 to the num of cards
  if there is not a group "name of new bg here" of cd i then
     place bg "name of new bg here" onto cd i
  end if
end repeat
...
Best

Klaus

P.S.
Have you ever met mousedown? :P

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: How to add a second Background to lots of cards?

Post by Dixie » Fri Feb 26, 2010 5:21 pm

Klaus...

That comment made my cat smile!... it made me smile as well!

be well

Dixie

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

Re: How to add a second Background to lots of cards?

Post by Klaus » Fri Feb 26, 2010 8:01 pm

:D :D :D

MouseUp
Posts: 41
Joined: Sun Feb 14, 2010 3:41 pm

Re: How to add a second Background to lots of cards?

Post by MouseUp » Fri Feb 26, 2010 8:51 pm

Thanks all! I'm surprised there isn't a built-in way to do this in RunRev when making a new background- like an "apply to all cards function". I guess that explains why I couldn't find it.

PS: mouseDown is too, ahem- depressing- so I don't hang out with him. I like to hang with "UPlifting" people. :D
Thanks,

MouseUp

Post Reply