Hi, I have a wxDataviewListCtrl with 7 columns. Now I have made 5 of these columns resizable using the flag wxDATAVIEW_COL_RESIZABLE. But I want that there should be a minimum threshold with beyond which the user can't shrink the column size.
Please help me, with how can I set this minimum threshold width.
Set Minimum resizable width of column in wxDataViewListCtrl Topic is solved
- doublemax@work
- Super wx Problem Solver
- Posts: 474
- Joined: Wed Jul 29, 2020 6:06 pm
- Location: NRW, Germany
Re: Set Minimum resizable width of column in wxDataViewListCtrl
Try wxSettableHeaderColumn::SetMinWidth() (wxDataViewColumn derives from wxSettableHeaderColumn)
https://docs.wxwidgets.org/trunk/classw ... 3800a3dad3
https://docs.wxwidgets.org/trunk/classw ... 3800a3dad3
Re: Set Minimum resizable width of column in wxDataViewListCtrl
Code: Select all
wxDataViewListCtrl* table = new wxDataViewListCtrl(this, wxID_INDEX, wxDefaultPosition,
wxDefaultSize);
table->AppendToggleColumn("Select", wxDATAVIEW_CELL_ACTIVATABLE, FromDIP(50), wxALIGN_CENTRE, !wxDATAVIEW_COL_RESIZABLE);
table->AppendTextColumn("Full Name", wxDATAVIEW_CELL_INERT, FromDIP(160), wxALIGN_CENTRE, wxDATAVIEW_COL_RESIZABLE);
Re: Set Minimum resizable width of column in wxDataViewListCtrl
Code: Select all
wxDataViewColumn *col = table->AppendToggleColumn("Select", wxDATAVIEW_CELL_ACTIVATABLE, FromDIP(50), wxALIGN_CENTRE, !wxDATAVIEW_COL_RESIZABLE);
col->SetMinWidth(50);
Use the source, Luke!