St.button Issues

When I write
if st.button(“text”):
print(“text”)

When I run it to the Streamlit local, the text does not appear. Did I do something wrong within my code?

Hi

you must add

if st.button ("Print:"):
   st.write("text")

Thank you so much! By the way, I have 2 questions if that’s ok. :wink:

  1. Can we change size of buttons?
  2. Let’s say we have 2 buttons. When I press on 1, can we use
    if button1:
    delattr(st.button, “button2”)?
    Thank you!

Hi,

check this link about the functionalities:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.