Hi,
I am testing out Xojo WE before buying it, but cannot work out how to set the background image of a canvas.
There seem to be no properties in the IDE which I can set??
Can someone please advise?
Thank you all in advance.
Hi,
I am testing out Xojo WE before buying it, but cannot work out how to set the background image of a canvas.
There seem to be no properties in the IDE which I can set??
Can someone please advise?
Thank you all in advance.
[quote=145089:@Richard Summers]Hi,
I am testing out Xojo WE before buying it, but cannot work out how to set the background image of a canvas.
There seem to be no properties in the IDE which I can set??[/quote]
Richard, you really should get into the habit to refer to the LR when something does not seem to work the way you expect it to. WebCanvas simply does not have a backdrop property. Use Paint to DrawPicture your image, or to have a backdrop property, use an Image Well instead.
Add the Paint event to the WebCanvas:
g.forecolor = RGB(180,180,180) // Use your fav bg color
g.FillRect(0,0,me.width,me.height)
I like to refer to the LR as “Light Reading” (language reference).
Actually Michel - I did look at the LR, and I can see absolutely nothing there which explains how to display a png file inside the canvas!
Drag your png onto your web project.
Webcanvas.paint:
g.drawpicture(image,0,0)
Thank you Mike!
Of course, there is no backdrop. WebCanvas do not work like Desktop Canvas. Use instead a WebImageView (called Image Well in the Library), and you will find what you are looking for : the Picture property, where you can specify the png you have dragged into the project. It is much simpler than the Paint event of a Canvas.
Thank you - much appreciated.