Question regarding inheritance in wxWidgets.

Posted by celestialorb on Stack Overflow See other posts from Stack Overflow or by celestialorb
Published on 2010-04-29T05:14:26Z Indexed on 2010/04/29 5:17 UTC
Read the original article Hit count: 313

Filed under:
|
|
|

Currently I'm attempting to write my own wxObject, and I would like for the class to be based off of the wxTextCtrl class.

Currently this is what I have:

class CommandTextCtrl : public wxTextCtrl {
    public:
        void OnKey(wxKeyEvent& event);
    private:
        DECLARE_EVENT_TABLE()
};

Then later on I have this line of code, which is doesn't like:

CommandTextCtrl *ctrl = new CommandTextCtrl(panel, wxID_ANY, *placeholder, *origin, *size);

...and when I attempt to compile the program I receive this error:

error: no matching function for call to ‘CommandTextCtrl::CommandTextCtrl(wxPanel*&, <anonymous enum>, const wxString&, const wxPoint&, const wxSize&)’

It seems that it doesn't inherit the constructor method with wxTextCtrl. Does anyone happen to know why it doesn't inherit the constructor?

Thanks in advance for any help!

© Stack Overflow or respective owner

Related posts about wxwidgets

Related posts about c++