You must not use your OnCancelClick setters and getters because they remove the InternalClick handler. Delete SetCancelClick and GetcancelClick and declare the event as
property CancelClick: TNotifyEvent read FOnCancelClick write FOnCancelClick;
The logics is as follows:
- The user clicks on the OnCancel button.
- Since TMyButton had assigned the InternalCancelClick hander to the BitBtn's OnClick, this procedure is executed.
- The InternalCancelClick at first executes your code (ShowMessage ('kkk')), and then calls FOnCancelClick handler provided by the user.
[EDIT]
Too late, Sieben already has explained it...