Page 1 of 1

Creating a BottomPattern from an image

Posted: Sat Jul 12, 2014 7:24 am
by William Jamieson
I want to see what Livecode is capable of doing when it comes to modifying text in a field. I hope to be able to place a graphic or an image of a graphic behind a word in a text field.

So far i have found setting:

Code: Select all

set the textstyle of word x of field "Post Text Field" of me to "threeDBox"
And I can adjust the 3D box using this line

Code: Select all

set the bottompattern of field "Post Text Field" of me to 100
in the Library Runrev says the syntax is this
set the bottomPattern of object to {empty | patternID | imageID}
So far I have tried this

Code: Select all

set the bottompattern of field "Post Text Field" of me to img "add.png" of card "icons" of stack "resources"
This error appears:
Script compile error:
Error description: seek: expected 'file'
Any suggestions on how to use this feature properly?

Re: Creating a BottomPattern from an image

Posted: Sat Jul 12, 2014 12:55 pm
by Klaus
Hi William,

well, you did not supply any ID! 8)

...
put the ID of img "add.png" of card "icons" of stack "resources" into tPatternID
set the bottompattern of field "Post Text Field" of me to tPatternID
...

Best

Klaus

Re: Creating a BottomPattern from an image

Posted: Thu Jul 17, 2014 6:19 am
by William Jamieson
Ok that must have been what I was missing. Thank you Klaus!