From c20a4af1ec9ba9201a95663d900929d99322bd41 Mon Sep 17 00:00:00 2001 From: Dimitri Schoolwerth Date: Sun, 26 Apr 2015 15:07:50 +0400 Subject: [PATCH] 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. --- utils/screenshotgen/src/guiframe.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/utils/screenshotgen/src/guiframe.cpp b/utils/screenshotgen/src/guiframe.cpp index a26f3c2515..5e928c2ea5 100644 --- a/utils/screenshotgen/src/guiframe.cpp +++ b/utils/screenshotgen/src/guiframe.cpp @@ -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);