Hello!
Can you give me an example of Button widget in Kivy language?
I can creat the button but don't know how to use it's callback. I mean how can i set a command for the Button in Kivy?
Niloofar24 15 Posting Whiz
Recommended Answers
Jump to PostWhich tutorial are you using?
Jump to PostThis is how I would do it ...
''' kivy_button_label101.py create a touch sensitive button with Python module kivy add a label to show action info: http://kivy.org/docs/api-kivy.uix.button.html
Jump to PostYou need to learn the basics of a Python class!
bind() creates an event that is send to callback()
I don't use .kv files for simple programs, just another special syntax to manage and errors are hard to trace!
All 10 Replies
Niloofar24 15 Posting Whiz
Froweey 29 Newbie Poster
vegaseat 1,735 DaniWeb's Hypocrite Team Colleague
Niloofar24 15 Posting Whiz
vegaseat 1,735 DaniWeb's Hypocrite Team Colleague
Niloofar24 15 Posting Whiz
vegaseat 1,735 DaniWeb's Hypocrite Team Colleague
vegaseat 1,735 DaniWeb's Hypocrite Team Colleague
Niloofar24 15 Posting Whiz
M_12 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.