Gambas 3 and Touchscreen app

Post your Gambas programming questions here.
rj71
Posts: 27
Joined: Thursday 13th April 2023 6:39pm

Re: Gambas 3 and Touchscreen app

Post by rj71 »

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!
rj71
Posts: 27
Joined: Thursday 13th April 2023 6:39pm

Re: Gambas 3 and Touchscreen app

Post by rj71 »

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.
rj71
Posts: 27
Joined: Thursday 13th April 2023 6:39pm

Re: Gambas 3 and Touchscreen app

Post by rj71 »

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.
rj71
Posts: 27
Joined: Thursday 13th April 2023 6:39pm

Re: Gambas 3 and Touchscreen app

Post by rj71 »

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.
User avatar
gbWilly
Posts: 68
Joined: Friday 23rd September 2016 11:41am
Location: Netherlands
Contact:

Re: Gambas 3 and Touchscreen app

Post by gbWilly »

rj71 wrote: Thursday 6th July 2023 8:41pm 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: Select all

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

Code: Select all

sudo apt update
sudo apt install gambas3 -t bullseye-backports
It will only install what is needed for Gambas3 from backports, nothing more.
gbWilly
- Dutch translation for Gambas3
- Gambas wiki content contributer


... there is always a Catch if things go wrong!
rj71
Posts: 27
Joined: Thursday 13th April 2023 6:39pm

Re: Gambas 3 and Touchscreen app

Post by rj71 »

I didn't know that...wow. I'll add backports and try the app again. Thank you!
rj71
Posts: 27
Joined: Thursday 13th April 2023 6:39pm

Re: Gambas 3 and Touchscreen app

Post by rj71 »

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!
User avatar
gbWilly
Posts: 68
Joined: Friday 23rd September 2016 11:41am
Location: Netherlands
Contact:

Re: Gambas 3 and Touchscreen app

Post by gbWilly »

Your welcome,

Post us an update on how things work out.. ;)
gbWilly
- Dutch translation for Gambas3
- Gambas wiki content contributer


... there is always a Catch if things go wrong!
rj71
Posts: 27
Joined: Thursday 13th April 2023 6:39pm

Re: Gambas 3 and Touchscreen app

Post by rj71 »

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?
User avatar
BruceSteers
Posts: 1579
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Gambas 3 and Touchscreen app

Post by BruceSteers »

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)
If at first you don't succeed , try doing something differently.
BruceS
Post Reply