Answer the question
In order to leave comments, you need to log in
`
Problem in module working with kivy. There is both of languages. The problem in the end and i didn`t understand it at all. Pls can u help?
1-st is
code
from kivy.app import App
from kivy.uix.gridlayout import GridLayout
from kivy.uix.button import Button
from kivy.uix.widget import Widget
from kivy.uix.label import Label
from kivy.uix.boxlayout import BoxLayout
from kivy.config import Config
Config.set('graphics', 'resizable', 0)
Config.set('graphics', 'width', 400) # Ширина
Config.set('graphics', 'heith', 500)
class My(App):
def build(self):
bl = BoxLayout(orientation = 'vertical', padding = 25)
gl = GridLayout(cols = 4, spacing = 3, size_hint = (1, .6))
self.lbl = Label( text = '01234', font_size = 40, holign = 'right', size_hint = (1, .4))
bl.add_widget( self.lbl )
gl.add_widget( Button(text = '7'))
gl.add_widget( Button(text = '8'))
gl.add_widget( Button(text = '9'))
gl.add_widget( Button(text = 'X'))
gl.add_widget( Button(text = '4'))
gl.add_widget( Button(text = '5'))
gl.add_widget( Button(text = '6'))
gl.add_widget( Button(text = '-'))
gl.add_widget( Button(text = '1'))
gl.add_widget( Button(text = '2'))
gl.add_widget( Button(text = '3'))
gl.add_widget( Button(text = '+'))
gl.add_widget( text = '')
gl.add_widget( Button(text = '0'))
gl.add_widget( Button(text = '.'))
gl.add_widget( Button(text = '='))
bl.add_widget( gl )
return bl
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question