Page 1 of 1
DbRichViewEdit - Font size is equal to 0
Posted: Tue May 26, 2020 1:23 am
by emaildomane
Good night Sergey Tkachenko. I have been a Richview user for over 10 years. It had an old version of Delphi. I upgraded this week to Delphi Rio. All my screens using DbRichViewEdit started having a problem, I use RichViewActions together. The problem is that every time I change the font size and save it sends the TRVFontSizeCombobox to 0 (zero), causing the font size to be minuscule, not changing to the desired font size. I am using version 18.2.
Re: DbRichViewEdit - Font size is equal to 0
Posted: Tue May 26, 2020 8:48 am
by Sergey Tkachenko
Check your code where you call TrvActionFontEx.Execute.
Instead of using Action.Font.Size, use Action.FontSizeDouble (font size in half points).
In very old versions, there was no Action.FontSizeDouble, and Action.Font.Size was used.
In newer versions (including 18.2), Action.FontSizeDouble must be used instead of Action.Font.Size
And in the newest version (starting from 18.3), you can use any of them (assigning Action.FontSizeDouble changes Action.Font.Size and vice versa).
If this code is used in TRVFontSizeComboBox, consider to delete it. In the new version of RichViewActions, TRVFontComboBox and TRVFontSizeComboBox can work automatically, just assign their ActionFont and Editor properties.
Re: DbRichViewEdit - Font size is equal to 0
Posted: Wed May 27, 2020 7:46 pm
by emaildomane
Thank you very much Sergey, it worked perfectly.