Pesquisar na Comunidade
Mostrando resultados para as tags ''kivy''.
Encontrado 3 registros
-
# -*- coding: utf-8 -*- import requests import kivy import xml.dom.minidom from kivy.app import App from kivy.uix.button import Button from kivy.uix.boxlayout import BoxLayout from kivy.uix.gridlayout import GridLayout from kivy.uix.label import Label from kivy.uix.textinput import TextInput from kivy.uix.floatlayout import FloatLayout layout = FloatLayout(size=(300,300),background_color=(0,10,10,1)) btnTemperatura = Button(id='244',text = 'Temperatura',size_hint_y=.1); lbldia1 = Label(text='',pos=(.100,250)) lbldia2 = Label(text='',pos=(.100,250)) lbldia3 = Label(text='',pos=(.100,250)) lbldia4 = Label(text='',pos=(.100,250)) class MyApp(App): def build(self): layout.add_widget(lbldia1) layout.add_widget(lbldia2) layout.add_widget(lbldia3) layout.add_widget(lbldia4) btnTemperatura.bind(on_press=Temperatura(1)) layout.add_widget(btnTemperatura) return layout def Temperatura(self,x): print str(x) if __name__ == '__main__': MyApp().run() Erro : File "cidades2.py", line 26, in build btnTemperatura.bind(on_press=Temperatura(1)) TypeError: Temperatura() takes exactly 2 arguments (1 given)
-
Como posso fazer o kivy aceitar UTF-8? Os textos que coloco no kivy ficam estranhos. Muito obrigado.
-
- acentuação
- kivy
-
(e %d mais)
Tags: