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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP 6 OLE field in grid on form

Status
Not open for further replies.

wetton

Technical User
Jun 26, 2006
42
0
0
AU
I have a number of forms with a grid - produced via a prg file.
Some of the fields are 'editable' and I have various controls on those columns. Most controls run a separate procedure.

On two of the grids I have a General field containing an OLE object.

Is there any code for a 'viewer' control of an OLE object field which kicks in when the field is clicked?

Many Thanks

PW
 
First, let me say that it's usually more trouble than it's worth to use general fields. They have excessive file bloat, and may not have the same file associations from one computer to the next. In other words, if you have an image file you've added, your user must use the same app to open it. If they don't have that app installed it won't work.
So it is better to just store the relative path name of the file in a regular character field and reference that field in your app.

That said, I don't believe you can just use a viewer and click on a field. I believe the only way to see what's in there is to double click on the field and let fox call the associated OS action to open it.



-Dave Summers-
[cheers]
Even more Fox stuff at:
 

Paul,

I have to agree with Dave. I've never succeeded in getting an OLE container to work in a grid. If your OLE objects are simple images, you would be better using an Image control (which does work in a grid). If you want something more sophisticated, follow the approach that Dave suggested.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Thanks Guys,

I should have said I am opening another apps tables and have no control over their structure.

My app provides detailed facilities not available in the "host" program. EG it presents the tables' data in different ways.

That program has no restrictions on what OLE connections are used in its tables. Typically MSWord Docs or Powerpoint Slide Shows or even Excell Worksheets.

Re [I believe the only way to see what's in there is to double click on the field and let fox call the associated OS action to open it.]

This works in some cases but not in others - thus I was looking for an alternative..


Thanks once again

PW

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top