I am working on a custom WebListBox. In order to keep the state of CheckBoxes, I am using a two dimensions area mirroring rows and columns. That works fine, until methods such as AddRow, Remove or insert are used. It would be great to know when these methods are used in order to update the array.
At the moment I am using a timer to periodically update, but that is not very elegant.
Is there any way somehow to override, hook or shadow the built in methods so any time they are called, the array can be updated ?
You can override methods in a subclass.
Just declare again Addrow in your subclass (with the same arguments of the original method) and then you will end calling your methods.
In your AddRow, insert Super.Addrow(…) to let the super class to do the original work.
Addrow(ParamArray Item() as String) catches Addrow(String) as it takes a single string as item(0). My error was to start with the single string item method.
FYI, when you add a method the Method Name field is a combobox that drops down to show all the methods you can override. Select one and the whole signature is filled in for you.