Storing a Path to the Image

Follow these steps to store a path to the image, instead of the image itself.

pathToBitmap = Get_Property( @window : '.PICTURE', 'TEXT')
path = Set_Property( @window : '.BITMAP_1', 'BITMAP', pathToBitmap)

This will change the image whenever the contents of the PICTURE control (the path to the image) changes. If the path points to an invalid image file, or the file does not exist, the OpenInsight default image displays. In other words it is a good idea to ensure the path is valid.

Below is a sample display of a valid image (in this case a JPEG file) using this form:

This method relies on the user entering the correct path in the PICTURE control. A more reliable method is to use a dialog box instead. The next topic shows how this is done.