Page 1 of 1

Image Mapping program

Posted: Thu Mar 26, 2009 9:19 pm
by magice
I am working on a specialized image mapping program. I have no experience working on any programs that deal with image files. I need the end user to be able to load an image into a specific area of the window for specifying areas to be mapped. None of the fields seem to be able to hold an image file, so I have begun experimenting with using a substack. Is there any way to lock a substack to the primary as if it were a field?

Posted: Thu Mar 26, 2009 9:49 pm
by Janschenkel
How about using an image control, placed on layer 1 in your card; and then set its filename property to the path to the image.

Code: Select all

on mouseUp
  answer file "Please select an image file"
  if the result is "Cancel" then exit mouseUp
  set the filename of image "ImageToMap" to it
end mouseUp
HTH,

Jan Schenkel.

Posted: Thu Mar 26, 2009 10:27 pm
by magice
that is pretty much what I have been trying. The problem is, if the image is as large as the entire stack, it fills more then my designated image area. Locking the size and position of the image causes all imported images to get stretched to the size and aspect ratio of the image area. I assume that that meant that the image control wasn't so much a field, but instead the image itself and the stack is the field. What I need is a specified area, and if the image is larger then that area i need scroll bars. If the image is smaller, I need it to lock to the upper left corner of the area. I was hoping there was an easy way to do this.

Posted: Thu Mar 26, 2009 11:25 pm
by magice
I think I got it, ...I put the image area into a group by itself. Then under the group property manager i added scroll bars and locked size and position.
This program never ceases to impress me.