Overriding/hiding inherited published properties
Posted on 1999-01-11
I am making a component that is a descendent of TDrawGrid.
Lets say that I want these properties (among others) to be published: Width, Height, ColCount, RowCount.
When the user changes one of these, I want the methods found in DrawGrid to take care of it. However, before this is done, I need my component to take care of some other things, such as memory allocation.
For example, say that the user increases RowCount by 1. I need to allocate additional memory and do some other things (for the purpose of my component), and then let TDrawGrid do whatever is needed to change the rows.
How would I hide the inherited properties, and include new properties of the same name that call the inherited properties? I think I should use the "inherited" keyword, but I am not exactly sure.
Another, similar question:
How would I hide (i.e. make private to my component) any inherited published properties, yet still make them available to my component?
For example, lets say I wanted to make Height and Width (in DrawGrid) totally unavailable to the user and other components, but I want to retain them for private use by my component. How would I do that?
If it matters, I am using Delphi 2.