2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Streamlit AG-Grid の横幅max値について

Posted at

小ネタです

横幅の固定は、引数で辞書を与えると出来ました。
まさにソースを読めという感じですね。

 **other_default_column_properties:
                Key value pairs that will be merged to defaultColDef dict.
                Chech ag-grid documentation.

こんな感じで与えます。
**{"maxWidth":"150"}

**は辞書型の引数を与えるpython記号です。

python.py
gd= GridOptionsBuilder.from_dataframe(df_sel)
gd.configure_default_column(min_column_width=10,**{"maxWidth":"150"})
gridOptions = gd.build()
grid_table = AgGrid(df_sel, 
   gridOptions=gridOptions,  height=500,
               width = 20,key='grid3',
                fit_column_on_grid_load = True
  )
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?