X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/96d24601afde917784dfdbaddf2f0e351ee92e8c..012a01fc1ea0f4c870eaf66bb332617affa5abd0:/contrib/src/gizmos/editlbox.cpp?ds=sidebyside diff --git a/contrib/src/gizmos/editlbox.cpp b/contrib/src/gizmos/editlbox.cpp index 9d20f68546..5e91e34e96 100644 --- a/contrib/src/gizmos/editlbox.cpp +++ b/contrib/src/gizmos/editlbox.cpp @@ -56,7 +56,7 @@ public: void SizeColumns() { int w = GetSize().x; - w -= wxSystemSettings::GetSystemMetric(wxSYS_VSCROLL_X) + 6; + w -= wxSystemSettings::GetMetric(wxSYS_VSCROLL_X) + 6; SetColumnWidth(0, w); } @@ -122,17 +122,28 @@ wxEditableListBox::wxEditableListBox(wxWindow *parent, wxWindowID id, m_bUp = new wxBitmapButton(subp, wxID_ELB_UP, wxBitmap(elup_xpm)); m_bDown = new wxBitmapButton(subp, wxID_ELB_DOWN, wxBitmap(eldown_xpm)); +#if wxUSE_TOOLTIPS m_bEdit->SetToolTip(wxT("Edit item")); m_bNew->SetToolTip(wxT("New item")); m_bDel->SetToolTip(wxT("Delete item")); m_bUp->SetToolTip(wxT("Move up")); m_bDown->SetToolTip(wxT("Move down")); +#endif + +#ifdef __WXMSW__ + #define BTN_BORDER 4 + // FIXME - why is this needed? There's some reason why sunken border is + // ignored by sizers in wxMSW but not in wxGTK that I can't + // figure out... +#else + #define BTN_BORDER 0 +#endif - subsizer->Add(m_bEdit, 0, wxALIGN_CENTRE_VERTICAL); - subsizer->Add(m_bNew, 0, wxALIGN_CENTRE_VERTICAL); - subsizer->Add(m_bDel, 0, wxALIGN_CENTRE_VERTICAL); - subsizer->Add(m_bUp, 0, wxALIGN_CENTRE_VERTICAL); - subsizer->Add(m_bDown, 0, wxALIGN_CENTRE_VERTICAL); + subsizer->Add(m_bEdit, 0, wxALIGN_CENTRE_VERTICAL | wxTOP | wxBOTTOM, BTN_BORDER); + subsizer->Add(m_bNew, 0, wxALIGN_CENTRE_VERTICAL | wxTOP | wxBOTTOM, BTN_BORDER); + subsizer->Add(m_bDel, 0, wxALIGN_CENTRE_VERTICAL | wxTOP | wxBOTTOM, BTN_BORDER); + subsizer->Add(m_bUp, 0, wxALIGN_CENTRE_VERTICAL | wxTOP | wxBOTTOM, BTN_BORDER); + subsizer->Add(m_bDown, 0, wxALIGN_CENTRE_VERTICAL | wxTOP | wxBOTTOM, BTN_BORDER); subp->SetAutoLayout(TRUE); subp->SetSizer(subsizer); @@ -143,7 +154,7 @@ wxEditableListBox::wxEditableListBox(wxWindow *parent, wxWindowID id, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_NO_HEADER | wxLC_SINGLE_SEL | wxSUNKEN_BORDER | - wxLC_EDIT_LABELS); + wxLC_EDIT_LABELS); wxArrayString empty_ar; SetStrings(empty_ar); @@ -151,7 +162,7 @@ wxEditableListBox::wxEditableListBox(wxWindow *parent, wxWindowID id, SetAutoLayout(TRUE); SetSizer(sizer); - Layout(); + Layout(); } void wxEditableListBox::SetStrings(const wxArrayString& strings)