[lazarus] Context sensitive help

Mattias Gaertner nc-gaertnma at netcologne.de
Fri Apr 11 06:15:34 EDT 2003


On 10 Apr 2003 19:43:43 -0500
Tony Maro <tony at maro.net> wrote:

> Under Delphi, wasn't there a "helpid" property or something like it that
> was used for the context sensitive help system?
> 
> Is it possible to add this property to the TControl object (or wherever
> it's more appropriate?)
> 
> I'm working on an HTML context sensitive help system and my idea is for
> a TComponent that you drop on a form that will watch keystrokes for F1. 
> It would then see what control had focus and check it's help id
> property.  Then it maps that help id property to a list of html files
> provided at design time, locates a proper browser on the computer and
> opens the html document with it.
> 
> The only thing I'm not sure of is how to grab the keystrokes with a
> message before any other control grabs it.

I think, an application wide KeyDown event would be very useful. Not only
for a helpsystem. I have added a handler chain to Application.
Just add your keydown event with:

Application.AddOnKeyDownHandler(@AppKeyDown);

This keydown is invoked, if no other component used the key
(Key<>VK_Unknown).


Mattias



> 
> Currently I'm using a context help system like this, but I have each
> control's OnKeyDown event triggering the help file.  That's kind of
> kludgy and painful if there's a lot of controls.  
> 
> Is there a message my control could watch for that would let it see the
> keys before the controls?  Or that would grab leftovers after the
> controls processed everything they could... and if the latter, would F1
> naturally fall through?
> 
> Thanks,
> 
> -- 
> Tony Maro
> tony at maro.net
> http://tony.maro.net/
> 
> Check out my software "CheckBook Tracker"
> A GPL (free) replacement for Microsoft Money!
> 
> _________________________________________________________________
>      To unsubscribe: mail lazarus-request at miraclec.com with
>                 "unsubscribe" as the Subject
>    archives at http://www.lazarus.freepascal.org/mailarchives






More information about the Lazarus mailing list