diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-02-26 22:38:06 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-02-27 00:52:22 +0000 |
| commit | a9141d94e3313cc3e39f0ade703e564840689c4f (patch) | |
| tree | 47c833b155ce797eb7a80f8a60bf50fef18b56b6 /src/wx/editable_list.h | |
| parent | 71e6e81dc732f262ed7ce7011f1729bcd3e03dd2 (diff) | |
Fix layout of KDM CC configuration (#793).
Diffstat (limited to 'src/wx/editable_list.h')
| -rw-r--r-- | src/wx/editable_list.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/wx/editable_list.h b/src/wx/editable_list.h index 1f0ead3cd..47eb254e9 100644 --- a/src/wx/editable_list.h +++ b/src/wx/editable_list.h @@ -52,9 +52,9 @@ public: wxBoxSizer* s = new wxBoxSizer (wxVERTICAL); SetSizer (s); - wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP); - table->AddGrowableCol (0, 1); - s->Add (table, 1, wxEXPAND); + _table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP); + _table->AddGrowableCol (0, 1); + s->Add (_table, 1, wxEXPAND); long style = wxLC_REPORT | wxLC_SINGLE_SEL; if (title) { @@ -70,7 +70,7 @@ public: _list->InsertColumn (i, ip); } - table->Add (_list, 1, wxEXPAND | wxALL); + _table->Add (_list, 1, wxEXPAND | wxALL); { wxSizer* s = new wxBoxSizer (wxVERTICAL); @@ -82,7 +82,7 @@ public: } _remove = new wxButton (this, wxID_ANY, _("Remove")); s->Add (_remove, 0, wxTOP | wxBOTTOM, 2); - table->Add (s, 0); + _table->Add (s, 0); } _add->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&EditableList::add_clicked, this)); @@ -121,6 +121,11 @@ public: return all[item]; } + void layout () + { + _table->Layout (); + } + boost::signals2::signal<void ()> SelectionChanged; private: @@ -219,6 +224,7 @@ private: wxButton* _edit; wxButton* _remove; wxListCtrl* _list; + wxFlexGridSizer* _table; }; #endif |
