question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Input for GUIZero

See original GitHub issue

In this practice code I have C = 8 and D = 2, I would like to replace this with a input function that GuiZero recognize.

Been having great success with GuiZero I have just overlooked the input function.

Thanks

from guizero import App, Text
def update_writing():    
 
    C = 8
    D = 2
    A = C + D
    B = A/2
   
    writing1.value = A
    writing2.value = B
    
    
    
    app.after(200, update_writing)

app = App(height=500, width=500,bg="black")

writing1 = Text(app, text="A", color="green",size=50,bg="black")
writing2 = Text(app, text="B", color="green",size=50,bg="black")


app.after(200, update_writing)
app.display()


Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
martinohanloncommented, Mar 8, 2018

To get some input from a user using a GUI you need to put something on the screen for them to either type into or click. There is an example of how to use a TextBox here - https 😕/lawsie.github.io/guizero/textbox/

Have a look at this tutorial https://projects.raspberrypi.org/en/projects/getting-started-with-guis it was created by @lawsie who created guizero and recently updated by me. It will take you through the how to create a GUI which displays output , gets input from a user and reacts to events.

0reactions
James100000commented, Mar 8, 2018

Dose the input command only work on these,TextBox, Combo, ButtonGroup, Slider? Would “my_input.value” work on the import Text?

I am trying to obtain user input with the above program.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TextBox - guizero - GitHub Pages
The TextBox object displays a text box which the user can type in. TextBox on Windows. How do I make one? Create a...
Read more >
Using Python GUIZERO how to access textbox input data from ...
I'm working on a UI project using guizero and I need to be able to extract user input data from a textbox on...
Read more >
CIS30A Programming GUI in Python using GUIZero Part 1
Use GUIZERO package to program GUI in Python. Add window, title, text, textbox, button, slider and image widgets.
Read more >
Using GUIZERO how to access textbox input data ... - Reddit
I'm working on a UI project using guizero and I need to be able to extract user input data from a textbox on...
Read more >
GUIZERO - input_box = TextBox - Raspberry Pi Forums
I setup an input_box = textbox (example below) in three actions if a button is pressed a command runs and a log file...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found