-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Labels
BugSomething isn't workingSomething isn't workingGood first issueGood for newcomersGood for newcomersRendererIssue has to do with RendererIssue has to do with Renderer
Milestone
Description
I know this question has been asked before, but the fix for it didn't apply to my code. The code is very simple, and I don't know what's happening.
What's supposed to happen is then when the button is pressed, it runs the hello() function, which adds a label to the screen saying You Pressed me!. But, an error pops up saying AttributeError: 'NoneType' object has no attribute 'set_color_mode'.
Here is my code:
import py_cui
root = py_cui.PyCUI(14, 18)
def hello():
root.add_label("You Pressed me!", 0, 0)
button = root.add_button('Button Text', 1, 2, column_span=2, command=hello())
root.start()Metadata
Metadata
Assignees
Labels
BugSomething isn't workingSomething isn't workingGood first issueGood for newcomersGood for newcomersRendererIssue has to do with RendererIssue has to do with Renderer