Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Image in Grid
Message
 
 
To
02/05/2005 13:32:20
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01010217
Message ID:
01010221
Views:
35
Check Images, containers in grid FAQ #7934

>I am attempting to display 2 different images in the first column of a grid depending upon the value of a logical field in my table (MyValue). I have followed thread #992235 and others and have gotten this far:
>
>
>**Init event of my form:
>THISFORM.Grid2.AddColumn(1)
>THISFORM.Grid2.Columns(THISFORM.Grid2.ColumnCount).Name = "NewColumn"
>THISFORM.Grid2.NewColumn.AddObject("MyPicture", "IMAGE")
>THISFORM.Grid2.NewColumn.CurrentControl = "MyPicture"
>THISFORM.Grid2.NewColumn.MyPicture.Visible = .T.
>THISFORM.Grid2.NewColumn.Sparse = .F.
>THISFORM.Grid2.NewColumn.Header1.caption = ''
>
>I'm attempting to use this code (also in init) to display the different images:
>
>THISFORM.Grid2.NewColumn.dynamicbackcolor = [IIF(MyValue ,
MyPICTURE.Picture = "C:\path\Image1.ico", 
MyPICTURE.Picture = "C:\path\Image2.ico"), "Column")]
>
>But it does not produce the correct result. All help is appreciated...
>
>dg
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform