Hi,
I'm really new to Code::Blocks and wxSmith.
After a while of trying to add a wxTextCtrl to a wxToolBar with wxSmith i finally managed to add it with "insert new widgets in the current selection" button.
But i'm getting an error :
../../src/common/tbarbase.cpp(230): assert "control->GetParent() == this" failed in InsertControl(): control must have toolbar as parentThe problem is that wxSmith adds the wxTextCtrl with "This" instead of "ToolBar1"
Generated by wxSmith:
TextCtrl1 = new wxTextCtrl(this, ID_TEXTCTRL1, _("Text"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL1"));
ToolBar1->AddControl(TextCtrl1);
It should be:
TextCtrl1 = new wxTextCtrl(ToolBar1, ID_TEXTCTRL1, _("Text"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_TEXTCTRL1"));
ToolBar1->AddControl(TextCtrl1);
How to fix it? Or i'm i missing something?
Thanks you!