Adding Code to

D

DJ Baro

Hi all,

I have a toolbar on my form. It consists many buttons in it.
I am having a hard time adding event to the button after the event of
that toolbar's button is fired!
I've tried onContextChange event, but it doesn't work!
Do anybody know how to add event to the toolbar's button (excecute
after the that particular button's code has been executed)? Thanks

Another question is: Once I save the xml of the InfoPath file, it
looks like the page object has been reinstantiated. So, do any body
know any even that I can call once the page object has been
reinstantiated???

Thanks alot.
Really appreciate your help
 
D

Don Reamey \(MSFT\)

How did you create this toolbar? InfoPath does not have a toolbar control.

Also I'm not sure what you mean by "adding event to the button after the
event of that toolbar..."

Don Reamey
Software Development Engineer
Microsoft
 
D

DJ Baro

Hi Don,

Sorry for stating unclear problem.

I created this toolbar within the definition file (manifest.xsf).
Then, I am trying to hook the event to the button of that folder.
I found the solution to it already.
Here it is

<xsf:toolbar caption="Testing" name="Testing Toolbar">
<xsf:button name="btnTest" caption="Testing Button"></xsf:button>
</xsf:toolbar>

[InfoPathEventHandler(MatchPath="btnTest",EventType=InfoPathEventType.OnClick)]
public void btnTest_OnClick(DocActionEvent e)
{
-------------------
}


However, I've got another problem regarding this solution!
Don't you mind taking a look!!! Thanks in advance
http://groups.google.com/group/microsoft.public.infopath/browse_thread/thread/f1952539adcb8674#


Regards,
 

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