Context sensitive help in the custom task pane

P

Philip Colmer

I'm trying to implement the InfoPath Lab 14 using managed code (as opposed
to scripting).

It would appear that the only way to get this to work is to rely on the
mshtml PIA which doesn't get installed with InfoPath :-(.

There is an entry on the IP blog about using late binding but that is just
WAAAAAAAAAAY over my head.

Has anyone implemented something like the context sensitive help task pane
without needing any special DLLs?

--Philip
 
K

Kalyan Reddy

Hi Phillip,

You dont need any DLL's to add Context sensitive Help in task pane.
You can add a help text using HTML and add as a resource file and enable the
task pane using Form options -> Advanced Tab and select the resource file.
 
P

Philip Colmer

Thank you for your reply but that isn't the problem I'm facing.

Lab 14 uses code to adjust the style settings in the task pane HTML code so
that only certain DIV sections are visible, depending on the context that
has just been selected. Unfortunately, Lab 14 has been written using script,
whereas I'm using managed code.

According to an InfoPath blog
(http://blogs.msdn.com/infopath/archive/2004/09/27/234911.aspx), the
solution is to either deploy the mshtml PIA or to use late binding. The
source code they provide is written in C# and I'm not sure if it will
translate over to Visual Basic which is what I'm using. Another reason why
I'm uncertain about this solution is because I'm not actually trying to call
script functions - I just want to use the VB equivalent of this:

// Retrieve task pane object
var oTaskPane = XDocument.View.Window.TaskPanes.Item(0);

// Retrieve html object for task pane
var oHTMLDoc = oTaskPane.HTMLDocument.all;

// Clear previous help topic from task pane
if (helpString)
oHTMLDoc.item(helpString).style.display="none";

// Display DIV statement having same ID as the context node name
oHTMLDoc.item(eventObj.Context.nodeName).style.display="";

// Keep record of string displayed, so can later be cleared
helpString=eventObj.Context.nodeName;

return;

Is there an easy alternative to deploying the mshtml PIA? If there isn't,
can anyone help with constructing an MSI to allow me to deploy it with Group
Policy?

Thanks.

--Philip
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top