I wonder if there is any ways to change the font size of selectbox options?
All of my options are long string and can not display whole when dropdown the selectbox.
Or increase the width of selectbox might also works.
I wonder if there is any ways to change the font size of selectbox options?
All of my options are long string and can not display whole when dropdown the selectbox.
Or increase the width of selectbox might also works.
Hey @ChiHangChen,
Welcome to the Streamlit community!!!
You can’t currently change the font size on the selectbox
options. The width of the selectbox
is the full width of the page, or column its in. Which means that you can make it wider by putting the selectbox
in a wider column.
If you need to make the page layout wider to achieve this you can use the st.set_page_config(layout="wide")
as the first Streamlit call to use all the available space in your app!
Happy Streamlit-ing!
Marisa
I understand, thank you
Think it would be very nice to be able to change font size of select box, sliders … etc. given there are varying amounts of content one is putting into the sidebar.
Couldn’t we show the string entirely when hovering over an element of the selectbox as a compromise ?
This solution works for me:
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.