Normal Topic image elements (Read 1630 times)
sunnyjenna
Member
*
Offline


No personal text

Posts: 11
Joined: Mar 21st, 2004
image elements
Oct 19th, 2004 at 5:34pm
Print Post Print Post  
I want to have an image associated with a line item. I can select line items using a selection list and return the details of that item properly however I can not understand how I return the image name to my Image element so it will display properly.

Any help would be greatly appreciated.
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: image elements
Reply #1 - Oct 19th, 2004 at 5:46pm
Print Post Print Post  
If it is a dynamic (bound to a field) image element, set the LE to the name of the image file, or if you have no default image path set - set it to the path to the image file:
Code
Select All
MyImageLE = "MyImageDir\MyImage.jpg"
 



You may have to call ForceRedraw to see the change immediately.

If it is a static image and you are using 1.0.5, you can follow the instructions above, but always use the path. If it is static and you are not using 1.0.5, you can't change the image from the image set in SDesigner - its static.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
sunnyjenna
Member
*
Offline


No personal text

Posts: 11
Joined: Mar 21st, 2004
Re: image elements
Reply #2 - Oct 19th, 2004 at 6:25pm
Print Post Print Post  
Using a dynamic (bound to a field) image element, Not Static, Are you saying the element Name should be the image name or the element label should be the image name or am I totally confused?
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: image elements
Reply #3 - Oct 19th, 2004 at 6:41pm
Print Post Print Post  
I'm saying that the value of a dynamic image element (image field) is the path or filename of the image. If, for example, you view your form in "table view" (Shift-F6) and look at the image field, you will see that it has the filename (possibly the whole path) of your image as its value. Just like a numeric LE might have the value of 67.0, an image has its filename.

To change the image that is appearing, simply assign its value much as you would a any other LE. In the case of a number, you would use the assignment operator "=" - for instance:

MyNumericLE = 67.0

You use the same syntax to set a dynamic image, but instead of a number you use the filename of the image as text:

MyImageLE = "ImageFileName.jpg"

When your form sees that an image LE has been changed, it knows to look for that image file on the harddrive, read it in, and display it. Sesame then stores the filename of the image in the database files as the value of that LE/field.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
sunnyjenna
Member
*
Offline


No personal text

Posts: 11
Joined: Mar 21st, 2004
Re: image elements
Reply #4 - Oct 19th, 2004 at 7:01pm
Print Post Print Post  
In property manager I have Image path set to c:\sesame\pics
In my element programming I have

ImageHolder = “House.jpg”

The words House.jpg keep showing up not the image.

I have also tried

ImageHolder = “c:\sesame\pics\House.jpg”

But the words come up again not the image.

What am I doing incorrect?
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: image elements
Reply #5 - Oct 19th, 2004 at 7:34pm
Print Post Print Post  
I am assuming your line items are in a subform. If that is so is your subform a Table view subform by any chance?

If you double click on your image element does it bring up the image browser?
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: image elements
Reply #6 - Oct 20th, 2004 at 2:04am
Print Post Print Post  
It sure sounds like her image LE is actually a text LE.

Steve
  
Back to top
IP Logged