Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 10 JAN 2010 07:08:29AM Joh Hartog wrote:

Let me explain: I have a table called Item. If the entered item data is a photograph or a set of photographs, there is a listbox that describes per line each photograph. Alongside each of those lines is a button, titled image a, image b, etc. Clicking on one of those calls another window/table (Image Display), and enters as the key the original item number (say 12987) + the letter of the button, ie. 12987a. This window has a path_to_file button. When the appropriate image has been selected, the full or relative path name appears in an edit line at the bottom of the image window and the image is displayed. So far so good. The main thing is that the file path pointers to the image are a separate table from the Item table.

Going back to the Item window, I would like a thumbnail to appear of that image (or the first, if there is a series) at the top of the Item window. So I need some code that will make that image appear if it exists, or another (default) image if such an image does not exists (not all items entered have an image available). The file path data has got to be imported from the Image table which then has to display the image in the Item table. I hope this explanation makes sense. Can anyone suggest how to go about this? (Always keeping in mind that I am a klutz in writing code).

I wait with bated breath.

Joh


At 12 JAN 2010 12:22AM Colin Rule wrote:

Not sure if this is what you want, but add a small Bitmap control to the form, and with the image location feed the property:

.IMAGE-]BITMAP=LOCATION
.IMAGE-]IMAGECLIP=IMAGECLIP

The image clipt should be set to 0 for a thumbnail, so it resizes to fit. As images can be different size ratios you might need to deal with this.

If the image does not exist, I would suggest you add a local image to the application, which you can feed to the control.

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/8a407c4232cf3c2d852576a70042b1f1.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1