Getting Started

To start using KivyDK, you must first install the Kivy framework on your system. Once Kivy is installed, you can proceed to install KivyDK.

Caution

KivyDK depends on Kivy. Before using KivyDK, you should already be familiar how to work with Kivy.


Installation

C:\> pip install kivydk

The command above installs the most recent stable version of KivyDK from PyPI.

If you want to install the development version from github, use the ZIP archive:

C:\> pip install https://github.com/kmcasi/KivyDK/archive/master.zip

First KivyDK application

 1#// IMPORT
 2from kivy.app import App
 3from kivydk.examples.ButtonIcon import ButtonIcon
 4
 5
 6#// LOGIC
 7class TestApp(App):
 8    def build(self):
 9        self.count = 0
10        self.button = ButtonIcon(text="Button", size_hint_y=None, height=50)
11        self.button.bind(on_click=self._do_clicking)
12
13        return self.button
14
15    def _do_clicking(self, *args):
16        self.count += 1
17        print("Button clicked %.2d times" % self.count)
18
19
20#// RUN FILE
21if __name__ == "__main__":
22    TestApp().run()

This small example demonstrates the hover and click system. Each time the button is clicked, a message similar to the following will appear in the console:

Terminal output
Button clicked 01 times
Button clicked 02 times
Button clicked 03 times