web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to get 4 pictures ...
Power Apps
Answered

How to get 4 pictures together in the center of a container !

(0) ShareShare
ReportReport
Posted on by 27

Dear community,

I have a normal container with 4 images on it. When i use a horizontal container then it would be easy.

But i must use a normal container so i have to get the 4 images in the center by code. i hope someone can help me.

 

This is what i have so far: 

PeKi1972_0-1707083555647.png

and this is what i would like:

PeKi1972_1-1707083853564.png

Gr. P

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,421 Most Valuable Professional on at

    Hi @PeKi1972 ,

    I will number them 1 - 4
    Images 1 X

    Image2.X - Self.Width

    Images 2 X

    Parent.Width/2 - Self.Width

    Images 3 X

    Parent.Height/2

    Image 4 X X Value

    Image3.X + Image3.Width

    Y value of all

    Parent.Height/2 - Self.Height/2

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • PeKi1972 Profile Picture
    27 on at

    PeKi1972_0-1707085242359.png

    Almost 😁

  • Verified answer
    TheRobRush Profile Picture
    11,128 Moderator on at

    If you want them on a single line as in the example,

    first Icons X value

     

    With({trueWidth:Self.Width+Icon2.Width+Icon3.Width+Icon4.Width}, Parent.Width/2-trueWidth/2)

     

    second icons x value

     

    Icon1.X+Icon1.Width

     

    thirds

     

    Icon2.X+Icon2.Width

     

    fourths

     

    Icon3.X+Icon3.Width

     

     

    and set icon 1s y as you want it and all other icons ys to icon1.y

     

  • WarrenBelz Profile Picture
    156,421 Most Valuable Professional on at

    @PeKi1972 

    please see amended code I posted soon after

  • TheRobRush Profile Picture
    11,128 Moderator on at

    Since it's in a container use parent.width* amended in previous answer

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard