//файл Python
Код: Выделить всё
class MyApp(App):
def build(self):
Builder.load_file('widgets.kv')
return countryLists()
class countryLists(Widget):
def countryList(self):
return pd.read_csv('./data.csv')['Country'].tolist()
if __name__ == '__main__':
MyApp().run()
:
Код: Выделить всё
Spinner:
id: spinner1
text: 'select country'
values: root.countryList()
font_size: 24
bold: True
pos_hint: {"center_x": 0.5, "center_y": 0.5}
anchor: 'center'
введите описание изображения здесь
Подробнее здесь: https://stackoverflow.com/questions/790 ... er-in-kivy
Мобильная версия