|
Display an Image in a Table column |
Started by Shahine, Apr., 25 2008 6:55 PM - 5 replies |
| |
| | | |
|
| |
Posted on April, 25 2008 - 6:55 PM |
Hi,
How can I display an image in a table column? I have a column that is not linked to any fields and its type is Image. I want to be able to set the image depending on the value of other columns.
On the RowDisplay of the table I have:
Table1.Column1..Value = image1..Image
Column1 = My image column in the table image1 = A hidden image on the form
But this doesn't seem to work? What am I doing wrong?
Many Thanks Shahine |
| |
| |
| | | |
|
| | |
| |
Posted on April, 27 2008 - 10:21 AM |
Hi Shahine,
Good to meet you (Briefly) at the UKIWDG last week.
I tested it and it works if you use the name of the image file which is stored in the _WEB directory of your project.
Cheers
Bob |
| |
| |
| | | |
|
| | |
| |
Posted on April, 27 2008 - 4:50 PM |
Hi Bob
Thanks for the answer. I was using the full path and it wasn't working. As soon as I just put the name of the png file it work.
Thanks for the help.
ps. I really enjoyed the UKIWDG. I thought it was very useful. Thanks for arranging it.
Cheers
Shahine |
| |
| |
| | | |
|
| | |
| |
Posted on April, 30 2008 - 12:47 PM |
Hi, I've got the same problem, how can I show an image that is not on the root of the site, but for example is on another shared path ? Thank you |
| |
| |
| | | |
|
| | |
| |
Posted on June, 27 2008 - 12:53 AM |
hi If you know something it(he,she) brings over of this problem you make to me it know thank you
Giovanni Galimberti escribir un mensaje de news <481831c3$1@news.pcsoft.fr> :
Hi, I've got the same problem, how can I show an image that is not on the root of the site, but for example is on another shared path ? Thank you
|
| |
| |
| | | |
|
| | |
| |
Posted on August, 26 2008 - 12:44 AM |
Hi all...
To display an image in a table depending on other columns conditions, just assign the image name (the image must be somewhere inside the "_WEB" directory)...
IF COL_DueDate > Today() THEN COL_Image = "bad.gif" ELSE COL_Image = "good.gif" END
If you have an image in other place, away from the "_WEB" directory, they you will need to apply a little trick with AWP.
1) Create a new page, with any style, this page will never be displayed. Name it "file.wwh".
2) On the page description check the "Generation in AWP mode" option, this will allow us to call the page without context.
3) On the "Initialization" section of the page type in:
sSharedDirectory is string = "C:/Shared"
sOutputFile is string = PageParameter("name")
sLocalFile is string = sSharedDirectory + ["/"] + sOutputFile
FileDisplay(sLocalFile)
4) Change the value of "sSharedDirectory" to the path to your shared directory, remember to change the "\" for "/" and avoid the last one.
5) Since the file will be called in AWP mode, we just assign the file to the column:
COL_Image = "UK/file.awp?name=image.gif"
Where:
* "UK" is the Nation (it can be ES, FR, or other, depending on your language settings)
* "file.awp" is the page file.wwh but in AWP mode. If you named the page "myfile.wwh", then this will need to be changed to "myfile.awp".
* "image.gif" is the name of the file inside the shared directory. As you can see, the page "file.wwh" works as a proxy to access the files in our shared directory.
You can use this on non-columns images like this:
IMG_Image1 = "UK/file.awp?name=random_banner_updated_by_other_system.gif"
Hope this helps!
Hilario Perez Corona Nabu Tecnologia en Software |
| |
| |
| | | |
|
| | | | |
| | |
|