Last active
December 20, 2015 20:49
-
-
Save pamolloy/6193223 to your computer and use it in GitHub Desktop.
Executing the original code generated a window with only one widget (see http://i.imgur.com/JALe6q4.png). The problem was that I called the parent class within the super function.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.app import App | |
from kivy.uix.gridlayout import GridLayout | |
from kivy.uix.button import Button | |
from kivy.uix.textinput import TextInput | |
class TestPlan(GridLayout): | |
def __init__(self, **kwargs): | |
super(TestPlan, self).__init__(**kwargs) | |
self.cols=2 | |
self.add_widget(Button(text="Description")) | |
self.username=TextInput(multiline=False) | |
self.add_widget(self.username) | |
self.add_widget(Button(text="New")) | |
class Test(App): | |
def build(self): | |
return TestPlan() | |
Test().run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment