Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Image In A Grid
Message
From
14/10/1997 23:26:00
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00050957
Message ID:
00054616
Views:
32
>>I created a grid based on a table where I added an image control in one of the columns.
>>How can I set the image control picture property depending on the value of a particular field?
>
>There is a column property called DynamicCurrentControl. You need to create a control for *each* picture you wish to be displayed, then set the DynamicCurrentControl property to display the appropriate picture control. For example, create three picture controls: imgMyPic1, imgMyPic2, and imgMyPic3. All of these go into the column. Then, in the Init method of the grid, set the column's dynamic current control to select the appropriate image:
>
>This.grcMyCol.DynamicCurrentControl = ' IIF(FieldVal = 1, "imgMyPic1", IIF(FieldVal = 2, "imgMyPic2", "imgMyPic3"))'
>
>Hopefully you don't have too many different pictures to display! We're using this method successfully, and it the performance is more than acceptable. Good luck!
> - della

I'll ry that, Thank a lot
System Analyst
Nabil B. Ghrayyeb
nabilg@hotmail.com
Previous
Reply
Map
View

Click here to load this message in the networking platform