Applies to
TPlusGutter component
Declaration
type
TpgDrawItemEvent= procedure(Sender: TObject; LineIndex: Integer; var Text: string;
var Graphic: TGraphic) of object;
property OnDrawItem: TpgDrawItemEvent;
Description
This event enables your application to make TPlusGutter draw arbitrary graphics or text for each line being painted. It is called inside the paint routine. If no OnDrawItem handler is specified, TPlusGutter draws line numbers or paragraph numbers, according to the setting of properties LineNumbers and ParagraphNumbers.
Parameter Sender is the TPlusGutter for which the event is generated. LineIndex is the PlusMemo's line number for which TPlusGutter is about to paint something. Text is the text that will be displayed at the vertical position corresponding to LineIndex. It is initialized with the line number, paragraph number or is empty, depending on the settings of LineNumbers and ParagraphNumbers. The OnDrawItem handler may override it with whatever is desired. Graphic is an optional graphic that will be drawn instead of displaying Text. If the handler returns with this parameter different from nil, the referred graphic will be displayed.