Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Having troubles with WhatsThisHelp...
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00216850
Message ID:
00216941
Views:
21
Hi Travis -

I'm not sure exactly what you are doing wrong, but here is a list of things that I did -
For the form:
thisform.whatsthishelp = .T.
thisform.whatsthisbutton = .T.
thisform.closable = .T.
thisform.minbutton = .F.
thisform.maxbutton = .F.
thisform.control.WhatsThisHelpID = some unique positive value

This is all I had to do for the context sensitive help.

We also wanted to add form level help to our toolbar that would open the help file and bring up the proper help doc. The way I wanted this to work was that if there was a pageframe, I wanted to return the code for the activepage, otherwise I wanted to return the code for the form itself. (Note at the end of the procedure the HELP ID lnHelpID. Maybe that's what you need to do?)

This code looks like this:
PROCEDURE FormLevelHelp()
** Check to see if there is a pageframe.  If there is, we want to grab the help 
** ID for whatever page we are sitting on.  If not, then we want to grab the ID 
** for the form itself CAUTION - This code will have to be expanded IF we 
** create a pageframe INSIDE a form that doesn't cover the whole form.
** In that case, we'd want the form level help, but it may be finding the 
** page instead.

 LOCAL lnHelpID, oObject, lo
 oObject = _screen.activeform

 IF TYPE('oObject.baseclass') # 'U' 
  IF TYPE('thisform.ActiveControl') # 'U'
  ** There is an ActiveControl (most cases will hit here)
    oObject = thisform.ActiveControl
			
    ** Walk up the hierarchy of the activeControl until we hit 
    ** either a page or the form level
    DO WHILE NOT LOWER(oObject.baseclass) = "page" AND;
     NOT LOWER(oObject.baseclass) = "form"
        oObject = oObject.parent
    ENDDO
  ELSE
    ** There is no ActiveControl
    ** Check for a pageframe and set oObject to the ActivePage
    ** Otherwise, by default, lnHelpID gets set to that of the form itself
    FOR EACH lo IN _screen.activeform.controls
      IF LOWER(lo.baseclass) = 'pageframe'
        oObject = lo.pages(lo.ActivePage)
      ENDIF
    ENDFOR
  ENDIF
 ENDIF	

 lnHelpID = oObject.WhatsThisHelpID
 HELP ID lnHelpID
ENDPROC
You also could try:
**This code brings up the same type of help as if you clicked the What's This
**Help button and clicked on the control.
this.WhatsThisHelpID=_screen.activeform.WhatsThisHelpID
this.ShowWhatsthis()

Like I said, I'm not really sure what you are doing wrong, but just hoping ONE of these things will help. :)
Let me know if it doesn't.... I still may have some ideas.
~ellen


>Form1.pageframe1.page1.container1.WhatsThisHelpId = 140
>
>(And yes, I even set the page and pageframe base classes to have WhatsThisHelpId = 0)
>
>On the form base class, I set WhatsThisHelp = .T.
>
>I've also set the help file in my main program.
>
>Now, when I open a form and go to one of the controls in one of the containers with a WhatsThisHelpId other than 0, and press F1, it opens my help file, but it always opens to the first physical item in the contents section of my help file.
ellen whitney
EPS Software Corp
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform