0
如何將標籤的文本立即更改爲滑塊的值。如何顯示滑塊值,因爲它在Python中變化kivy
這是我當前的代碼
import kivy
kivy.require('1.10.0')
from kivy.app import App
from kivy.uix.slider import Slider
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.label import Label``
class app(App):
def build(self):
layout = BoxLayout(orientation='vertical')
slide = Slider(min=-100, max=100,value=0)
label = Label(text=str(slide.value))
layout.add_widget(slide)
layout.add_widget(label)
return layout
app().run()
我想在python
如果下面的答案有效,請將其標記爲已接受。謝謝! – Mox