Allow increasing the size of the last column in wxDataViewCtrl

Previously, the last column couldn't be effectively resized at all, as
its size was always automatically set to the remaining width of the
window after subtracting the widths of all the previous columns. Now
this is only done if this remaining width is greater than the width
given to the column by the user or by the program.

Effectively, this means that the user can now drag-resize the column to
increase its size (at the price of showing the horizontal scrollbar).

See #18295.
This commit is contained in:
Vadim Zeitlin
2018-12-15 14:27:52 +01:00
parent 68bb67c009
commit 2340a16d18
3 changed files with 24 additions and 6 deletions

View File

@@ -793,7 +793,7 @@ void MyFrame::BuildDataViewCtrl(wxPanel* parent, unsigned int nPanel, unsigned l
lc->AppendColumn(colRadio, "bool");
lc->AppendTextColumn( "Text" );
lc->AppendProgressColumn( "Progress" );
lc->AppendProgressColumn( "Progress" )->SetMinWidth(100);
wxVector<wxVariant> data;
for (unsigned int i=0; i<10; i++)