FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WEBDEV 2024
→
Display an Image in a Table column
Display an Image in a Table column
Débuté par Shahine, 25 avr. 2008 18:55 - 5 réponses
Connectez-vous…
Shahine
#1
Posté le 25 avril 2008 - 18:55
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
Signaler
0
0
Bob Stratton
#2
Posté le 27 avril 2008 - 10:21
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
Signaler
0
0
Shahine
#3
Posté le 27 avril 2008 - 16:50
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
Signaler
0
0
Giovanni Galimberti
#4
Posté le 30 avril 2008 - 12:47
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
Signaler
0
0
cuina 18
#5
Posté le 27 juin 2008 - 00:53
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
Signaler
0
0
Hilario Perez Corona
#6
Posté le 26 août 2008 - 00:44
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:
s
SharedDirectory is
string
=
"C:/Shared"
s
OutputFile is
string
=
PageParameter
(
"name"
)
s
LocalFile is
string
=
s
SharedDirectory
+ [
"/"
] +
s
OutputFile
FileDisplay
(
s
LocalFile
)
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
Signaler
0
0
→ Revenir à WEBDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte