I’ve been trying to put a label superimposed over an image, a jpg … like a layer… how do I do this?
Have a look at the XY panel. I think that will allow you to overlap things.
Sorry, I’ve tried that but no luck… Can you take a look and see what I’m doing wrong with this example?:
https://anvil.works/build#clone:OQYXTFVXMSST7ULV=43J6H5LW2CMY6QJVUGYRQKU6
I’m trying to dynamically add a label and an image in the same XYPanel, in Form1 in the code behind… no luck.
Would using CSS work in this case? I’m trying to get a background image to fill the entire screen so… idk. I’m not a CSS expert.
I think you need to specify the width when adding the image component to the xy_panel dynamically
https://anvil.works/build#clone:NFQJGDYIQLEXAIPE=MPY7RGOACHRWCKVNY4KODXNS
Thanks for that! Though, trying to get the positions perfect using dynamically generated positioning is pretty tedious. Is there a way to do it at design time?
Not that I could see. How many images do you need it for?
Perhaps you could place the xy panels, images and labels in the design area.
Then in the code set up a method that will take in an xy panel as an argument, adjust its height and then adjust positions of its components.
Then just loop through the xypanels. This will save repeating code.