kivy的Spinner选择框部件的学习,包括py,kv文件,有实操演示效果及源码,及此部件的常用属性:
先看下运行效果
spinner.py源码
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
class SpinnerBox(BoxLayout):
def __init__(self,**kwargs):
super(SpinnerBox, self).__init__(**kwargs)
class SpinnerApp(App):
def build(self):
return SpinnerBox()
if __name__ =='__main__':
from kivy.core.window import Window
Window.clearcolor
文章评论