J. Landman Gay wrote:

On 6/24/11 8:58 PM, Chipp Walters wrote:
You can set the icon of a button to an image ID. But if you want to resize
the button based on the size of the image, you need to find a way to
reference the image. Of course the image could be in the topStack, and this
would be no problem. But if not, the following throws an error.:

set the icon of btn "hello" to 21234
put the formattedheight of image id 21234 into tH

I suspect one can 'walk' all open stacks, and perhaps that's what I'll end
up doing, but was hoping someone had an easier solution-- or the stack
walking code ;-)


Try:

   get the long name of img id 21234

or:

   get the long name of img id (the icon of btn "hello")

I believe such references only work when the image object referred to is on the current card.

I don't know of a way to find the long id of an image except by walking through a list of possible containers....

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 LiveCode Journal blog: http://LiveCodejournal.com/blog.irv

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to