In my application i am doing this:
1) Creating a wxListBook
2) Calling AddPage on wxListBook to add few pages
3) Create a wxImageList with size 32x32
4) Call SetImageList of wxListBook
5) Assign image to each note book page using SetPageImage(...)
I even stepped through my and wxWidgets code to verify that images are getting assigned and that SetPageImage(...) and SetImageList return TRUE.
However, i am not able to see any images assigned to my pages.
Here is sample code:
Code: Select all
m_cNoteBook = new wxListbook( itemueDialog1, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize, wxBK_TOP );
m_cNoteBook->AddPage(itemPanel1, _("First Page"));
m_cNoteBook->AddPage(itemPanel2, _("Second Page"));
m_cNoteBook->AddPage(itemPanel3, _("Third Page"));
prefImageList_.Create(32, 32);
for(int i=0;i<3;i++)
{
prefImageList_.Add(wxBitmap(...)); //Here i add images to the imagelist
}
m_cNoteBook->SetImageList(&prefImageList_);
for(int i=0;i<3;i++)
{
m_cNoteBook->SetPageImage(i,i);
}