How do you vertically align a picture with a picture button control? - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

How do you vertically align a picture with a picture button control?

Last post 07-27-2011 05:27 PM by Greg Collins. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 07-21-2011 09:49 AM

    How do you vertically align a picture with a picture button control?

    I am having trouble aligning an identically sized picture control and picture button control at the same vertical level.  Here's what i did: 

    1. I created a new form by selecting File > New > Blank Form > Design Form.
    2. I clicked on the text Add tables and inserted a picture (Included in the form).
    3. I then changed the picture properties to specify a default picture from a local JPG file and set the control to Read-Only.  I did not change the size of the image which is height=22px and width=77px.
    4. I inserted a new picture button control, browsed to the same picture file.
    5. I set the size of the picture button control to height=22px and width=77px which is the exact size of the picture canvas.

    The result is that the picture is 5 px higher than the picture button control.  I know this by setting a 5px bottom margin on the picture button control which aligns them correctly.  Since these control are not in a table, there are no padding or alignment control available.

    How do I get the picture to appear in line with the picture control button?  I need for there to be no gap between these objects and the next lower object.  TIA.

    Mike Frederick
  • 07-24-2011 01:40 PM In reply to

    Re: How do you vertically align a picture with a picture button control?

    Sorry for short response, but what about if you add them to a layout table and set all padding to 0?

    Patrick Halstead
    Project Manager at Qdabra
  • 07-25-2011 12:42 PM In reply to

    Re: How do you vertically align a picture with a picture button control?

    OK, I did that.  All cells exactly 22 X 77 px.  All padding set to zero (cells and controls)

    Now the picture control appears 1 px lower than the other picture button controls.

    Mike Frederick
  • 07-27-2011 05:27 PM In reply to

    Re: How do you vertically align a picture with a picture button control?

    I know this sounds strange, but on the picture button control, set the bottom margin to -5 px.

    I don't know how this will react (if at all) on a browser, but in the rich client it should resolve your issue.

Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.