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

Calling Help Files 1

Status
Not open for further replies.

megmogg

Programmer
Jul 14, 2005
76
GB

Hi All

We are writing a help file for a VFP8 application.

We know about the context help and attaching it via helpcontextid.

However, what were looking to do is if, for example, a field didnt have any contextid, try it's parent object, like a pageframe or container or eventually the form.
We were looking at using keypress to achieve this.

This way a user would always get some form of related help.

Does this sound stupid? Or is there a better way?

Thanks

 
MegMogg,

One possibility would be to use the WhatsThisHelpID property, rather than HelpContextID.

WhatsThisHelpID does not have to be used with the WhatsThisHelp button -- you can trigger it with a mouse click or keystroke -- and you can make it invoke a full help window if you wish, rather than just a popup.

It works with the same IDs as HelpContextID, so you won't have to change your help file. The main advantage is that, if you give it a default value of 0, it will move up the object hierarchy, looking for the topic of the parent page, form or whatever -- which is what you want.

I suppose another possibility would be to keep the HelpContextID, and to add some code to your base form class that drills down into the object hierarchy, looking for objects where the ID is zero, and setting those to the ID of the parent. This could be done at Init time.

But, personally, I'd go with the first of the above options.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 

Thanks, that is just what I was looking for.

I'll give it a try and see if it works.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top