#🔒 guizero Changing text
28 messages · Page 1 of 1 (latest)
@velvet magnet
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
!code
Can you put the code into a code block please?
you again?
I would recommend you to learn OOP as that gives a good idea on how these packages work and you will be able to use most packages just by looking at the docs without tutorial.
lol I’m just tryna get by with the program
My teacher made me lose interest 5 weeks ago so I’m doing the best I can until something else pops up that is more important
Ok one moment
Hey @velvet magnet!
It looks like you are trying to paste code into this channel.
You seem to be using the wrong symbols to indicate where the code block should start. The correct symbols would be ```, not '''.
Furthermore, it looks like you pasted Python code without syntax highlighting. Please use syntax highlighting to improve the legibility of your code and make it easier for us to help you.
To do this, use the following method:
```py
print('Hello, world!')
```
This will result in the following:
print('Hello, world!')```
You can **edit your original message** to correct your code block.
def update_text(slide_value):
temp = int(slide_value)
if temp == 0:
status.text_color = 'black'
status.text = 'Engine Off'
waf.color = 'black'
elif 1 < temp < 194:
status.text_color = 'blue'
status.text = 'Engine Warming/Cooling'
waf.color = 'blue'
elif 195 < temp < 220:
status.text_color = 'green'
status.text = 'Engine Temp Normal'
waf.color = 'green'
elif 221 < temp < 300:
status.text_color = 'red'
status.text = 'Engine Overheating'
waf.color = 'red'
app = App(title="Coolant Temperature", width=300, height=250, bg="pink")
Text(app, height=1)
slide = Slider(app, start=0, end=300, horizontal=False, width=20, height=130, align='left',command=update_text)
waf = Waffle(app, height=1, width=1, dim=50, dotty=True,color='black', pad=75)
status = Text(app, text='Engine Off', size=12, font="Helvtica", align='bottom', width='fill')
app.display()```
That's literally the exact same code that I gave you, no changes at all
I understand that but the text was supposed to change
So I tried other things before asking best believe
yes I also understand that but I didn't do that because I left that task for you
what did you try that didn't work
I spent the rest of the day tryna figure that part out before I took a break
Idk done forgot at this point
Sorry that information I provided doesn’t help
just replace status.text with status.value
you could have easily found the problem yourself by reading the docs if you knew OOP
Ok well sorry, thanks for your help anyways
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.