Board index » cppbuilder » Customizing a grid

Customizing a grid


2003-10-28 05:09:27 AM
cppbuilder88
Hi,
I tried to run the example given by the help, "customizing a grid".
Everything work apart from "Moving the selection".
I inserted the function
void __fastcall TSampleCalendar::Click()
{
int TempDay = DayNum(Col, Row); // get the day number for the
clicked cell
if (TempDay != -1) Day = TempDay; // change day if valid
}
in the source calsamp.cpp and the declaration of Click in calsamp.h in the
public section.
Every time I run the compiler gives me the following message:
<(C++Error) CALSAMP.h(45):E2113Virtual function '__fastcall
TSampleCalendar::Click()' conflicts with base class 'TControl'>.
I read in a previous unit that it is possible override methods of ancestors,
so I don't understand what is the problem.
 
 

Re:Customizing a grid

"Silvana Italy" < XXXX@XXXXX.COM >wrote in message news: XXXX@XXXXX.COM ...
In your TSampleCalendar class change the method declaration to:
DYNAMIC void __fastcall Click();
When overriding methods, some are virtual, and some use DYNAMIC.
The way to find out is to either look at the header files or look it
up in the help.
Todd
 

Re:Customizing a grid

thank you very much
 

{smallsort}