Kivy is a platform-independent GUI tool in Python. As it can be run on Android, IOS, linux and Windows etc. It is basically used to develop the Android application, but it does not mean that it can not be used on Desktops applications.
In this article we will learn how we can add a button with the Text input in kivy, just like the same we have in the input and submit button. Before proceeding to that you must know about Textinput widget and Button in kivy.
TextInput: The TextInput widget provides a box for editable plain text. Unicode, multiline, cursor navigation, selection and clipboard features are supported.
Button: The Button is a Label with associated actions that are triggered when the button is pressed (or released after a click/touch). We can add functions behind the button and style the button.
To work with Textinput and buttons you have to import it by the command –
from kivy.uix.textinput import TextInput from kivy.uix.button import Button
Basic Approach: 1) import kivy 2) import kivyApp 3) import Button 4) import Boxlayout 5) import Textinput 6) import BoxLayout 7) Set minimum version(optional) 8) create App class 9) return Layout/widget/Class(according to requirement) 10) Run an instance of the class
Implementation of the Approach –
- Text Input box with a verification button in kivy (using .kv file)
- Disable Kivy Button
- Use image as a button in kivy
- Add image button using .kv file in kivy
- Disable kivy button using .kv file
- Change button Color in Kivy
- Python | Button Action in Kivy
- Python - Rounding button corners in kivy
- Change the size and position of button in Kivy
- Python | Toggle button in kivy using .kv file
- Python - Change button color in kivy using .kv file
- Floating Action type button in kivy - Python
- Circular (Oval like) button using canvas in kivy (using .kv file)
- Animated Floating Action Button in kivy - Python
- Python - Rounding button corners in kivy using .kv file
- Python - Change kivy button size and position using kv file
- PyQt5 | How to get the text of Push Button ?
- PyQt5 - setWhatsThis() help text of Radio button
- PyQt5 – How to create and get the help text of Push Button ?
- PyQt5 – Change text in Radio Button on click
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.