This creates 3 different sections in the final output page, and none of them are related to each other in any way. Is there a way to achieve what I am trying to do in streamlit?
I tired st.markdownas well, same problem.
What I am trying to do is
Option 1:
Start a div
Add a lot of streamlit components, like buttons, text boxes etc ..
Close the div.
Option 2:
I have a table like structure with lot of columns and rows in a container.
I want to add a horizontal scroll bar into the overall container.
I need input boxes and buttons inside the table, hence I was told I can’t use dataframe.
You can’t create open-ended divs like that in Streamlit. Each Streamlit command is wrapped in its own div (even st.html) so incomplete, open HTML can’t span across commands.
st.data_editor let’s you have certain types of input, but yes, buttons are not supported. You can use a checkbox instead of a button, or build buttons on the outside of the dataframe.
I usually think of row selections and st.dataframe for some kind of row-by-row action.
If you just want to wrap a bunch of Streamlit components, use st.container.
Can you describe more specifically what you are trying to accomplish? As described above, you might need a custom component, but you might get away with some CSS hacking on the div from st.container.