Search found 9817 matches

by Sergey Tkachenko
Wed Jan 28, 2026 9:49 am
Forum: Support
Topic: Setting a Style
Replies: 2
Views: 34

Re: Setting a Style

This is by design,

Your text has font "Georgia" applied on top of properties defined by its styletemplate.

When you apply a styletemplate, the results depend on the selection. If the selection contains multiple paragraphs, the styletemplate is applied only to paragraph properties. Text properties ...
by Sergey Tkachenko
Mon Jan 26, 2026 6:38 pm
Forum: Support
Topic: Hyperlink Underline Color
Replies: 6
Views: 161

Re: Hyperlink Underline Color

This code must work:

procedure TForm1.FormCreate(Sender: TObject);
var
i: integer;
begin
i := RVEFilervActionNew1.StyleTemplates.FindByName(RVHYPERLINKSTYLETEMPLATENAME);
RVEFilervActionNew1.StyleTemplates[i].ValidTextProperties := [rvfiUnderline,rvfiColor,rvfiJump,rvfiUnderlineColor ...
by Sergey Tkachenko
Mon Jan 26, 2026 6:11 pm
Forum: Support
Topic: Reset StyleTemplates
Replies: 2
Views: 46

Re: Reset StyleTemplates

There is no special method to reset StyleTemplates.

If you want to remove them in code, do it in the way shown in the topic https://www.trichview.com/help/idh_trichviewedit_changestyletemplates.html

RVStyleTmp.Units := RichViewEdit1.Style.Units;
RVStyleTmp.StyleTemplates.AssignStyleTemplates ...
by Sergey Tkachenko
Mon Jan 26, 2026 4:48 pm
Forum: Support
Topic: Hyperlink Underline Color
Replies: 6
Views: 161

Re: Hyperlink Underline Color

I made the following test:

In the ActionTest demo, I edited rvActionNew1.StyleTemplates at design time. For "Hyperlink" item, I changed:
Color = clWindowText
UnderlineColor = clAqua
ValidTextPropertiesEditor (this is how ValidTextProperties are called in the Object Inspector) = [rvfiUnderline ...
by Sergey Tkachenko
Fri Jan 16, 2026 11:38 am
Forum: Support
Topic: Resetting Text Style for Selected Items Without Losing Hyperlinks
Replies: 3
Views: 348

Re: Resetting Text Style for Selected Items Without Losing Hyperlinks

When style templates are used, ApplyStyleTemplate(-1) does the same work as MS Word: paragraphs are formatted using "Normal" styletemplate, hyperlinks are formatted using "Hyperlink" styletemplate, all other attributes are removed.

Without styletemplates, we need to answer to additional questions ...
by Sergey Tkachenko
Fri Jan 16, 2026 8:17 am
Forum: Support
Topic: Resetting Text Style for Selected Items Without Losing Hyperlinks
Replies: 3
Views: 348

Re: Resetting Text Style for Selected Items Without Losing Hyperlinks

If you use style templates (rve.UseStyleTemplates = True), the simplest solution to reset formatting is calling rve.ApplyStyleTemplate(-1).

Without style templates, you need to define the meaining of "resetting text style".
Do you want to assign:
- properties of rve.Style.TextStyles[0] to all non ...
by Sergey Tkachenko
Fri Jan 09, 2026 4:35 pm
Forum: Support
Topic: TRVFontComboBox and Modified
Replies: 6
Views: 921

Re: TRVFontComboBox and Modified

This problem will be solved by modifying TRichViewEdit.ApplyStyleConversion (and all other Apply* methods).
TRichViewEdit.ApplyStyleConversion will do nothing (and do not call OnChange), if this operation does not modify document.
by Sergey Tkachenko
Thu Jan 08, 2026 5:45 pm
Forum: Support
Topic: TRVFontComboBox and Modified
Replies: 6
Views: 921

Re: TRVFontComboBox and Modified

The problem is in ApplyStyleConversion, not in the combobox. It calls OnChange even if nothing was changed. This problem is noticeable in TRVFontComboBox because it applies itself when losing focus.
by Sergey Tkachenko
Thu Jan 08, 2026 12:25 pm
Forum: Support
Topic: TRVFontComboBox and Modified
Replies: 6
Views: 921

Re: TRVFontComboBox and Modified

This change isn't as simple as it seems at first glance.
We need to add checks to ensure that the operation has changed anything in the document. This requires numerous small changes in many places in the code. This will be added in the next update.
by Sergey Tkachenko
Sun Jan 04, 2026 11:49 am
Forum: Support
Topic: Create constructor never called in the TRVGraphicItemInfo descendants
Replies: 2
Views: 796

Re: Create constructor never called in the TRVGraphicItemInfo descendants

AFAIK, virtual constructors do not work in the way you expect.
Yes, TRVGraphicItemInfo.CreateEx calls inherited Create(ARVData), i.e. constructor TRVRectItemInfo.Create(ARVData: TPersistent), which is virtual.
However, even if you override this constructor in your class, TRVGraphicItemInfo.CreateEx ...
by Sergey Tkachenko
Sun Jan 04, 2026 11:22 am
Forum: Support
Topic: Coordinates of the object on the page, if it is in the table
Replies: 3
Views: 650

Re: Coordinates of the object on the page, if it is in the table

For any case, see the ScaleRichView demos in Demos\Delphi\CustomDraw\Rectangles\
This folder has demos that draw rectangles:
- around all items
- around the item below the mouse pointer
- around the item containing the caret
by Sergey Tkachenko
Tue Dec 30, 2025 12:29 pm
Forum: Support
Topic: Control the width of table columns programmatically
Replies: 5
Views: 9382

Re: Control the width of table columns programmatically

I confirm the problem.
It will be fixed in the next update.
As a workaround, call ALabel.UpdateMe immediately after changing ALabel.Text.
by Sergey Tkachenko
Tue Dec 30, 2025 12:03 pm
Forum: Support
Topic: Pasted text from docx does not display correctly in RichViewEdit
Replies: 2
Views: 1376

Re: Pasted text from docx does not display correctly in RichViewEdit

I confirm the problem.
This is a drawing issue: the text is stored as not bold, but displayed as bold.

And I'm afraid I don't know how to fix this.

As I understand it, this is a result of font auto-substitution. The document uses the font 'Aptos', which is not available to non-Microsoft ...
by Sergey Tkachenko
Sat Dec 27, 2025 12:03 pm
Forum: Support
Topic: Control the width of table columns programmatically
Replies: 5
Views: 9382

Re: Control the width of table columns programmatically

In order to help, I need to know how you change content size in code.
Please send me a code fragment or (better) a simple project reproducing the problem.
by Sergey Tkachenko
Sat Dec 13, 2025 6:14 pm
Forum: Support
Topic: Plain text for Word Count
Replies: 2
Views: 3259

Re: Plain text for Word Count

See this topic for functions for calculating word count: https://www.trichview.com/forums/viewtopic.php?t=13

As for plain text, there are several methods.
For this task, the best function is RVGetTextRange(rv, 0, RVGetTextLength(rv)) from RVLinear unit, see https://www.trichview.com/help/idh ...