Class TWPPreview
Hierarchy
System.TObject | System.Classes.TPersistent | System.Classes.TComponent | Vcl.Controls.TControl | Vcl.Controls.TWinControl | Vcl.Controls.TCustomControl | WPRTEDefs.TWPCustomRTFControl | WPCTRMemo.TWPCustomRtfEdit | TWPPreview
Description
This class inherits from the TWPCustomRtfEdit class which is also used to build an editor for text.The difference to the latter class the TWPPreview has been specially preconfigurated to view text which is displayed also in an TWPCustomRtfEdit control. It cannot be used without any TWPCustomRtfEdit control attached to it.
The preview is not automatically updated when text is added to the editor. You need to add some code to the OnDelayedUpdate event:
procedure TForm1.WPRichText1DelayedUpdate(Sender: TObject;
var WPUPD_Code: Integer; Param: Integer);
begin
if WPUPD_Code=WPUPD_AFTER_REORDERPAGES then
WPPreview1.Refresh;
end;
Properties
Property Align : TAlign
Property Anchors : TAnchors
Property AutoZoom : TWPAutoZoom
Property BorderStyle : TBorderStyle
Property ClickableCodes : TWPTextObjTypes
Property ColorDesktop : TColor
Property Columns : Integer
Property Configuration : TWPPreviewConfiguration
Property Constraints : TSizeConstraints
Property Ctl3D : Boolean
Property DragCursor : TCursor
Property DragMode : TDragMode
Property Enabled : Boolean
Property LayoutMode : TWPLayoutMode
Property OneClickHyperlink : Boolean
Property PageColumns : Integer
Property Pagenumber : Integer
Property PaperColor : TColor
Property ParentColor : Boolean
Property ParentShowHint : Boolean
Property PopupMenu : TPopupMenu
Property Rows : Integer
Property ScrollBars : TScrollStyle
Property ShowHint : Boolean
Property ShowPagenumber : Boolean
Property SinglePageMode : Boolean
Property TabOrder : TTabOrder
Property TabStop : Boolean
Property Transparent : Boolean
Property ViewOptions : TWPViewOptions
Property ViewOptionsEx : TWPViewOptionsEx
Property Visible : Boolean
Property WPRichText : TWPCustomRtfEdit
Property XBetween : Integer
Property XOffset : Integer
Property YBetween : Integer
Property YOffset : Integer
Property Zooming : Integer
Methods
Events
AfterPaintDesktopBackground : TWPOnPaintDesktopBackground= procedure(Sender: TObject; Canvas : TCanvas; R : TRect) of object;
HyperLinkEvent : THyperLinkEvent= THyperLinkEvent
OnActivateHint : TWPActivateHintEvent= TWPActivateHintEvent
OnActivatingHotStyle : TWPActivatingHotStyle= procedure(Sender: TObject; par: TParagraph; posinpar: Integer) of object;
OnCalcPageNr : TWPOnCalcPageNr= procedure( Sender: TWPRTFEngineEdit; TextObject: TWPTextObj; RTFPageNr, PaintPageNr: Integer; var PrintedPageNr: Integer) of object;
OnChangeViewMode : TNotifyEvent= procedure (Sender : TObject) of Object
OnChangeZooming : TNotifyEvent= procedure (Sender : TObject) of Object
OnClick : TWPCustomRtfEditClick= TWPCustomRtfEditClick
OnClickHotText : TWPClickHotTextEvent= TWPClickHotTextEvent
OnClickPage : TOnClickPageEvent= TOnClickPageEvent
OnClickText : TWPClickTextEvent= TWPClickTextEvent
OnCustomLinePaintAfter : TWPVirtPagePaintEvent= TWPVirtPagePaintEvent = procedure(Sender: TObject; RTFEngine: TWPRTFEngineBasis; param: TWPVirtPagePaintParam; EndOfPageRun: Boolean) of object;
OnCustomLinePaintBefore : TWPVirtPagePaintEvent= TWPVirtPagePaintEvent = procedure(Sender: TObject; RTFEngine: TWPRTFEngineBasis; param: TWPVirtPagePaintParam; EndOfPageRun: Boolean) of object;
OnDblClick : TWPCustomRtfEditClick= TWPCustomRtfEditClick
OnDeactivateHotStyle : TWPDeactivateHotStyle= procedure(Sender: TObject) of object;
OnDragDrop : TDragDropEvent= TDragDropEvent
OnDragOver : TDragOverEvent= TDragOverEvent
OnEndDrag : TEndDragEvent= TEndDragEvent
OnEnter : TNotifyEvent= procedure (Sender : TObject) of Object
OnExit : TNotifyEvent= procedure (Sender : TObject) of Object
OnGetAttributeColor : TWPGetAttrColorEvent= procedure( Sender: TObject; var CharStyle: TCharacterAttr; par: TParagraph; posinpar: Integer) of object;
OnKeyDown : TKeyEvent= TKeyEvent
OnKeyPress : TKeyPressEvent= TKeyPressEvent
OnKeyUp : TKeyEvent= TKeyEvent
OnMouseDown : TMouseEvent= TMouseEvent
OnMouseMove : TMouseMoveEvent= TMouseMoveEvent
As ususal this event is triggered when the mouse is moved over the editor.
You can use
OnMouseUp : TMouseEvent= TMouseEvent
OnPaint : TNotifyEvent= procedure (Sender : TObject) of Object
OnPaintDesktopBackground : TWPOnPaintDesktopBackground= procedure(Sender: TObject; Canvas : TCanvas; R : TRect) of object;
OnPaintExternPage : TWPOnPaintExternPageEvent= procedure( Sender: TObject; RTFEngine: TWPRTFEnginePaint; prCanvas: TCanvas; xoff, yoff: Integer; r: TRect; PaintPageNr: Integer; ExternPageRef: TObject; DestXRes, DestYRes: Integer) of object;
OnPaintWatermark : TWPOnPaintWatermarkEvent= procedure( Sender: TObject; RTFEngine: TWPRTFEnginePaint; toCanvas: TCanvas; PageRect: TRect; PaintPageNr: Integer; RTFPageNr: Integer; WaterMarkRef: TObject; XRes, YRes: Integer; CurrentZoom: Single; PaintMode: TWPPaintModes) of object;
OnResize : TNotifyEvent= procedure (Sender : TObject) of Object
OnTextObjectClick : TTextObjectClickEvent= TTextObjectClickEvent
OnTextObjectMouseDown : TTextObjectMouseEvent= TTextObjectMouseEvent
OnTextObjectMouseMove : TTextObjectMouseEvent= TTextObjectMouseEvent
OnTextObjectMouseUp : TTextObjectMouseEvent= TTextObjectMouseEvent
OnTextObjectPaint : TWPTextObjectPaintEvent= procedure( Sender: TObject; pobj: TWPTextObj; toCanvas: TCanvas; XRes, YRes: Integer; X, Y, W, H, BASE: Integer; PageRef: TWPVirtPage; Modes: TWPTextObjectPaintModes; const CanvasExtraAttr: TWPPaintExtraParams; var ContinueMode: TWPTextObjectPaintResult) of object;
OnUpdateExternScrollbar : TWPUpdateExternScrollbar= TWPUpdateExternScrollbar
Used or referenced by
-Procedure TWPCustomAttrDlg.ChangeApplied(aEditBox:TWPCustomRtfEdit) |
-Function TWPSuperMerge.GetEditor : TWPCustomRTFControl |
-Procedure TWPCustomAttrDlg.ChangeApplied(aEditBox:TWPCustomRtfEdit) |