-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
49 lines (39 loc) · 1.24 KB
/
main.py
File metadata and controls
49 lines (39 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#coding: utf-8
import kivy
kivy.require('1.9.1')
from kivy.app import App
from kivy.core.window import Window
from kivy.uix.floatlayout import FloatLayout
from kivy.utils import get_color_from_hex
from kivy.uix.image import Image
from kivy.uix.scrollview import ScrollView
from kivy.uix.gridlayout import GridLayout
from kivy.uix.screenmanager import ScreenManager, Screen, NoTransition
from kivy.uix.popup import Popup
from kivy.uix.label import Label
from kivy.uix.button import Button
class Inicial(Screen):
pass
class WidgetsKivy(Screen):
pass
class SintaxePy(Screen):
pass
class SintaxeKv(Screen):
pass
class SintaxeLb(Screen):
def clique(self):
layout = GridLayout(cols=1)
popuplb= Label(text='Você clicou na Label!')
popupbt= Button(text='Fechar Popup')
layout.add_widget(popuplb)
layout.add_widget(popupbt)
popup = Popup(title='Função ao clicar na Label', auto_dismiss=False,content=layout, size_hint=(.5, .3))
popupbt.bind(on_press=popup.dismiss)
popup.open()
class TransicaoTela(ScreenManager):
transition = NoTransition(duration = 0)
class DocApp(App):
def build(self):
return TransicaoTela()
Window.clearcolor = [1, 1, 1, 1]
DocApp().run()