At runtime I want to generate a pagecontrol with a number of tabsheets, each tab sheet to have a StringGrid.
My code for doing so is:
-------
ppc = new TPageControl(this);
ppc->Parent = this;
ppc->Align = alClient;
ppc->TabPosition = tpTop;
for(i=0;i<NumberTabs;i++)
{ TabArray = new TTabSheet(this);
TabArray->PageControl = ppc;
TabArray->Name = AnsiString("TabArray") + IntToStr(i);
TabArray->Caption = sTitles;
TabArray->PageIndex = i;
TabArray->OnShow = TabOnShow;
GridArray = new TStringGrid(TabArray);
GridArray->Parent = TabArray;
GridArray->Align = alClient;
GridArray->ColCount = 8;
GridArray->RowCount = 2;
GridArray->DefaultRowHeight = 18;
GridArray->FixedRows = 1;
GridArray->FixedCols = 1;
GridArray->Name = "sg" + IntToStr(i+1);
GridArray->Width = 990;
GridArray->DoMouseUp;
}
---------------
My function for the "DoMouseUp" is as follows:
---------------
void __fastcall TfMainRecharges:oMouseUp(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
// code to go here
}
//----------------------------------------
However when I make or build I get following error:
[c++ Error] MainRecharges.cpp(113):'fastcall TControl:oMouseUp(TWMMouse & TMouseButton)' is not accessible
I canm't seem to work out how to get around this, is there a fix?
My code for doing so is:
-------
ppc = new TPageControl(this);
ppc->Parent = this;
ppc->Align = alClient;
ppc->TabPosition = tpTop;
for(i=0;i<NumberTabs;i++)
{ TabArray = new TTabSheet(this);
TabArray->PageControl = ppc;
TabArray->Name = AnsiString("TabArray") + IntToStr(i);
TabArray->Caption = sTitles;
TabArray->PageIndex = i;
TabArray->OnShow = TabOnShow;
GridArray = new TStringGrid(TabArray);
GridArray->Parent = TabArray;
GridArray->Align = alClient;
GridArray->ColCount = 8;
GridArray->RowCount = 2;
GridArray->DefaultRowHeight = 18;
GridArray->FixedRows = 1;
GridArray->FixedCols = 1;
GridArray->Name = "sg" + IntToStr(i+1);
GridArray->Width = 990;
GridArray->DoMouseUp;
}
---------------
My function for the "DoMouseUp" is as follows:
---------------
void __fastcall TfMainRecharges:oMouseUp(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
// code to go here
}
//----------------------------------------
However when I make or build I get following error:
[c++ Error] MainRecharges.cpp(113):'fastcall TControl:oMouseUp(TWMMouse & TMouseButton)' is not accessible
I canm't seem to work out how to get around this, is there a fix?