In a card I have some jpeg images imported as control. at user's choice I want to show one of these into a image area.
I have tried this
Code: Select all
put img "aglianico" into img "imgFoto"
thanks for help
best
franco
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
put img "aglianico" into img "imgFoto"
Code: Select all
put img "aglianico" of cd MyImagesCard into img "imgFoto" of cd MyDisplayCard
I will trysefrojones wrote: ...
You may also want to refer to the images by ID number instead of name...
--Sefro
Code: Select all
set the FILENAME of img 2 to the filename of img 1
Code: Select all
put (the selectedText of fld tNomeFld & ".jpg") into tFoto
set the filename of img "ImgAnteprima" to the filename of img tFoto
Code: Select all
set the filename of img "ImgAnteprima" to the filename of img "aglianico.jpg"
Code: Select all
set the layer of img (the selectedText of fld tNomeFld & ".jpg") to top
Code: Select all
if there is an img "myNameImage" then
so easy, I always forget LC is english like.... or this may be my problem.jmburnod wrote:Hi Franco
how can I intercept the message to avoid the error: :"... execution error at line 43 (Chunk: no such object)..."
just this:Code: Select all
if there is an img "myNameImage" then
Code: Select all
if there is an img (the selectedText of fld tNomeFld & ".jpg") then
set the layer of img (the selectedText of fld tNomeFld & ".jpg") to top
show img (the selectedText of fld tNomeFld & ".jpg")
end if
...
hide img (the selectedText of fld tNomeFld & ".jpg")
it IS possible in fact, but is also asking for trouble, because this way one can easily put a control OUT OF the group!francof wrote:...if I am not wrong, is not possible to change the layer of grouped objects. is it true?
Code: Select all
...
## Object names in QUOTES!
put the selectedText of fld "tNomeFld" & ".jpg" into tImageName
if there is an img tImageName then
set the layer of img tImageName to top
show img tImageName
end if
...
hide img tImageName
...
NO thank you! is better than no.Klaus wrote: it IS possible in fact, but is also asking for trouble, because this way one can easily put a control OUT OF the group!
Check "relayer" and "relayergroupedcontrols" in the dictionary and do it at you own risk![]()
....
oh, sorry, I thought that was the NAME of the field and not a variable containing the name!francof wrote:...Edit: name of the variable in quotes return this error: " (Chunk: no such object) near "tNomeFld" "