Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to control image ctl visibility in grid rows? 2

Status
Not open for further replies.

dsandlin

Programmer
Jul 11, 2003
56
CR
I have a grid with an image control in the first column. I need to be able to make the image visible for some rows and not for others. Can it be done in VFP 8.0?

-- Dick [cannon]
 
Dick,

I don't think it is possible to do this directly. However there is the property DynamicCurrentControl.

I think if you put 2 images in the column, one of which has no picture and a BackStyle property 1-Opaque (or I suppose you could create an image of that red cross iamge you get on webpages when an image can't be found), you can then use the DynamicCurrentControl to show whichever image is appropriate.



Hope that helps,

Stewart
PS If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Dick

To add to Stewart's comment, here is an example of switching current controls (in this case it's textboxes, but it could an image control)
Faq184-2324

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Stewart and Mike,

Thanks a million to both of you! Stars to you both!!

It seems so simple after you know the answer....


Regards, Dick [blush]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top