test non-resizeable and resizeable but with min size set columns
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57198 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -841,17 +841,18 @@ MyFrame::MyFrame(wxFrame *frame, const wxString &title, int x, int y, int w, int
|
|||||||
#if 0
|
#if 0
|
||||||
// Call this and sorting is enabled
|
// Call this and sorting is enabled
|
||||||
// immediatly upon start up.
|
// immediatly upon start up.
|
||||||
column0->SetSortOrder( true );
|
column0->SetAsSortKey();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
tr = new wxDataViewTextRenderer( wxT("string"), wxDATAVIEW_CELL_EDITABLE );
|
tr = new wxDataViewTextRenderer( wxT("string"), wxDATAVIEW_CELL_EDITABLE );
|
||||||
wxDataViewColumn *column1 = new wxDataViewColumn( wxT("artist"), tr, 1, 150, wxALIGN_LEFT,
|
wxDataViewColumn *column1 = new wxDataViewColumn( wxT("artist"), tr, 1, 150, wxALIGN_LEFT,
|
||||||
wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_REORDERABLE | wxDATAVIEW_COL_RESIZABLE );
|
wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_REORDERABLE | wxDATAVIEW_COL_RESIZABLE );
|
||||||
|
column1->SetMinWidth(150); // this column can't be resized to be smaller
|
||||||
m_musicCtrl->AppendColumn( column1 );
|
m_musicCtrl->AppendColumn( column1 );
|
||||||
|
|
||||||
wxDataViewSpinRenderer *sr = new wxDataViewSpinRenderer( 0, 2010, wxDATAVIEW_CELL_EDITABLE, wxALIGN_RIGHT );
|
wxDataViewSpinRenderer *sr = new wxDataViewSpinRenderer( 0, 2010, wxDATAVIEW_CELL_EDITABLE, wxALIGN_RIGHT );
|
||||||
wxDataViewColumn *column2 = new wxDataViewColumn( wxT("year"), sr, 2, 100, wxALIGN_LEFT,
|
wxDataViewColumn *column2 = new wxDataViewColumn( wxT("year"), sr, 2, 60, wxALIGN_LEFT,
|
||||||
wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_REORDERABLE | wxDATAVIEW_COL_RESIZABLE );
|
wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_REORDERABLE );
|
||||||
m_musicCtrl->AppendColumn( column2 );
|
m_musicCtrl->AppendColumn( column2 );
|
||||||
|
|
||||||
wxArrayString choices;
|
wxArrayString choices;
|
||||||
|
Reference in New Issue
Block a user