Greetings,
I want to display additional pieces of information in a selectbox, because the information is organized by field I wish to align the fields, as a result, I am using a format_func like:
def display_fancy_label(_x):
_log_list = find_filetype_in_dir(_dir_name=_result_path+_x, _file_type=‘log’)
_png_list = find_filetype_in_dir(_dir_name=_result_path+_x, _file_type=‘png’)
_pth_list = find_filetype_in_dir(_dir_name=_result_path+_x, _file_type=‘pth’)
return ‘{:>100} log({:02d}) png({:02d}) pth({:02d})’.format(_x, len(_log_list), len(_pth_list), len(_png_list))
However, be it in selectbox or even in text, all duplicated spaces are striped, e.g.:
ex_1 = ’ '*6+‘1’
st.text(ex_1)
Now, for text specifically, it comes from the use of _clean_text line 2618 of DeltaGenerator.py, removing it lead to the correct display. However, I cannot yet find where a similar stripping had been done for the display of options in selectbox. I welcome any solution to make the display ex_1 works correctly as an option in a selectbox. Also, I wonder why the choice had been made to strip spaces by default.