I'm trying to write a TCustomDBGrid descendant that's designed to feel like a TListBox. One of the things I want to change is the Options property's defaults. TCustomDBGrid defines Options as:
property Options: TDBGridOptions read FOptions write SetOptions
default [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColLines,
dgRowLines, dgTabs, dgConfirmDelete, dgCancelOnExit];
Trying to override that in my class with
property Options: TDBGridOptions default
[dgTitles, dgTabs, dgRowSelect, dgAlwaysShowSelection, dgCancelOnExit];
doesn't work; the compiler expects read or write after the type, not default. Problem is, FOptions and SetOptions are both defined as private, not protected, in TCustomDBGrid.
Do I have to write my own get and set methods that invoke "inherited Options", or is there a simpler way to do this?