Programically display/undisplay picture control (signature) in C#.

K

KenM

I would like to programically display a picture control (signature jpg) in C#
managed code when the signed in user checks a box (authorized) or undisplay
it if the box is not checked. InfoPath2007 pls. Thnks.
 
K

KenM

Thank you.

Now I notice that when the picture becomes enabeld you can still see the
control box it belongs in and then when enabled it forgets what the path was.
I'll start looking into that now.

Got more clues ? thanks.
 
K

KenM

Well, I tinkered around with it and the control doesn't actually get disabled.

But, I did learn how to create and change the picture, or make it null.

//look at an original picture, copy the value in VS
string fieldValue = MainDataSource.CreateNavigator().SelectSingleNode(

"/my:myFields/my:picSignaturePicture",NamespaceManager).Value;

//Set the value of the picture, paste in the value you copied above in
"A_Bunch_Of_Picture_Bytes_Here" , and you'll see it.

XPathNavigator domNav = MainDataSource.CreateNavigator();
domNav.SelectSingleNode("//my:picSignaturePicture",
NamespaceManager).SetValue("A_Bunch_Of_Picture_Bytes_Hereâ€);

A hack I spose and Doesn't really disable the control, but may be good
enough for now.
 

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