[lazarus] Silly code message handling question

Tony Maro tony at maro.net
Mon Nov 10 19:52:55 EST 2003


Mattias Gaertner wrote:

>>How can I only make use of the keys that I want, and pass the remaining 
>>on to the parent component(s)?
>>
>1. You can override DoKeyUp instead.
>2. Did you add an 'inherited'? 
>  
>

1) - When I try that I get "There is no method in an ancester class to 
be overridden".  (it's not virtual...?)

2) - Tried that with my current message handling code and nothing happens.


My object is:

TWinControl -> TMScrollingWinControl -> TCheckBook

I'm trying to make sure that menu shortcuts happen even when my control 
has focus.

I can't seem to override the DoKeyUp on the TWinControl.  I looked in 
the LCL and it's not listed as virtual.  If I don't use "override" the 
routine is never called.  If I do, it gives me the error listed above by 1).

I also tried handling the message as before, and adding 
"DoKeyUp(Message)" at the end if I haven't handled it, but nothing happens.

I tried handling the message, leaving result zero and calling inherited 
in the message handler to no avail.

Can someone point me to a sample component in the LCL that implements 
something like this?

Thanks,
Tony








More information about the Lazarus mailing list