Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Creating a Custom Button
(1/1)
hibbity:
Following the tutorial:
http://wiki.codeblocks.org/index.php?title=Creating_a_plugin_which_adds_new_item_into_wxSmith
The constructor for a CustomButton looks like this:
--- Code: ---wxsCustomButton::wxsCustomButton(wxsItemResData* Data):
wxsWidget(
Data, // Data passed to constructor
&Reg.Info, // Info taken from Registering object previously created
wxsCustomButtonEvents, // Structure describing events
NULL) // Structure describing styles
{
}
--- End code ---
Here is what the compiler is saying:
--- Code: ---../wx_test/wx_testMain.cpp||In constructor 'wx_testFrame::wx_testFrame(wxWindow*, wxWindowID)':|
../wx_test/wx_testMain.cpp|621|error: no matching function for call to 'wxsCustomButton::wxsCustomButton(wxPanel*&, const long int&, const wxChar*, wxPoint, const wxSize&, int, const wxValidator&, const wchar_t [12])'|
../wxthings/wxscustombutton.h|34|note: candidates are: wxsCustomButton::wxsCustomButton(wxsItemResData*)|
../wxthings/wxscustombutton.h|31|note: wxsCustomButton::wxsCustomButton(const wxsCustomButton&)|
||=== Build finished: 3 errors, 0 warnings ===|
--- End code ---
What is the proper way to instantiate the "wxscustombutton" widget defined in ../codeblocks-10.05/src/plugins/contrib/wxSmithContribItems/wxthings
Looking at the parent classes for wxsWidget did not help.
hibbity:
Constructor should be for wxCustomButton, not wxscustombutton. Problem solved.
Navigation
[0] Message Index
Go to full version