Tim Burgess
2014-07-16 14:37:51 UTC
Hi,
I'm successfully adding custom pages to my wxNotebook. These pages are
derived from wxPanel. However, I'm encountering an issue if I add public
methods to the custom panel classes. For instance:
class EWIPatchSetPage: public wxPanel
{
public:
EWIPatchSetPage( wxBookCtrlBase *parent);
~EWIPatchSetPage();
// Allow the label of a button within this panel to be assigned externally
void SetButtonLabel( unsigned int nPatchNumber, std::string strPatchName);
...
};
If I try to call the public method:
...
pEWIPatchSetPage = new EWIPatchSetPage( pNotebook);
...
Notebook->AddPage( pEWIPatchSetPage, wstrEWIPatchSetPageTitle, false);
...
// Set the label for button 15:
pEWIPatchSetPage-> SetButtonLabel ( 10, L"Test");
VS2010 throws an error at compile time:
1>EWIFrame.cpp(84): error C2039: 'SetButtonLabel' : is not a member of
'wxPanel'
This is true, as it isn't a member of wxPanel, but it is a member of
EWIPatchSetPage, which is the class in use.
Can anybody advise, please?
Best wishes.
Tim Burgess
I'm successfully adding custom pages to my wxNotebook. These pages are
derived from wxPanel. However, I'm encountering an issue if I add public
methods to the custom panel classes. For instance:
class EWIPatchSetPage: public wxPanel
{
public:
EWIPatchSetPage( wxBookCtrlBase *parent);
~EWIPatchSetPage();
// Allow the label of a button within this panel to be assigned externally
void SetButtonLabel( unsigned int nPatchNumber, std::string strPatchName);
...
};
If I try to call the public method:
...
pEWIPatchSetPage = new EWIPatchSetPage( pNotebook);
...
Notebook->AddPage( pEWIPatchSetPage, wstrEWIPatchSetPageTitle, false);
...
// Set the label for button 15:
pEWIPatchSetPage-> SetButtonLabel ( 10, L"Test");
VS2010 throws an error at compile time:
1>EWIFrame.cpp(84): error C2039: 'SetButtonLabel' : is not a member of
'wxPanel'
This is true, as it isn't a member of wxPanel, but it is a member of
EWIPatchSetPage, which is the class in use.
Can anybody advise, please?
Best wishes.
Tim Burgess
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users