Feb-26-2022, 08:02 PM
I follow a tutorial test kivy like below:
from kivy.app import App # importing builder from kivy from kivy.lang import Builder # this is the main class which will # render the whole application class uiApp(App): # method which will render our application def build(self): return Builder.load_string( BoxLayout: size_hint: (1, 1) ScrollView: # here we can set bar color bar_color: [0, 0, 255, 1] # here we can set bar width bar_width: 12 BoxLayout: size: (self.parent.width, self.parent.height-1) id: container orientation: "vertical" size_hint_y: None height: self.minimum_height canvas.before: Color: rgba: rgba("#50C878") Rectangle: pos: self.pos size: self.size Label: size_hint: (1, None) height: 300 markup: True text: "[size=78]GeeksForGeeks[/size]" Label: size_hint: (1, None) height: 300 markup: True text: "[size=78]GeeksForGeeks[/size]" Label: size_hint: (1, None) height: 300 markup: True text: "[size=78]GeeksForGeeks[/size]" Label: size_hint: (1, None) height: 300 markup: True text: "[size=78]GeeksForGeeks[/size]" ) # running the application uiApp().run()
Error: File "/home/mc3/kivy_test.py", line 15
BoxLayout:
^
SyntaxError: invalid syntax
What's problem?