Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to put image in a grid column ?
Message
De
18/02/2008 07:08:49
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01293347
Message ID:
01293395
Vues:
42
So far I created a column with an image instead of a textbox.
I have a cursor that contains the image in a column (ex.: image1.jpg, image2.jpg, etc...)


Here is code that I use to read s table of countries so I can put the country's flag in the first column of the grid:
*** Add the flag to column1
SELECT Country
SCAN
  IF cCountry # '<unknown>'      
    THIS.colFlag.AddObject( "img" + ALLTRIM( cCountry ), "Image" )
  ELSE
    THIS.colFlag.AddObject( "imgUnknown", "Image" )
  ENDIF    
  THIS.colFlag.Controls[ THIS.colFlag.ControlCount ].Picture = ALLTRIM( cIconFile )
  THIS.colFlag.Controls[ THIS.colFlag.ControlCount ].BackStyle = 0
ENDSCAN
THIS.colFlag.DynamicCurrentControl = [IIF( NOT EMPTY( Clients.cCountry ), "img" + ALLTRIM( Clients.cCountry ), "imgUnknown" )]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform