I was surprised that the onClick event handler was not trigerred when I changed the state of a tadvofficecheckbox control in code (works OK when using the mouse). Looking in the code, there is a flag called TMS_NoClickForProgrammaticCheck in TCustomAdvOfficeCheckBox.SetChecked that appears to be permanently set to inhibit the OnClick event. Is this deliberate?
Yes, this is deliberate.
We consider OnClick an event that is triggered caused by a user-interface interaction and not a programmatic interaction.
When you do a programmatic interaction, your code knows about what changes and can call any further needed code.
When OnClick is triggered for both UI interaction & programmatic interaction, the application level code can no longer make the difference between the two.