Applies to
Declaration
type TContextEvent = procedure(Sender: TObject; Context: Integer;
StartOffset, StopOffset: Integer) of object;
property OnContext: TContextEvent;
Description
The OnContext event occurs when the user clicks on a section of text marked with a context number different from zero. Such sections are defined either with the help of keywords, start-stop sections or with method SetDynStyle.
The Context parameter indicates to the event handler the context number of the clicked section. If the text clicked on is highlighted because of an entry in the Keywords array, Context is the value that was passed as parameter ContextNumber to the AddKeyword method. If the text is highlighted because of an entry in the StartStopKeys object, Context is the value that was passed to the AddStartStopKey method (parameter ContextNumber). If the OnContext event is triggered because the user clicked in a section of text highlighted by method SetDynStyle, Context is the value that was passed to this method.