I tried to add support for a resizeable wxTextCtrl with the wxresizeablecontrol classes. But I have no success.
Here is the code I use to create a text control:
Code: Select all
s = "Some text";
if (!m_resizecanvas) m_resizecanvas = new wxResizeableControlCanvas(this,-1);
ParentControl *parent = new ParentControl((wxResizeableControlCanvas *)m_resizecanvas,0,wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS);
wxResizeableChildTextCtrl *text = new wxResizeableChildTextCtrl(parent, -1, s->charrep(), wxDefaultPosition, wxDefaultSize);
parent->SetManagedChild(text);
text->SetName(name);
addLabel(name, sizerLabel, hideThisColumn);
sizerControl->Add(parent, 1, wxALL, GAP);
sizerMain->Add(sizerControl, 0, wxEXPAND | wxALL, GAP);
}
Then I haven't added the text control to the sizer to see if it has to do with the sizer, but that doesn't help.
It seems that the control didn't get drawn, also the OnPaint handler in wxResizeableControl didn't get called I think.
Does anyone has experience with this component?
Thanks
Lothar