Board index » cppbuilder » Modification of standard event

Modification of standard event


2003-11-03 10:39:54 PM
cppbuilder76
Dear programmers,
I created new component based on TPanel and I wanted to modify standard
OnResize event. So, below there is my code in which the compiler returned an
error:
class PACKAGE TGLPanel : public TPanel
{
private:
protected:
public:
__fastcall TGLPanel(TComponent* Owner);
__published:
__property OnResize;
};
void __fastcall TGLPanel::OnResize()
{
TControl::OnResize(); // perform standard handling,
// my customizations go here
...
...
}
I will by very appreciated for help
Przemo
 
 

Re:Modification of standard event

"Przemo B." <baan/NOSPAM/@poczta.onet.pl>wrote in message news:3fa66908$ XXXX@XXXXX.COM ...
Quote
Dear programmers,

I created new component based on TPanel and I wanted to modify standard
OnResize event.
When deriving a new component override the Resize method:
class PACKAGE TGLPanel : public TPanel
{
private:
protected:
DYNAMIC void __fastcall Resize();
public:
__fastcall TGLPanel(TComponent* Owner);
};
void __fastcall TGLPanel::Resize()
{
TPanel::Resize(); // perform standard handling
// my customizations go here
}
Todd
 

Re:Modification of standard event

Thank You Todd
Przemo
 

{smallsort}