cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

icon at relative positions of the image

Hi,

 

In the image Gallery, I am popping out images on select command. when X icon is clicked the popups closes. But the position of X is not relative to the X, Y position of the image as images are of different sizes. how to fix the position of X icon. ?

The image_control.png shows the gap in size of the image and the size Image control

6 REPLIES 6
Highlighted
Super User
Super User

Re: icon at relative positions of the image

@shoebwk 

Here’s my idea:


Positioning the 'Close Icon

Put this code in the X property of the Close icon:

Image1.X + Image1.Width - Icon_Close.Width - 5

 

Then put this code in the Y property of the Close icon:

Image1.Y + 5

 

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted
Helper I
Helper I

Re: icon at relative positions of the image

It did not worked. The position of closeButton is now at the right bottom. No issue. The position needed is shown with red arrow. The issue is the variable gap(green line) between the actual image and the size of Image control. Some images are big or small and this gap is changing.

May be we need fix the image control size to be relative with the size of the image it would be displaying.

Highlighted
Super User
Super User

Re: icon at relative positions of the image

@shoebwk 

I have revised my answer above for the Y property of the close button.  See above.

 

I will get back to later about dynamic image sizing.

 

Highlighted
Helper I
Helper I

Re: icon at relative positions of the image

Thanks changing Y coordinate move the close_icon on top right.

I also want to remove the delegation warning triangle on the image gallery due to the following function

Filter(MobilityCars,VarCarRecord.BaseModel in Lower(VarCarRecord.Model))

I am filtering the Images in the gallery by checking on BaseModel text which is a part of the Model column. eg.

BaseModel ="Corolla" Model=" Toyota Corolla 1.4 TD"

 

 

Highlighted
Super User
Super User

Re: icon at relative positions of the image

@shoebwk 
Your delegation question is unrelated to your original topic of conversation.  I suggest you create a different thread for it.  One topic per thread is the way to go.

Highlighted
Super User
Super User

Re: icon at relative positions of the image

@shoebwk 
To maintain the original size of the image change the CalculateOriginalDimensions property to this code

 

true

 

 

Then you will be allowed to use the OriginalHeight  and OriginalWidth properties inside the Height and Width property respectively.

 

Self.OriginalHeight
Self.OriginalWidth

 

 


Do not use images that have a greater size than the PowerApp's dimensions.  If you follow my method the 'Close' button will always appear in the correct position.

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,312)