Set image correctly

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: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
rob101059
Posts: 2
Joined: Tue Jun 02, 2020 7:44 pm

Set image correctly

Post by rob101059 »

Hello people, I have a problem, maybe someone can help me: on the start page I have three buttons on a second card I have a picture. now i want that when the mouse is pressed, the picture on the start page and in the field "msi" is put. PLEASE HELP! thank you
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Set image correctly

Post by Klaus »

Ho Rob,

not sure i understand!?

So you have 2 cards.
On card 1 you have three buttons.
On card 2 there is an image.
Now when you click a button on card 1 then the image of card 2 should appear on card 1?
And what is with the field?
Where is the field, I mean on what card? 1 or 2?
And is its name-> "msi" or do you want to put the text "msi" into that field when the button is clicked?

Best

Klaus

P.S.
There is also a german LC forum! :-)
http://www.livecode-blog.de/forums/foru ... ode-forum/
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10509
Joined: Wed May 06, 2009 2:28 pm

Re: Set image correctly

Post by dunbarx »

I am betting both the image and the field are on card 2, and they should both appear on card 1. I am 26.47% sure this is correct.

@ rob101059.

In any case, are you familiar with the "copy" and "clone" commands? Either of these might be used to take objects from one place and put them in another. Read about them in the dictionary. They each have their own strengths and features.

Craig
Xero
Posts: 157
Joined: Sat Jun 23, 2018 2:22 pm

Re: Set image correctly

Post by Xero »

Or dummy image and field off visible screen that moves to onscreen and set the contents of the field and the image to be the same as the image you want to show.

Code: Select all

put "x,y,z, whatever" into fld "msi"
and for the image there will be some way of setting the properties of the image to match another image (i.e. set the filename of img "Image1" of crd 1 to the filename of img "Image2" of crd 2)- untested!!!
X
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Set image correctly

Post by Klaus »

Hi all,

FYI, we were able to solve this in the german LC forum!
The actual problem was:
Now when you click a button on card 1 then the image of card 2 should appear on card 1?
and I showed him several ways to do so.


Best

Klaus
Post Reply