Changing the Default Value of FReadOnly

From RAD Studio
Jump to: navigation, search

Go Up to Creating a Data Editing Control


Because this is a data editing control, the ReadOnly property should be set to False by default. To make the ReadOnly property False, change the value of FReadOnly in the constructor:

constructor TDBCalendar.Create(AOwner: TComponent);
begin
  // …
  FReadOnly := False;  { set the default value }
  // …
end;
__fastcall TDBCalendar::TDBCalendar (TComponent* Owner) : TSampleCalendar(Owner)
{
  FReadOnly = false;             // set the default value
  // …
}

See Also