Class TWPStyleScroller
Hierarchy
System.TObject | System.Classes.TPersistent | System.Classes.TComponent | Vcl.Controls.TControl | Vcl.Controls.TWinControl | Vcl.Controls.TCustomControl | WPRTEDefs.TWPCustomRTFControl | WPCTRMemo.TWPCustomRtfEdit | TWPStyleScroller
Description
This is a scrollable viewer for paragraph styles.To let this component view and change the styles in an editor, this editor and the style scroller must use the same TWPRTFProps component. It must be assigned to property WPRTFPropsComponent.
To attached an editor to the style scroller it is possible to use the property EditBox. This editor will be updated, when the uder clicks on one of the styles.
Alternatively, esspecially to attach multiple editors, create a TActionList and inside of it a TWPToolsCustomEditContolAction. As AttachedControl specify the scroller and attach the action list to the TWPRichText using the property ActionList. Now it is possible to also show the currently active style automatically.
Note:
This class inherits from the TWPCustomRtfEdit class which is also used to build an editor for text. This makes this class very powerfull, yet the implementation very small. The implementation is a good example for the development of a specialized paged viewer and to highlight the power of the WPTools' concept.
Methods
Events
OnClick : TWPCustomRtfEditClick= TWPCustomRtfEditClick
OnClickPage : TOnClickPageEvent= TOnClickPageEvent
OnDragDrop : TDragDropEvent= TDragDropEvent
OnDragOver : TDragOverEvent= TDragOverEvent
OnEndDrag : TEndDragEvent= TEndDragEvent
OnEnter : TNotifyEvent= procedure (Sender : TObject) of Object
OnExit : TNotifyEvent= procedure (Sender : TObject) of Object
OnKeyDown : TKeyEvent= TKeyEvent
OnKeyPress : TKeyPressEvent= TKeyPressEvent
OnKeyUp : TKeyEvent= TKeyEvent
OnMeasureTextPage : TWPMeasurePageEvent= TWPMeasurePageEvent
OnMouseDown : TMouseEvent= TMouseEvent
OnMouseMove : TMouseMoveEvent= TMouseMoveEvent
OnMouseUp : TMouseEvent= TMouseEvent
OnPaint : TNotifyEvent= procedure (Sender : TObject) of Object
Used or referenced by
-Procedure TWPCustomAttrDlg.ChangeApplied(aEditBox:TWPCustomRtfEdit) |
-Function TWPSuperMerge.GetEditor : TWPCustomRTFControl |
-Procedure TWPCustomAttrDlg.ChangeApplied(aEditBox:TWPCustomRtfEdit) |