AttachmentRenderer - attached image size in popup, overlap

2737
8
Jump to solution
07-04-2012 06:41 AM
philippschnetzer
Occasional Contributor III
I'm having an issue with overlapping attached images in the popup in FV3.  I made the image size a bit larger in the AttachmentRenderer:

<s:HGroup  horizontalAlign="center" >      <s:Image id="image"       maxHeight="144"      maxWidth="144"      source="{genericDocumentImageClass}"/>       </s:HGroup>


and the result is shown in the attached image...
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Philipp,

   OK, lets start by having you get the 3.1 API version of the AttachmentRenderer.mxml.

  1. Don't change the VGroup as this is just setting up the image at the top and the label name under that and the label size under that.

  2. Add visible="false" includeInLayout="false" to both the labelName and the labelSize (this takes care of removing the name and size stuff).

  3. Change the maxHeight and maxWidth on the image to 128.

  4. The AttachmentRenderer.mxml is used to display each individual attachment item it does not control the layout of the of these items in the popup.

  5. Add the AttachmentInspectorSkin.mxml to you project from the API

  6. Change the attachmentLayout distance attributefrom 100 to 144.

View solution in original post

0 Kudos
8 Replies
philippschnetzer
Occasional Contributor III
Just bumping this back up....

I've actually moved the project to 3.1 but am still having the same issue.  I can increase the image size but once there are 2 or more images added as attachments they will overlap.  I'cve tried everything I can think of to prevent this but nothing worked.  Would really appreciate some help on this.

Thank you!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Phillip,

  In the 3.1 AttachmentRenderer.mxml the image is in a VGroup like this:

    <s:VGroup left="8" right="8" top="8" bottom="8"
              horizontalAlign="center">
        <s:Image id="image"
                 maxHeight="64"
                 maxWidth="64"
                 source="{genericDocumentImageClass}"/>
        <s:Label id="labelName"/>
        <s:Label id="labelSize"/>
    </s:VGroup>


Are you saying you have wrapped the image in a HGroup leaving the VGroup or what?
0 Kudos
philippschnetzer
Occasional Contributor III
Robert,

Well, I tried a few things - but am not a seasoned programmer.  I tried using HGroups and VGroups and combinations of the two but just couldn't make anything work.  What I did do was remove the image name label and image size label so that just the image shows up.

I just assumed that if I use an HGroup instead of VGroup any additional image should be placed horizontally beside the other image(s).

Thanks.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Phillip,

  So show me exactly what you ended up with.
0 Kudos
philippschnetzer
Occasional Contributor III
Robert,

Here's is what I have.  Changed the VGroup to HGroup and removed the two labels:

 <s:HGroup left="8" right="8" top="8" bottom="8"  
              horizontalAlign="center">
        <mx:Image id="image"
                  maintainAspectRatio="true"
                  maxHeight="128"
                  maxWidth="128"
                  source="@Embed('/assets/images/edit_genericdocument.png')"
                  toolTip="{data.name}"/>       
    </s:HGroup>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Philipp,

   OK, lets start by having you get the 3.1 API version of the AttachmentRenderer.mxml.

  1. Don't change the VGroup as this is just setting up the image at the top and the label name under that and the label size under that.

  2. Add visible="false" includeInLayout="false" to both the labelName and the labelSize (this takes care of removing the name and size stuff).

  3. Change the maxHeight and maxWidth on the image to 128.

  4. The AttachmentRenderer.mxml is used to display each individual attachment item it does not control the layout of the of these items in the popup.

  5. Add the AttachmentInspectorSkin.mxml to you project from the API

  6. Change the attachmentLayout distance attributefrom 100 to 144.

0 Kudos
philippschnetzer
Occasional Contributor III
THANK YOU THANK YOU THANK YOU

the AttachmentLayout distance="144" was what I needed!!!

THANKS FOR BEING THE FLEXVIEWER GURU AND TAKING THE TIME TO HELP EVERYONE ON HERE!!!!!
0 Kudos
RhettZufelt
MVP Frequent Contributor
I've been trying to figure this out also.

Thanks again Robert, more points for you,

R_
0 Kudos