<< Click to display table of contents >> TrvrActionInsertShape.ShowInsertDialog |
The methods show a window for choosing a shape to insert, then insert the chosen shape.
procedure ShowInsertDialog(Target: TCustomRichViewEdit;
Button: TControl); overload;
procedure ShowInsertDialog(Target: TCustomRichViewEdit;
const ButtonRect: TRect); overload;
The first method shows this window below the specified Button control. If Button = nil, it shows this window in the position of the mouse pointer.
The second method shows this window below the specified ButtonRect (it contains screen coordinates). This method is useful for displaying a window below the button that is not inherited from TControl.
The inserted shape has properties defined in this action, with some properties overridden by the selection in this window.
When the action is assigned to a button, a shape selection window is displayed below this button automatically, when the action is executed. However, you may wish to use a combo-style toolbar button (which shows a triangle a the right side). To do it, you can assign a empty TPopupMenu component to toolbar button's DropdownMenu, and call ShowInsertDialog in this menu's OnPopup event.