Properties   Methods

<< Click to display table of contents >>


Properties   Methods

Properties of "smart popup" buttons (analogs of buttons used for Microsoft Office "smart tags"). Class of TCustomRichViewEdit.SmartPopupProperties.

Unit RVPopup.


  TRVSmartPopupProperties = class (TPersistent)

(introduced in version 10)





"Smart popups" allow to edit properties of the current (at the position of caret) item. Of course, you can use popup menu instead, but in some cases "smart popups" may be useful (for example, to show to user that some special commands available for the current item). Only one "smart popup" button can be displayed at the same time.

Use TCustomRichViewEdit.OnCaretMove event to set properties of "smart popup" and display the button. The button is displayed when you assign True to TCustomRichViewEdit.SmartPopupVisible. The editor hides this button automatically on document change or clearing. Since "smart popup" works only for the current item, you must ensure that it is displayed for the current item (update or hide it when the caret moves to another item).

The following properties define visual appearance of "smart popup" button:


Color, LineColor;

HoverColor, HoverLineColor;

ImageList, ImageIndex.

Hint is displayed when the user moves the mouse pointer over the button.

Position defines the button position.

When the user clicks the button or presses ShortCut, Menu is displayed (if assigned). Instead of a menu, you can process TCustomRichViewEdit.OnSmartPopupClick event to execute a command or display a dialog.