🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.language.objectpascal
Article #196

Button OnClikEvent

#196
From: MeCeX
Date: Mon, 26 Jan 2004 14:17
31 lines
1684 bytes
i create a new button component but i want to change onclick event

TIButton = class(TButton)
  private
    FOnClick: string;
    procedure ButtonClick(Sender: TObject);
  public
    constructor Create(AOwner: TComponent); override;
  published
    property OnClickEvent: string read FOnClick write FOnClick;
    { want to change it to below code }
    {property OnClick: string read FOnClick write FOnClick;}
  end;

constructor TIButton.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  FOnClick := '';
  OnClick := ButtonClick; // when changed, i want this code works for
ancestors button's onclick
end;

procedure TIButton.ButtonClick(Sender: TObject);
begin
  if FOnClick <> '' then
    // ...
end;

how can i change ibutton's onclick event ? Is there a way ?

MeCeX
Technical Details
Message-ID: <40152175@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!stdio!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109d30,a748b140769c74a3,start
X-Google-Attributes: gid109d30,public
X-Google-ArrivalTime: 2004-01-26 06:32:07 PST
From: "MeCeX" <admin@mehmetcelik.com>
Newsgroups: borland.public.delphi.language.objectpascal
Subject: Button OnClikEvent
Date: Mon, 26 Jan 2004 16:17:25 +0200
Lines: 34
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 144.122.180.4
Message-ID: <40152175@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1075126645 144.122.180.4 (26 Jan 2004 06:17:25 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!stdio!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail