Reset Ink Picture

J

Jono

I have an Ink Picture control that is used for signatures and some times
needs to cleared at later date. Is it possible to have a control like a
"Button" with a rule that clears the contents of the Ink Picture control?
 
S

Shiva (GGK Tech)

Hello,

We can clear the picture control data using code. We have to replace with
sample form node with existing node then it will clear the data. We cannot
clear the data using rules in the form.
 
J

Jono

Thank you for your response. I am unskilled with modifying code, would you
direct me to a source that will show me how to write code for this issue? I
am using InfoPath 2003. Again I would like to be able to reset or clear the
contents of an Ink Picture control by using a Button control.
 
S

Shiva (GGK Tech)

Hello,

Here is the sample code to clear the picture node,

IXMLDOMDocument2 sampleDataDom = (IXMLDOMDocument2)thisXDocument.CreateDOM();
sampleDataDom.async = false;
sampleDataDom.validateOnParse = false;
sampleDataDom.setProperty("SelectionNamespaces", "namespace of your form");
sampleDataDom.load("sampledata.xml");
IXMLDOMNode nodeFromSampledata = sampleDataDom.selectSingleNode(“XPath of
your node").cloneNode(true);
IXMLDOMNode node = thisXDocument.DOM.selectSingleNode(“XPath of your node);
Node.parentNode.replaceChild(node, nodeFromSampledata);
Note: The above code in C#
 

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