Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I display images in a grid?
Message
De
21/02/2004 04:45:53
 
 
À
31/01/2004 17:34:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00872676
Message ID:
00879578
Vues:
19
Hello Marcia,

Sorry to get back to you so late.

Your code snippet is another useful way of doing what I wanted to do. Thank you so much for sharing this with me.

Pat

>Hi Pat.
>
>I would love to display an image for each row displayed in a grid: somethinglike a red flag, a yellow flag, and a green flag that would indicate the status of the record (red=critical; yellow=warning; gree= OK).
>
>Here is some sample code (from the init of the grid) that should give you an idea on how to get started. In my sample code, I am scanning through the countries table and adding an image control to the first column of the grid to hold a picture of that country's flag. Keep in mind that the column's sparse property must be set to false for this to work:
>
>
>*** Add the flag to column1
>SELECT Country
>SCAN
>  IF cCountry # '<unknown>'
>    THIS.Column1.AddObject( "img" + ALLTRIM( cCountry ), "Image" )
>  ELSE
>    THIS.Column1.AddObject( "imgUnknown", "Image" )
>  ENDIF		
>  THIS.Column1.Controls[ THIS.Column1.ControlCount ].Picture = ALLTRIM( cIconFile )
>  THIS.Column1.Controls[ THIS.Column1.ControlCount ].Stretch = 2
>  THIS.Column1.Controls[ THIS.Column1.ControlCount ].BackStyle = 0
>ENDSCAN
>THIS.Column1.DynamicCurrentControl = [IIF( NOT EMPTY( Clients.cCountry ), "img" + ALLTRIM( Clients.cCountry ), "imgUnknown" )]
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform