I have a TListView descendant which introduces additional features like sorting and loading from a dataset.
I now wish to modify the class so that whenever an item is checked or unchecked it is added or removed in an internal list of checked items so that an application using an instance of the component can easily read the number and location of checked items without having to iterate over all the items in the list view.
Unfortunately, rather than abstracting handling of the check/uncheck operation into some internal method (like DoCheck) that I could override, TCustomListView seems to embed the check logic deep in a large message-handling function.
The only way I can think of to introduce my own behavior neatly into the component is to hijack the OnItemChecked property, causing that property to read and write FOnItemCheckedUser (for example) rather than FOnItemChecked, put my own code in FOnItemChecked, and call FOnItemCheckedUser from my code.
Is there a more straightforward way to handle this? If not, is my idea feasible and safe to implement?