I have a custom Firemonkey control that has several sub components. These sub components have OnClick events associated with them that are setup in the control's constructor. I have noticed that when I click on the custom control in my design view, the OnClick events of these sub components are getting fired.
Is there a particular setting or best practice I need to employ to prevent this from happening?
Is there something I can check in my C++ code to see if this event is being run in the designer vs at run time? Something like:
void __fastcall MyControlOnClick( TObject * Sender )
{
if( InDesigner == false )
{
//do stuff here
}
}