Beruflich Dokumente
Kultur Dokumente
<mainW>:
orientation: "vertical" Button:
text: 'Reset'
Label: font_name: 'Roboto'
id: time font_size: 25
text: '[b]00[/b]:00:00 INFORMACION DE bold: True
LABEL' halign: 'right'
font_name: 'Roboto' valign: 'middle'
font_size: 25
markup: True
size_hint_y: 0 Label:
#definir el tamaño del texto como igual a text: 'INFORM'
su wigeth contenedor es esencial para luego font_name: 'Roboto'
definir su font_size: 25
#alineacion markup: True
text_size:self.size color: 1,0,0
halign:'left' bold: True
valign:'middle'
canvas.before:
Color:
rgb: 0,0,1
Rectangle:
pos: self.pos
size: self.size #size: self.width,
self.height
BoxLayout:
orientation: 'horizontal'
height: 90
#size_hint_max_y: 50
#size_hint_min_y: 50
bold: True
size_hint_x: .9
INICIO DEL CODIGO BASICO signin.py, LUEGO DE ESTO FlatButton:
VIENE EL CODIGO signin.kv, ESTE DEBE ESTAR EN EL text: "x"
MISMO DIRECTORIO RAIZ QUE EL .PY size_hint_x: .1
BoxLayout:
from kivy.uix.boxlayout import BoxLayout orientation: 'vertical'
from kivy.uix.button import Button padding: main_win.space_x, 10
from kivy.app import App #spacing: 20
BoxLayout:
class ejemploW(BoxLayout): orientation: "vertical"
pass spacing: 10
size_hint_y: None
class Signin(App): height: 80
def build(self): TextInput:
return ejemploW() hint_text: "Username"
multiline: False
if __name__== "__main__": TextInput:
sa = Signin() hint_text: "Password"
sa.run() multiline: False
Label:
FIN DEL CODIGO BASICO signin.py, LUEGO DE ESTO id: sp
VIENE EL CODIGO signin.kv, ESTE DEBE ESTAR EN EL size_hint_y: None
MISMO DIRECTORIO RAIZ QUE EL .PY height: 40
Button:
text: "Sign In"
<FlatButton@ButtonBehavior+Label>: size_hint_y: None
font_size: 16 height: 40
background_color: (.06,.45,.45, 1)
<ejemploW>: background_normal: ''
id: main_win Label:
orientation: "vertical" id: sp2
spacing: 10
space_x: self.size[0]/3
canvas.before:
Color:
rgba: (1,1,1, 1)
Rectangle:
size: self.size
pos: self.pos
BoxLayout:
size_hint_y: None
height: 50
canvas.before:
Color:
rgba: (.06, .45, .45, 1)
Rectangle:
size: self.size
pos: self.pos
Label:
text: "Access Control"