June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 deletions
20
Task/Hello-world-Graphical/Python/hello-world-graphical-7.py
Normal file
20
Task/Hello-world-Graphical/Python/hello-world-graphical-7.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
from kivy.app import App
|
||||
from kivy.uix.floatlayout import FloatLayout
|
||||
from kivy.uix.button import Button
|
||||
from kivy.uix.popup import Popup
|
||||
from kivy.uix.label import Label
|
||||
|
||||
|
||||
class GoodByeApp(App):
|
||||
def build(self, *args, **kwargs):
|
||||
layout = FloatLayout()
|
||||
ppp = Popup(title='Goodbye, World!',
|
||||
size_hint=(0.75, 0.75), opacity=0.8,
|
||||
content=Label(font_size='50sp', text='Goodbye, World!'))
|
||||
btn = Button(text='Goodbye', size_hint=(0.3, 0.3),
|
||||
pos_hint={'center': (0.5, 0.5)}, on_press=ppp.open)
|
||||
layout.add_widget(btn)
|
||||
return layout
|
||||
|
||||
|
||||
GoodByeApp().run()
|
||||
Loading…
Add table
Add a link
Reference in a new issue