Hi
I'm trying to add a button to a TTeeCommander in C++ builder 6.0 using version 7.01 of Tchart
I drop a TTeecommander and a TButton on a form and add this code:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
TeeCommander1->CreateButton(310, Button1Click, "Open", "", 0);
}
It will not compile with this error:
[C++ Error] Unit1.cpp(20): E2285 Could not find a match for 'TCustomTeeCommander::CreateButton(int,void,char *,char *,int)'
What file do I need to include?
TeeComma.hpp is allready included
Thanks Torben Laursen
Using CreateButton
Hi, Torben.
For BCB you have to use slightly different approach. The following code works fine though:
For BCB you have to use slightly different approach. The following code works fine though:
Code: Select all
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
TSpeedButton *btn = TeeCommander1->CreateButton(300,&SpeedButton1Click,"Custom","",0);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::SpeedButton1Click(TObject *Sender)
{
ShowMessage("Hello world!");
}
Marjan Slatinek,
http://www.steema.com
http://www.steema.com