User forums > General (but related to Code::Blocks)
wxNotebook troubles
eranif:
Usually it is better to use the notebook itself as the parent of the page.
In the wxFlatNotebook, for example, the control reparent the page when inserted to it:
--- Code: ---AddPage(wxWindow* win, ... )
{
if(!win)
return;
win->Reparent(this);
}
to add text control:
--- End code ---
to add a text control just do:
--- Code: ---wxTextCtrl *text = new wxTextCtrl(m_pNotebook, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER | wxTE_MULTILINE);
m_pNotebook->AddPage(text, wxT("Page #1"));
--- End code ---
Eran
sethjackson:
I have it working now. Thanks guys. :D
Navigation
[0] Message Index
[*] Previous page
Go to full version