Re: Event handlers...
- From: Rob Kennedy <me3@xxxxxxxxxxx>
- Date: Fri, 27 Jan 2006 14:41:10 -0600
swansnow wrote:
(Now that you know the terminology, does the errormessage make a little more sense?)
Aha! OK, now it makes sense! I thought the wording seemed a bit peculiar... Can the event handler belong to a different class?
Yes. It frequently does. For instance, when you assign an event handler to a TButton's OnClick event, the method usually belongs to a form, not to the button.
What if I had a data module to hold event handlers that I wanted to use across many classes (like validating alphanumeric keypresses, making "enter" act like a "tab" (don't ask!), etc) Can I do something like that?
The newsgroup archives should have *lots* of messages discussing how to make the Enter key behave like Tab. (I don't know how, off-hand, since I've never needed that.) In your search, you'll probably come across a link to an article at Borland's site.
As for ensuring that an edit box only accepts the characters you want, please refer to the following article.
http://groups.google.com/group/borland.public.delphi.vcl.components.writing/msg/41b62f85dd405cdf
-- Rob .
- References:
- Event handlers...
- From: swansnow
- Re: Event handlers...
- From: Rob Kennedy
- Re: Event handlers...
- From: swansnow
- Event handlers...
- Prev by Date: Re: Event handlers...
- Next by Date: Re: Test if memory pointer is valid?
- Previous by thread: Re: Event handlers...
- Next by thread: Test if memory pointer is valid?
- Index(es):