TDateEdit (and other TCustomEditButton descendants) have the button enabled even when Readonly is true
Original Reporter info from Mantis: gerardus
-
Reporter name: Gerard V
Original Reporter info from Mantis: gerardus
- Reporter name: Gerard V
Description:
I think when a TDateEdit (or any similar edit+ button control) is in ReadOnly mode, the user should not be able to change the value by pressing the button and selecting a new value.
Setting a TDateEdit.ReadOnly to True locks the manual editing but still allows to use the button to set a new value.
This a small patch that:
- Makes TCustomEdit.SetReadOnly protected and virtual.
- Overrides this method in TCustomEditButton to call the inherited method and enable/disable the button according to the ReadOnly state.