Modify the look and feel of the editor

Top  Previous  Next

Please use the properties ViewOptions, ViewOptionsEx, EditOptions and EditOptionsEx of the TWPRichText.

 

The TWPToolbar and TWPRuler both have a property DrawOptions.

 

Example:

 WPToolbar1.DrawOptions := [ wptDrawPageShade ];

 WPToolbar1.FlatButtons := true;

 WPToolbar1.MarginBottom:= 8;

 WPToolbar1.BevelLines := [ wplBottomShade ];

 

 WPRuler1.DrawOptions := WPRuler1.DrawOptions + [wpDrawThemedBackground,wpDrawFramelines];

 WPVertRuler1.DrawOptions := WPVertRuler1.DrawOptions + [wpDrawFramelines ];

 WPRuler1.DrawOptions := [wpDrawPageShade];

 WPVertRuler1.DrawOptions := [wpDrawPageShade];

 WPRichText1.ViewOptionsEx := WPRichText1.ViewOptionsEx + [wpPaintPageShade];

 WPPreview1.ViewOptionsEx := WPPreview1.ViewOptionsEx + [ wpPaintPageShade];

 

This will activate the new interactive Selection Mode

  WPRichText1.ViewOptionsEx + [wppInteractiveSelectionMarker];

 

clip0217

      The markers can be moved by dragging the mouse or using a touch screen.

 

 

The properties FormatOptions and FormatOptionsEx change how the formatting routine works, they have a significant influence on how the text appears.

 

Please also see the Layout Catagory.

 

To change the language (for localization, translation) please see demo "Lozalisation".

 

Also see the chapter "Toolbar and Actions, OnOpenDialog"

 

 

Custom Theming:

 

If you don't like the default background of the TWPRichText you can use this event to draw your own:

 

event OnPaintDesktopBackground

 

If you just want to draw custom borders after the default code had been executed use

 

event AfterPaintDesktopBackground

 

Or, as mentioned above, use WPDrawRectWithBitmap_bitmap.