Python Forum

Full Version: Python tkinter question tablet
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello.I have a question about GUI python tkinter.For example if I have buttons and joystick in my app I control them with my mouse.So,if I have a tablet ,can I control joystick and buttons with my fingers ( for example when I move my finger around I want joystick to move wherever my finger moves) or I have to write other commands to control my app with fingers ?
Maybe this question is a little bit stupid,but I want to know.
Thanks. Smile Big Grin
you are better off using kivy for this type of application
Can I do it with tkinter?
If tkinter is useless for mobile apps, then if I use kivy can I run my app on a tablet(touch screen) with the same way I run it to my laptop(without any changes of code)?
For example I want to use mouse to laptop and my fingers to tablet.The code will be tha same?
Thanks.
I'm not real familiar with Kivy, used it enough to get a basic feel, But I believe that one of it's main features is portability, and capability to run on phone tablet and/or desktop.

This is their opening statement:

Cross platform

Quote:Kivy runs on Linux, Windows, OS X, Android, iOS, and Raspberry Pi. You can run the same code on all supported platforms.

It can natively use most inputs, protocols and devices including WM_Touch, WM_Pen, Mac OS X Trackpad and Magic Mouse, Mtdev, Linux Kernel HID, TUIO. A multi-touch mouse simulator is included.

more here: https://kivy.org/#home

tkinter is a wrapper around TCL/TK and by it's nature is somewhat outdated. It's still quite valid for simple applications.
Qt5 is chosen by many but has a restriction in taht commercial applications are have a fee based system.

Personally, I prefer wxpython phoenix, but it has a higher learning curve.
Kivy will get you up and running sooner and cover most common platforms from the get go.
Today I spent a lot of hours to install kivy buildozer cython from a lot of websites in order to run my app to my android phone and I always have a problem with the last command which is this one: buildozer -v android debug

What shoud I do?
Ask for help on a kivy forum? I don't think kivy is all that popular here, nor portable devices for that matter. You might have better luck getting information elsewhere.
Ok,I did it. I have one more question.If I use raspberry pi to run my app and connect my tablet to raspberry pi via VNC ,will I be able to use my fingers to touch screen of tablet to push a button (for example) or not?

Thanks again.
Quote:If I use raspberry pi to run my app and connect my tablet to raspberry pi via VNC ,will I be able to use my fingers to touch screen of tablet to push a button (for example) or not?
This article addresses that question:
http://mattrichardson.com/kivy-gpio-rasp...index.html