Gambas 3 and Touchscreen app
Gambas 3 and Touchscreen app
Hi All, I have an app I've been working on, basically a full screen app intended to run as a kiosk with my Dell touchscreen monitor. After launching the app, I consistently get one, sometimes 2 button clicks with my finger and then the app will not respond to finger taps anymore but continues to work if I plug in a mouse and use that. I have been testing to see what the problem is and every other app on this Debian system consistently works with finger taps so I can only concluded it is Gambas or something particular with my app. Anyone have any ideas? Am I missing something or did I do something wrong?
- cogier
- Site Admin
- Posts: 1127
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: Gambas 3 and Touchscreen app
I have run Gambas programs on a touch screen with no issues. Try changing gb.gui to gb.gui.qt and see if that helps.
Re: Gambas 3 and Touchscreen app
Thanks cogier but I already have gb.gui.qt selected in the project properties. Any other suggestions? Should I include some more info on my development environment? Maybe I got something wrong there...?
Re: Gambas 3 and Touchscreen app
Since I first discovered Gambas, I always chose QT application when starting a new project, never did the GTK. I'm gonna do a quick, simple app with the GTK component and transfer it over to the pc with the touchscreen and see what happens.
Re: Gambas 3 and Touchscreen app
So here are the results of my quick test using GTK: finger taps work consistently on the Debian machine with the touchscreen. This test app is absolutely nowhere near as big and complicated as the kiosk app I was referring to but still....every finger tap worked. Could it be the GTK is better or do I possibly have some seriously flawed logic in my kiosk app?
- cogier
- Site Admin
- Posts: 1127
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: Gambas 3 and Touchscreen app
You can easily test your original program by changing the Components with Projects>Properties>Components.
Re: Gambas 3 and Touchscreen app
Ah! I didn't know I could do that. I assumed I had to build a fresh app. I've actually already ran into another problem when I added the gtk3-webview component which I use in the kiosk app. Debian doesn't have it installed so I gotta track that down now and get it installed.
Re: Gambas 3 and Touchscreen app
Well now I have a problem if I'm going to use GTK. I develop on an old macbook pro running Ubuntu 22 but almost all my target machines are running Debian Bullseye. Debian is telling me I need gb.gtk3.webview which it can't find in the repo. I have already installed the full Gambas 3 on the Debian machine, not just the runtime stuff.
- cogier
- Site Admin
- Posts: 1127
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: Gambas 3 and Touchscreen app
Have you tried to install with apt install gb.gtk3.webview?
Are you developing on a different version of Gambas to the ones installed on the Debian machines?
Are you developing on a different version of Gambas to the ones installed on the Debian machines?
Re: Gambas 3 and Touchscreen app
I think I have possibly discovered the problem here. My kiosk app is designed as a dashboard sort of looking thing. I use Pictureboxes with an image to act as a button to trigger/do things. The Pictureboxes of course use the MouseDown event which seems to be the problem with touchscreen monitors...at least I think it is. Rarely it works, but most of the time it doesn't. During testing, all regular buttons appear to work every time they're clicked (finger tapped).
I paused this post for a few minutes while I tested some more and I'm 99% sure this is the problem...finger taps and clickable pictureboxes don't work very well with touchscreens...at least for me
I paused this post for a few minutes while I tested some more and I'm 99% sure this is the problem...finger taps and clickable pictureboxes don't work very well with touchscreens...at least for me