- wxButton* button = new wxBitmapButton( this, id, bitmap, wxPoint(sz.x, 0), wxSize(sz.y, sz.y) );
- m_buttons.push_back(button);
- int bw = button->GetSize().x;
- SetSize(wxSize(sz.x+bw,sz.y));
- m_buttonsWidth += bw;
+ wxButton* button = new wxBitmapButton( this, id, bitmap,
+ wxPoint(sz.x, 0),
+ wxSize(sz.y, sz.y) );
+ DoAddButton( button, sz );