TPlusGutter component
PlusMemo Help Send comments on this topic.
TPlusGutter component

Glossary Item Box

 

Unit

PlusGutter

 

Declaration (partial)

type

    TCustomExtHighlighter = class(TPlusHighlighter);

    TPlusGutter = class(TGraphicControl);

 

Description

TPlusGutter is a graphic control that can be placed next to a TPlusMemo component and be linked to it via its property PlusMemo.  It then automatically shows line or paragraph numbers at the appropriate vertical position.

 

It also allows the user to bookmark lines using Shift+Ctrl+0..9 key combination inside of TPlusMemo, and to jump from any point to one of the bookmarks using Ctrl+0..9.  Bookmarks can also be set and cleared programmatically.

 

Key properties

Run-time only

  Alignment Controls the alignment of digits representing line or paragraph numbers.
  Bookmarks A boolean property to control whether bookmarks are enabled.
BookmarksArray A list of lines bookmarked.
BookmarkList A list of lines bookmarked.
  IgnoreLastLineIfEmpty Enables to display or not the line number of last line when it is empty.
  KeepBookmarks Controls whether bookmarks are kept or destroyed when the text they refer to is deleted.
  LineNumbers Set it to True if you want line numbers.
  ParagraphNumbers Displays paragraph numbers (takes precedence over LineNumbers).
  PlusMemo The TPlusMemo control that the gutter is linked to.
  RightBorder Display a thin gray line on the right of the control.

 

Key methods

  BookmarkLine Turn a given line into a bookmark.
  BookmarkPos Place a bookmark on the line that includes a given character offset.
  ClearBookmarks Turn off all bookmarks.
  JumpToBookmark Move the editing point to a bookmark.

 

Key events

  OnClearBookmark Notifies your application that a bookmark is about to be removed.
  OnDrawItem Permits your application to draw arbitrary graphics or text for each line.
  OnSetBookmark Notifies an application that a bookmark is about to be added.