PageControl does not instantiate PageClass
Original Reporter info from Mantis: KennethH
-
Reporter name: Kenneth Hippolite
Original Reporter info from Mantis: KennethH
- Reporter name: Kenneth Hippolite
Description:
lcl\include\pagecontrol.inc, line 190
function TPageControl.AddTabSheet: TTabSheet;
begin
Result := TTabSheet.Create(Self);
incorrect. Should be:
Result := TTabSheet(PageClass.Create(Self));
Additional information:
Without this change, even if you set PageClass to a custom descendant, you'll get TTabSheets instead. Oddly, you can force-cast them into your custom descendant but they really aren't and cannot pass the "X is TMyDescendant" test
Mantis conversion info:
- Mantis ID: 34886
- Version: 1.8.4
- Fixed in revision: r62136 (#b13519cc)