Unable to select/click items in wxListBox

Eva L <[email protected]>
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <[email protected]>
Hello. I'm having trouble selecting and/or clicking items in wxListBox only 
if it's part of a sizer. I basically want the wxListBox to expand with the 
window.

Here is the code:















*MainFrame::MainFrame(const wxString& title)    : wxFrame(nullptr, 
wxID_ANY, title),      mainPanel(new wxPanel(this, wxID_ANY, 
wxDefaultPosition, wxSize(300, 200))){ Bind(wxEVT_CLOSE_WINDOW, 
&MainFrame::OnClose, this); SetFont(GetFont().Scale(1.5)); mainPanel = new 
wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(600, 600)); s1 = new 
wxBoxSizer(wxVERTICAL); m_tgeListBox = new wxListBox(this, wxID_ANY, 
wxDefaultPosition, wxSize(300, 200)); s1->Add(m_tgeListBox, 1, wxEXPAND); 
SetSizerAndFit(s1);}*

Why is this happening and how can it be solved?

-- 
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
--- 
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wx-users/f8a6f6d1-e914-416f-8b6b-dd7c4c0c4408n%40googlegroups.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.