d.bernaert Posted November 25, 2021 Share Posted November 25, 2021 Hi, We have some very large images for a construction company. They want to preview the images from within the application, so i try to display them in an image control. As the images are so large, I set the property proportional to true so that the images are resized to fit in the size of the image control. But that does not seem to work. Thx, Dominique Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 25, 2021 Share Posted November 25, 2021 Hi Dominique, Can you test this on a simple project? Quote Link to comment Share on other sites More sharing options...
Roberto Nicchi Posted November 25, 2021 Share Posted November 25, 2021 Stretch is true or false ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 25, 2021 Share Posted November 25, 2021 Yes, stretch=true and also if you want center=true Quote Link to comment Share on other sites More sharing options...
d.bernaert Posted November 26, 2021 Author Share Posted November 26, 2021 I'm sorry, I cannot find a solution for this, probably something stupid from my side. The form is client side aligned, I have a form with client side alignment, the layout of the form is border. I have an image control with region center and a containerpanel at the bottom with region south. The image properties are as following: center: true proportional: true stretch: true As you can see the image is stretched, but I would like the aspect ratio to be respected. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 26, 2021 Share Posted November 26, 2021 16 minutes ago, d.bernaert said: I have an image Is the component on the container? Quote Link to comment Share on other sites More sharing options...
d.bernaert Posted November 26, 2021 Author Share Posted November 26, 2021 The image component is on the form itself yes. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 26, 2021 Share Posted November 26, 2021 UniImage -> LayoutConfig -> Width = auto Height = 100% 1 Quote Link to comment Share on other sites More sharing options...
d.bernaert Posted November 26, 2021 Author Share Posted November 26, 2021 Thank you Sherzod! You're the king! 1 Quote Link to comment Share on other sites More sharing options...
x11 Posted November 26, 2021 Share Posted November 26, 2021 tunimImage.JSInterface.JSConfig('cls', ['imgPhoto']); or tunimImage.LayoutConfig.cls := 'imgPhoto'; then css: .imgPhoto img { width: 100%; height: 100%; object-fit: scale-down; } 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.