Include bitmap in wxBitmapComboBox screenshot.

Create the control with wxCB_READONLY style. That way the bitmap is
shown next to the edit field and included in the screenshot as well,
instead of bitmaps only appearing in the drop-down list.
This commit is contained in:
Dimitri Schoolwerth 2015-04-26 15:07:50 +04:00
parent 6a48281447
commit c20a4af1ec
No known key found for this signature in database
GPG Key ID: 9DC3A9240BDC6737

View File

@ -415,12 +415,19 @@ void GUIFrame::AddPanel_5()
fgSizer4->Add( 0, 120, 1, wxEXPAND, 5 );
m_bmpComboBox1 = new wxBitmapComboBox(m_panel5, wxID_ANY,_("Item1"));
/*
Create the wxBitmapComboBox control with wxCB_READONLY to ensure
it shows a bitmap next to the edit field which is more suitable
for a screenshot.
*/
m_bmpComboBox1 = new wxBitmapComboBox(m_panel5, wxID_ANY,_("Item1"),
wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY);
m_bmpComboBox1->Append(_("Item1"), wxBitmap(wxT("bitmaps/bell.png"),wxBITMAP_TYPE_PNG));
m_bmpComboBox1->Append(_("Item2"), wxBitmap(wxT("bitmaps/sound.png"),wxBITMAP_TYPE_PNG));
m_bmpComboBox1->Append(_("Item3"), wxBitmap(wxT("bitmaps/bell.png"),wxBITMAP_TYPE_PNG));
m_bmpComboBox1->Append(_("Item4"), wxBitmap(wxT("bitmaps/sound.png"),wxBITMAP_TYPE_PNG));
m_bmpComboBox1->SetToolTip(_("wxBitmapComboBox"));
m_bmpComboBox1->SetSelection(0);
fgSizer4->Add(m_bmpComboBox1, m_commonExpandFlags);