Trick: Make a Picture Button in InfoPath 2010 a non-clickable image
Learn a trick to have the image of a Picture Button appear as a normal non-clickable image on an InfoPath 2010 form.
InfoPath 2010 introduced a new control called the Picture Button control. A Picture Button allows you to use images as buttons in InfoPath 2010.
The neat thing about Picture Button controls is that you can add images as Resource Files to an InfoPath form template and then reuse these images over and over again as images for as many Picture Button controls as you like.
Normal Picture controls in InfoPath 2010 allow you to either link to an image or include an image in the InfoPath form itself, but do not allow reuse through resource files. Resource files in InfoPath offer several benefits.
The nice thing is that you can leverage resource files by using Picture Buttons as normal images in InfoPath. But the downside of using Picture Buttons as normal images is that buttons are clickable and images are not.
There is a way, though, to make a Picture Button non-clickable, so that you can use them as normal pictures in InfoPath 2010 and also get the benefit of using images as resource files in InfoPath 2010.
Here's a neat little trick to make a Picture Button in InfoPath 2010 non-clickable:
- In InfoPath Designer 2010, create a new Blank Form template.
- Click the Data tab.
- On the Data tab under the Form Data group, click Resource Files.
- On the Resource Files dialog box, click Add.
- Browse to the image you want to add as a picture on your InfoPath form and add it as a resource file.
- On the Resource Files dialog box, click OK.
- Click the Home tab.
- On the Home tab under the Controls group, click Picture Button to add a picture button control to the InfoPath form template.
- Right-click the Picture Button control and select Picture Button Properties from the context menu.
- On the Picture Button Properties dialog box, select the image you just added as a resource file from the Picture drop-down list box, select the same image from the Hover picture drop-down list box, and click OK.
- On the Home tab under the Rules group, click Manage Rules.
- On the Rules task pane, click New, and then Formatting from the drop-down menu that appears.
- On the Rules task pane under Condition, click the text None.
- On the Condition dialog box, select and type the information as displayed in the following figure and then click OK.
Figure 1. Condition dialog box in InfoPath 2010 with a 'The expression' condition.
- On the Rules task pane under Formatting, select the Disable this control check box.
- Press F5 to preview the InfoPath form.
Now the Picture Button should appear as a normal non-clickable image on the InfoPath form.
Related InfoPath Articles:
- Add a picture button with images in InfoPath 2010
- Displaying images in InfoPath 2007 browser forms served through Forms Services in SharePoint
- How to display images in a repeating table in an InfoPath browser form using a Rich Text Box control
- Use PowerPoint 2010 to create button images for InfoPath 2010
- Add InfoPath image as attachment to SharePoint list item
Copyright: This article may not be used on web sites (whether personal or otherwise), copied, disseminated, altered, printed, published, broadcasted, or reproduced in any way without an expressed written consent. The techniques demonstrated in this article may be used within any Microsoft InfoPath project. This article is provided without any warranties. Copyright for this article is non-transferrable and remains with the author.