I’m exploring/creating a web app with Xojo for the first time and discovering all sorts of issues. My latest is I can’t get a PRESSED event to happen from a canvas. The event handler allows it, I’ve got it in place, but I can press till I’m blue in the face and nothing happens.
Well, at this point there’s nothing to share on the Pressed event other than BREAK. It won’t break. I had some code there before and it didn’t execute.
I’m using Windows 10 Pro. The version of Xojo I’m using is the latest (I believe): 2021 Release 3.1
I’m using a mac, I have a WebCanvas with this Opening/Pressed events code
Sub Opening() Handles Opening
me.Style.BackgroundColor = color.Red
End Sub
Sub Pressed(x as Integer, y as Integer) Handles Pressed
MessageBox("Pressed")
End Sub
when I click the red canvas, the messagebox shows like this:
Pressed mean clicked. If you left your mouse down it will not execute pressed until you release your mouse, at least with my mac.
Edit: if you press, hold and move outside the canvas, the pressed event will not fire, you need to click/release on the canvas
Thanks for that. I am pressing and releasing with8n canvas to no effect. I don’t have an Opening event. I’ll insert and see if that somehow lets the Pressed event to occur. I do have a Paint event which works fine.
You go to your dropbox or google drive and use the share functions.
If you don’t have dropbox or google drive you can use a sharing service like wetransfer.com
just upload the file and get the share link, post it here.
You need to click the 3 dots to change the option from email transfer to transfer link. It doesn’t matter, if my example doesn’t work on your machine, your example will work on mine.
I don’t have Windows 10 to test. I hope someone else can confirm your problem or help you. Do you have anything special on your machine? Touch screen? If so, can you test using the touch screen if it makes a difference?
Found this bug report marked as fixed (you need the feedback app to see it, download from Xojo download page): 64545 - WebImageView and Canvas Pressed event does not fire on devices with multiple input support
don’t know if your case is the same or different. Maybe the problem is back.
I can’t test Windows 10 touch (don’t have the hardware).
Thanks so much for the help. I will continue with project using workarounds. I should have looked in the bug reports myself, just didn’t know to. I guess I should report it.