예제 #1
0
 def run(self, startPoint = None):
   self.startPoint = startPoint
   self.regist(startPoint)
   # start method
   if hasattr(startPoint, "start"):
     self.startAppList.append(startPoint)
   App.run(self)
예제 #2
0
def voltar():
    janela = App()
    Window.clearcolor = [0, 0, 0, 0]
    Window.size = 800, 600
    janela.title, janela.build = 'Contabilidade Cabral', build
    janela2.stop()
    janela.run()
예제 #3
0
    def test_kivy(self):
        try:
            from async_gui.toolkits.kivy import KivyEngine
            from kivy.app import App
            from kivy.clock import Clock
        except ImportError:
            return self.skipTest("Kivy not installed")

        called = [False]
        root = App()
        Clock.schedule_once(lambda e: self._check_toolkit( KivyEngine,
                            root, root.stop, called))
        root.run()
        self.assertTrue(called[0])
예제 #4
0
 def test_start_raw_app(self):
     lang._delayed_start = None
     a = App()
     Clock.schedule_once(a.stop, .1)
     a.run()
예제 #5
0
        
        self.add_widget(self._text_box)
        layout = BoxLayout(orientation="vertical", size_hint=(.5, 1))
        layout.add_widget(self._up_button)
        layout.add_widget(self._down_button)
        self.add_widget(layout)

    def on_value(self, instance, value):
        if value < self.minimum:
            self.value = self.minimum
        elif value > self.maximum:
            self.value = self.maximum
        else:
            self._text_box.text = str(value)

    def _from_text(self, *args):
        self.value = int(self._text_box.text)

    def _increment(self, *args):
        self.value += 1

    def _decrement(self, *args):
        self.value -= 1


if __name__ == '__main__':
    from kivy.app import App
    app = App()
    app.root = SpinBox(minimum=-10, maximum=10)
    app.run()
예제 #6
0
파일: test_app.py 프로젝트: Ghopper21/kivy
 def test_start_raw_app(self):
     a = App()
     Clock.schedule_once(a.stop, .1)
     a.run()
예제 #7
0
파일: app.py 프로젝트: TadLeonard/bewth
 def run(self, *args, **kwargs):
     App.run(self, *args, **kwargs)
예제 #8
0
 def run(self, startPoint = None):
   self.startPoint = startPoint
   self.regist(startPoint)
   App.run(self)
예제 #9
0
    ed = TextInput(text="teste")
    ed =ed.global
    ed.size_hint = None, None
    ed.height = 300
    ed.width = 400
    ed.y = 250
    ed.x = 90


    btn = Button(text="Clique aqui")
    btn.size_hint = None, None
    btn.width = 200
    btn.height = 50
    btn.y = 150
    btn.x = 200
    btn.on_press= click()
    layout.add_widget(ed)
    layout.add_widget(btn)

    return layout
#antes de posicionar um componente deve se dizer as dimensões dele

wind = App()
from kivy.core.window import Window
wind.title="Testes"
Window.size = 600, 600
wind.build = build
wind.run()

예제 #10
0
#encoding :utf-8
from kivy.app import App
from kivy.uix.label import Label


def build():
    return Label(text ="Hello World")


hw=App()#diz que o nome da instancia é o hw

hw.build = build #associa o hw a função build mas sem executa-la para que ela só seja executada dentro do aplicativo quando o quesito for atendido com por exemplo chamar a tela

hw.run()#executa o codigo



#App().run()# faz a tela abrir e executa ela em geral abre apenas uma tela preta que contem as funções do sistema em execução