Gambas 3 and Touchscreen app

Post

Posted
Rating:
#1 (In Topic #1066)
Regular
rj71 is in the usergroup ‘Regular’
 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?
Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Guru
cogier is in the usergroup ‘Guru’
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.
Online now: No Back to the top

Post

Posted
Rating:
#3
Regular
rj71 is in the usergroup ‘Regular’
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...?
Online now: No Back to the top

Post

Posted
Rating:
#4
Regular
rj71 is in the usergroup ‘Regular’
 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.
Online now: No Back to the top

Post

Posted
Rating:
#5
Regular
rj71 is in the usergroup ‘Regular’
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?
Online now: No Back to the top

Post

Posted
Rating:
#6
Avatar
Guru
cogier is in the usergroup ‘Guru’
You can easily test your original program by changing the Components with Projects>Properties>Components.
Online now: No Back to the top

Post

Posted
Rating:
#7
Regular
rj71 is in the usergroup ‘Regular’
 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.
Online now: No Back to the top

Post

Posted
Rating:
#8
Regular
rj71 is in the usergroup ‘Regular’
 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.
Online now: No Back to the top

Post

Posted
Rating:
#9
Avatar
Guru
cogier is in the usergroup ‘Guru’
 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?
Online now: No Back to the top

Post

Posted
Rating:
#10
Regular
rj71 is in the usergroup ‘Regular’
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 :)
Online now: No Back to the top

Post

Posted
Rating:
#11
Regular
rj71 is in the usergroup ‘Regular’
 Hi cogier, I think I have discovered the problem but to answer your question, yes I tried to install gb.gtk3.webview…Debian says it's not in the repo. I do develop on Ubuntu 22 (Gambas 3.16.3 is what I have)  and target machines are usually Debian Bullseye (Gambas3 3.15.2). For some reason I thought Ubuntu 22 and Debian 11 had the same Gambas version…guess I was wrong. Nevertheless, it appears the finger tap problem may have been solved per my previous post. It looks as though I may have to rethink the clickable Pictureboxes with a touchscreen. Thanks for your help!
Online now: No Back to the top

Post

Posted
Rating:
#12
Regular
rj71 is in the usergroup ‘Regular’
 So just some quick testing on how to solve my picturebox_MouseDown event that doesn't work with touchscreens… replacing it with the DblClick event seems to solve the problem. It's not really a double click when tapping with a finger…just a single tap seems to do it. Hope this helps if someone else runs into this problem using a touchscreen.
Online now: No Back to the top

Post

Posted
Rating:
#13
Regular
rj71 is in the usergroup ‘Regular’
 Well crap. Looks like I was wrong. DblClick doesn't seem to work on the kiosk app but did work on the other test app. I'm not sure how to solve this without replacing all pictureboxes with buttons. I'd rather not do that because the images are transparent and I have something kinda cool going on on the desktop that I want visible. Not to mention pictures on buttons don't have the mode selection so they look terrible.
Online now: No Back to the top

Post

Posted
Rating:
#14
Regular
rj71 is in the usergroup ‘Regular’
 I'm going to spin up a Debian 12 vm which I believe has Gambas 3.18, I think that should have all the GTK3 components including webview which I need. I'll switch the app to GTK3 and test it out. Hopefully that solves my picturebox mousedown touchscreen problem.
Online now: No Back to the top

Post

Posted
Rating:
#15
Avatar
Administrator
gbWilly is in the usergroup ‘unknown’

rj71 said

I'm going to spin up a Debian 12 vm which I believe has Gambas 3.18
Debian 11 has Gambas 3.18.0 in Backports and it does have the gambas3-gtk-webview and the gambas3-qt5-webview, so no need to go Debian 12.
Add this to your /etc/apt/sources.list and your good to go:

Code

deb http://deb.debian.org/debian bullseye-backports main contrib non-free
To install latest Gambas do:

Code

sudo apt update
sudo apt install gambas3 -t bullseye-backports
It will only install what is needed for Gambas3 from backports, nothing more.

gbWilly
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories


… there is always a Catch if things go wrong!
Online now: No Back to the top

Post

Posted
Rating:
#16
Regular
rj71 is in the usergroup ‘Regular’
 I didn't know that…wow. I'll add backports and try the app again. Thank you!
Online now: No Back to the top

Post

Posted
Rating:
#17
Regular
rj71 is in the usergroup ‘Regular’
 So I added backports and upgraded Gambas. It is now 3.18.0 but it's still not letting me tap the picturebox_mousedown. It's ok though, now that I have GTK3 updated and with webview, I can switch the pictureboxes to a button with a transparent background and image. I'll make that work. Thanks for the help cogier and gbWilly!
Online now: No Back to the top

Post

Posted
Rating:
#18
Avatar
Administrator
gbWilly is in the usergroup ‘unknown’
Your welcome,

Post us an update on how things work out.. ;)

gbWilly
- Gambas Dutch translator
- Gambas wiki content contributor
- Gambas debian/ubuntu package recipe contributor
- GambOS, a distro for learning Gambas and more…
- Gambas3 Debian/Ubuntu repositories


… there is always a Catch if things go wrong!
Online now: No Back to the top

Post

Posted
Rating:
#19
Regular
rj71 is in the usergroup ‘Regular’
 Just a quick update on this project. I just keep running into more and more problems. I have several forms that have a scrollview that is dynamically populated with buttons w/images (not pictureboxes anymore) with info coming from a php page. Swiping motions up or down do not seem to work on the surface of the scrollview although finger touches on the actual scroll bar on the side does work but scrolling that way is not going to be acceptable for this project. I need the scrollview because the amount of data coming back from the php page may exceed the screen area and would need to be able to scroll down. Any ideas why the scrollview doesn't work or maybe a different component would be better suited for this?
Online now: No Back to the top

Post

Posted
Rating:
#20
Guru
BruceSteers is in the usergroup ‘Guru’
 No containers do that.

If you click a mouse on the scrollview scrollbar and drag it scrolls the view.

If you do the same not on the scrollbar it does not scroll. Just like your touchscreen app.

If you want that you'll need to detect mouse drag on the contents contained inside the scrollview.

Are touchscreens not set up to scroll when dragging 2 fingers ?
I think a feature like 2 finger swipe is down to the devices input setting not something you can program in gambas.
I could be wrong. You could test input data when 2 finger dragging (it might activate mouse wheel events)
Online now: Yes Back to the top

Post

Posted
Rating:
#21
Regular
rj71 is in the usergroup ‘Regular’
 Thanks Bruce. I have replaced scrollview with webview. I already had the web page built from a similar app I was working on. The webview does what I want which is one finger swipe up/down. Unfortunately, it breaks the UI design I was going for but not a big problem, I'll deal with that.
Online now: No Back to the top
1 guest and 0 members have just viewed this.