Process an event inside a new component


2003-09-10 02:38:19 PM
delphi158
Hi there,
I'am new to delphi and I have problems with creating a new component.
Let's say that I'd create a TmyButton that have a particular behavior:
- when the mouse clicks it, the TmyButton's caption change to 'clicked'.
That's a simple example, but I don't know how to do that.
Before starting, let me explain what I am currently aware of:
- I have already created and installed a TmyOtherButton.
- I have build new properties, new methods and new events for this
TmyOtherButton.
At last, let me give you more precisions:
- I don't want the Form where the TmyButton is laying to do the job via the
Onclick event.
- I want the TmyButton itself to do the job. That means: I start from
scratch, I create a new application, I put a TmyButton on the form, I run...
and it behaves like I have described above.
Any idea ?
Regards.