delphidabbler / delphi-tips

A bunch of Delphi language tips migrated from the DelphiDabbler.com website, plus others.
https://tips.delphidabbler.com
31 stars 11 forks source link

Invalid source code in tip 210 #32

Closed delphidabbler closed 3 years ago

delphidabbler commented 3 years ago

The source code for Answer 1 in tip 210 has some missing code: probably the class declaration:

type

private
  procedure SetParent(AParent: TWinControl); override;
  procedure WMEraseBkGnd(Var Message: TWMEraseBkGnd); message WM_EraseBkGnd;
  ...

I'm guessing this should actually be:

type
   TTransparentPanel = class(TPanel)
  private
    procedure SetParent(AParent: TWinControl); override;
    procedure WMEraseBkGnd(Var Message: TWMEraseBkGnd); message WM_EraseBkGnd;
    ...

Maybe a good idea to add that missing code with a comment saying it's a guess!