confusion over member variables/functions...
Jonas Rydberg
jonas at arbor.se
Fri Nov 3 03:45:17 PST 2006
Rory Walsh wrote / skrev:
> //wxLooperFrame is my main class....
> void wxLooperFrame::CreateChildFrame()
> {
> //create a new child frame...
> loopStation=new wxLoopStation((wxMDIParentFrame*)this, -1, "Loop1",
> wxPoint(20, 20), wxSize(215, 255));
> //create a text box in new child frame
> loopStation->freqText = new wxTextCtrl(panel, -1, "1",wxPoint(140,
> 24), wxSize(40, 20), wxTE_READONLY);
>
> }
Hi
What is "panel" in the code above, the parent to the text control? Looks
like there's a missing line like this:
wxPanel* panel = new wxPanel(wxID_ANY, loopStation); // This creates a
panel that fills the child frame and can be used as parent to all controls
Note that putting controls, like your TextCtrl, directly on a
(child)frame is not recommended (and not supported on some ports I think).
HTH
/Jonas
More information about the wx-users
mailing list