Hello,
I've just run into the same issue and it is Windows specific.
If the wxListBook has the wxLB_TOP flag, and no images are tied to the list items, the text is simply not visible. Specifically, the height of the list ctrl is very narrow while the width seems to be ok.
Once images are tied to the control, everything works fine.
void CHelloWorldDlg::CreateControls()
{
CHelloWorldDlg* itemDialog1 = this;
wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL);
itemDialog1->SetSizer(sizer);
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxHORIZONTAL);
sizer->Add(itemBoxSizer2, 0, wxALIGN_LEFT | wxALL, 5);
wxStaticText* itemStaticText3 = new wxStaticText( itemDialog1, wxID_STATIC, _("Hello World!"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer2->Add(itemStaticText3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
itemBoxSizer2->Add(50, 5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxButton* itemButton5 = new wxButton( itemDialog1, wxID_CANCEL, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer2->Add(itemButton5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
m_listbook = new wxListbook(itemDialog1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLB_TOP);
sizer->Add(m_listbook, 1, wxEXPAND, 0);
wxPanel* p1 = new wxPanel(m_listbook, wxID_ANY, wxDefaultPosition, wxSize(300, 300));
p1->SetBackgroundColour(wxColour("MAROON"));
m_listbook->AddPage(p1, wxT("First page"));
wxPanel* p2 = new wxPanel(m_listbook, wxID_ANY, wxDefaultPosition, wxSize(300, 300));
p2->SetBackgroundColour(wxColour("RED"));
m_listbook->AddPage(p2, wxT("Second_page"));
}
Any ideas are appreciated how to fix it.
Thank you,
Andrea Asztalos