Quick logo help

I’m attempting to add the made with xojo logo on an about window but I’m having issues. I added the “mwx_logo-long.png” image in an image object on the ide and set it up as backdrop on a canvas. On the ide everyting is shown as it should be but when i run/compile the app i get a grey canvas instead. I tried using a forceful redrawn on a open event and on a paint event, the results are the same. Any suggestions?

My suggestion is to not display it using the Canvas backdrop, but to instead draw it in the Canvas Paint event handler:

g.DrawPicture(MWXLogo.png, 0, 0)

@Paul Lefebvre Same result, I’m still getting a grey canvas. Just to be sure, if the image object I inserted into the ide is called “XojoLogo”, should I use g.DrawPicture(XojoLogo, 0, 0) into the paint event?

Somethings weird, both ways should’ve worked. Do other pictures work or is it just XojoLogo? Does it happen with all Canvases or just this one?

I suggest you post your entire PaintEvent
are you sure you are not painting over it after you put the logo in the canvas?

@Dave S My paint event is just the line of code I posted. I just need it to fill the canvas with the image.
@Will Shank Every image I try to draw act the same.

Does it happen in a new project? And what OS?

change your paint event to this. and tell us what you see

g.fillrect 0,0,g.width,g.height
g.DrawPicture(MWXLogo.png, 0, 0)

While the forums were down I tried to create a new project and found the issue. If I add the image via menus(insert->image) the object won’t render, if I add the image via drag-n-drop onto the ide the image will render. Can you please tell me if I got into some sort of bug or not? 2015r4.1, windows 7 x64 SP1

Does rebooting help?

@Peter Job Rebooting ide or PC won’t change the ide behavior. I consider the issue solved but if this is the standard behavior, having the insert->image workflow being non-working is far from intuitive

Ah. You probably didn’t want to Insert an Image (Image sets were to prep for HiDPI support, now shipping in 2016r1). You just wanted a single representation Picture, which you got by dragging and dropping.

OK sorry. But on some versions of Windows, if the machine runs out of graphics RAM ( not sure of correct name ) pictures won’t either open or render.

Ok, on 2016r1 it works on both options(imageset and single image). Sorta weird that nobody noticed it on 2015r4 until now :slight_smile: