[Demo] Custom text items

Demos, code samples. Only questions related to the existing topics are allowed here.
Post Reply
Sergey Tkachenko
Site Admin
Posts: 17520
Joined: Sat Aug 27, 2005 10:28 am
Contact:

[Demo] Custom text items

Post by Sergey Tkachenko »

These demos show how to create a new item class for text items.
The demos require TRichView 19.2 or newer.
CustomTextItems.zip
(111.56 KiB) Downloaded 5377 times
A custom text item class (TRVMyTextItemInfo) is implemented in CustomTextItem.pas.
It has several new properties: BorderWidth, BorderColor, AdditionalText.
The class implements saving and loading these properties in RVF.

There are two demos: one for TRichViewEdit, one for ScaleRichView.
These demos process OnDrawStyleText event to visualize BorderWidth and BorderColor properties.
(note: these properties are stored directly in an item, not in a text style)
custom-text-items.png
custom-text-items.png (3.85 KiB) Viewed 129187 times
Post Reply