Wrox Programmer Forums
|
BOOK: Beginning InfoPath 2003
This is the forum to discuss the Wrox book Beginning InfoPath 2003 by F. Scott Barker; ISBN: 9780764579486
ISBN: 0-7645-7948-7
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning InfoPath 2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 5th, 2005, 05:11 PM
Registered User
 
Join Date: Feb 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default C# code samples

First off, let me say that this is one of the better computer-related books I've read. The author did a great job explaining things in a comfortable, conversational tone, as opposed to high-handed and pretentious as is more common.


I'm curious as to how to perform Chapter 14's Context Sensitive Help Try It Out (on page 243) in C#. The closest I could come for the OnContextChange event was:

[InfoPathEventHandler(EventType=InfoPathEventType.O nContextChange)]
public void OnContextChange(DocContextChangeEvent e)
{
    string strHelp = null;
    if (e.Type == "ContextNode")
    {
        HTMLTaskPane objTP = (HTMLTaskPane)thisXDocument.View.Window.TaskPanes[0];
        HTMLDocument objDoc = (HTMLDocument)objTP.HTMLDocument;

        if(objTP != null && objTP.HTMLDocument.readyState == "complete")
        {
            if(strHelp != null)
                objDoc.all.item(strHelp, 0).
            objDoc.all.item(e.Context.nodeName, 0).style.display = "";
            strHelp = e.Context.nodeName;
        }
        return;
    }
}

I'm getting build errors for the "objDoc.all.item(e.Context.nodeName, 0).style" line, stating that "'object' does not contain a definition for 'style'"

Any help you can provide is greatly appreciated.

-DC Ross






Similar Threads
Thread Thread Starter Forum Replies Last Post
Code Samples qjay BOOK: Professional Microsoft Robotics Studio ISBN: 978-0-470-14107-6 17 July 13th, 2009 04:10 AM
C# version of the code samples? Berggreen BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 9 June 21st, 2006 08:32 AM
where can i get the samples code edwinomar ADO.NET 2 April 16th, 2004 12:55 PM
Problems in samples code??????? cuccu BOOK: Professional C#, 2nd and 3rd Editions 2 December 4th, 2003 11:52 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.