- m_bEdit = new wxBitmapButton(subp, wxID_ELB_EDIT, wxBitmap(eledit_xpm));
- m_bNew = new wxBitmapButton(subp, wxID_ELB_NEW, wxBitmap(elnew_xpm));
- m_bDel = new wxBitmapButton(subp, wxID_ELB_DELETE, wxBitmap(eldel_xpm));
+
+#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
+
+ if ( m_style & wxEL_ALLOW_EDIT )
+ {
+ m_bEdit = new wxBitmapButton(subp, wxID_ELB_EDIT, wxBitmap(eledit_xpm));
+ subsizer->Add(m_bEdit, 0, wxALIGN_CENTRE_VERTICAL | wxTOP | wxBOTTOM, BTN_BORDER);
+ }
+
+ if ( m_style & wxEL_ALLOW_NEW )
+ {
+ m_bNew = new wxBitmapButton(subp, wxID_ELB_NEW, wxBitmap(elnew_xpm));
+ subsizer->Add(m_bNew, 0, wxALIGN_CENTRE_VERTICAL | wxTOP | wxBOTTOM, BTN_BORDER);
+ }
+
+ if ( m_style & wxEL_ALLOW_DELETE )
+ {
+ m_bDel = new wxBitmapButton(subp, wxID_ELB_DELETE, wxBitmap(eldel_xpm));
+ subsizer->Add(m_bDel, 0, wxALIGN_CENTRE_VERTICAL | wxTOP | wxBOTTOM, BTN_BORDER);
+ }
+