Information générale
Catégorie:
Photos et traitement d'images
>There is clearly a knack (which I do not possess) to getting VFP Grids to show images as well as data.
> - I've tried using a simple Image Control but that never refreshes.
> - I've tried using a Command Button which can be refreshed (It doesn't have a Stretch property - but can work around that by creating images of known size). The main problem then is that the image shows the same for loads of records, it doesn't show different images for different records.
>
>I thought I read something on this in Foxpro Advisor but haven't been able to locate that.
>
>Anyone know of a good article or a simple little trick ?
You need to use the DynamicCurrentControl event to refresh your column of pictures. We use a container which has an image control on it to give us the size control (stretch as you indicate). The container with empty image is the parent to all possibilities (images) that can be displayed. The DynamicCurrentControl is set to call a method in the grid which will evaluate your conditions and return the control with the appropriate image for display in the column.
Grid.Column1.DynamicCurrentControl = 'THIS.Parent.WhatPicture(Cursor.Value....)'
Works for us.
Steve
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement