Board index » delphi » TTrackbar descendant

TTrackbar descendant

Trying to create a desendant of a TTrackbar in D3
Want to override procedure SetParams(APosition, AMin, AMax: Integer); but keep
getting error that Method SetParams not found in base class. Know it's there,
it's in the source.

type
  TBlah = class(TTrackBar)
private
  procedure SetParams(APosition, AMin, AMax: Integer); override;  {error here}

---------------------------

procedure TBlah.SetParams(APosition, AMin, AMax: Integer);
begin
   inherited;   {can't get here from there}
end;

Ideas/Fixes?
Chris
c8...@aol.com

 

Re:TTrackbar descendant


Chris,

The key here is the keyword "private" - this means that SetParams
isn't visible outside the unit it's declared in.

Just remove the "override" and the error should go away... You can
still call the inherited SetParams from your new handler.

Ken
--
Ken White

Clipper Functions for Delphi
http://members.aol.com/clipfunc

Quote
C8591 wrote:

> Trying to create a desendant of a TTrackbar in D3
> Want to override procedure SetParams(APosition, AMin, AMax: Integer); but keep
> getting error that Method SetParams not found in base class. Know it's there,
> it's in the source.

> type
>   TBlah = class(TTrackBar)
> private
>   procedure SetParams(APosition, AMin, AMax: Integer); override;  {error here}

> ---------------------------

> procedure TBlah.SetParams(APosition, AMin, AMax: Integer);
> begin
>    inherited;   {can't get here from there}
> end;

> Ideas/Fixes?
> Chris
> c8...@aol.com

Other Threads