I noticed that the Event OnRadioButtonClick does not fire if the Item is selected by code.
Here you can download an FMX windows project to reproduce the issue.
It is by design that for programmatically setting a value no event is triggered.
Please note that VCL standard RadioGroup does not work like you are saying.
Plus, the FNC CheckBox group works like I'm asking.
Please understand that we do not think that triggering an event for setting a property programmatically is needed.Again, if you set it in code, your code knows it is set and can act appropriately.
Hope you can change your mind and re-enter in the Standard, Aspected and consolidated way.
We strive to have events triggered upon user-interface actions.
The VCL itself isn't consistent in that respect.
I think you can agree with me that duplicate the code is never a good solution and that is always better to have a unique sure point where the code alway pass caused by an event. The way you purpose can create problems if I forget to do something when the standard solution does not. Anyway Sir do what you think is better.
Thanks for your time.
I agree that duplicate code is not a good solution. If you need the same handling of a radiogroup change from code as from UI, nothing prevents you from writing a 1 change handler and call that change handler from your radiogroup event handler and from the code that changes the radiogroup.
And yes, I am aware that in the VCL there are such implementations. I can only assume it are things remaining and not changed to avoid breaking backwards compatibility.
I hope this makes our viewpoint sufficiently clear and that we can close this discussion.