X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f55d21ebb5d3392dd7e5990f7bdbb523f3089f6d..5bf2abe34850e0952a44f3be4a4390ea12c55bd0:/contrib/src/gizmos/editlbox.cpp diff --git a/contrib/src/gizmos/editlbox.cpp b/contrib/src/gizmos/editlbox.cpp index 28a43fa5d1..b993e11a5a 100644 --- a/contrib/src/gizmos/editlbox.cpp +++ b/contrib/src/gizmos/editlbox.cpp @@ -65,6 +65,7 @@ private: void OnSize(wxSizeEvent& event) { SizeColumns(); + event.Skip(); } }; @@ -105,8 +106,9 @@ END_EVENT_TABLE() wxEditableListBox::wxEditableListBox(wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos, const wxSize& size) - : wxPanel(parent, id, pos, size), m_edittingNew(FALSE) + const wxPoint& pos, const wxSize& size, + const wxString& name) + : wxPanel(parent, id, pos, size, wxTAB_TRAVERSAL, name), m_edittingNew(FALSE) { wxSizer *sizer = new wxBoxSizer(wxVERTICAL); @@ -133,7 +135,8 @@ wxEditableListBox::wxEditableListBox(wxWindow *parent, wxWindowID id, m_listCtrl = new CleverListCtrl(this, wxID_ELD_LISTCTRL, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_NO_HEADER | - wxLC_SINGLE_SEL | wxSUNKEN_BORDER); + wxLC_SINGLE_SEL | wxSUNKEN_BORDER | + wxLC_EDIT_LABELS); wxArrayString empty_ar; SetStrings(empty_ar); @@ -141,6 +144,7 @@ wxEditableListBox::wxEditableListBox(wxWindow *parent, wxWindowID id, SetAutoLayout(TRUE); SetSizer(sizer); + Layout(); } void wxEditableListBox::SetStrings(const wxArrayString& strings) @@ -186,10 +190,7 @@ void wxEditableListBox::OnEndLabelEdit(wxListEvent& event) { m_edittingNew = FALSE; if (!event.GetText().IsEmpty()) - { - printf("X-\n"); m_listCtrl->InsertItem(m_listCtrl->GetItemCount(), _T("")); - } } }