Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to put image in a grid column ?
Message
From
18/02/2008 07:08:49
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01293347
Message ID:
01293395
Views:
41
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" )]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform