WPTools Manual



Search


(press enter to search)

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.

Properties

Property Align : TAlign

Property Anchors : TAnchors

Property Aspect : string

Property AutoZoom : TWPAutoZoom

Property BorderStyle : TBorderStyle

Property ColorDesktop : TColor

Property ColorDesktopTo : TColor

Property Constraints : TSizeConstraints

Property Ctl3D : Boolean

Property CurrStyleName : string

Property DragCursor : TCursor

Property DragMode : TDragMode

Property Editbox : TWPCustomRtfEdit

Property Enabled : Boolean

Property HasDefaultItem : Boolean

Property PaperColor : TColor

Property ParentColor : Boolean

Property ParentShowHint : Boolean

Property PopupMenu : TPopupMenu

Property ScrollBars : TScrollStyle

Property ScrollDirection : TWPScrollerDirection

Property Shaded : Boolean

Property ShowHint : Boolean

Property TabOrder : TTabOrder

Property TabStop : Boolean

Property Visible : Boolean

Property WPRTFPropsComponent : TWPRTFProps

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= procedure(Sender: TObject; PageInfo: TWPMeasurePageParam) of object;

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)